okta mcp server
Enables Claude to interact with Okta's user management system, providing capabilities to retrieve user details, list users with filtering options, and manage user groups.
Enables Claude to interact with Okta's user management system, providing capabilities to retrieve user details, list users with filtering options, and manage user groups.
This MCP server enables Claude to interact with Okta's user management system, providing user and group management capabilities.
dev-123456.okta.com
)Install dependencies:
npm install
Open your Claude Desktop configuration file:
For MacOS:
code ~/Library/Application Support/Claude/claude_desktop_config.json
For Windows:
code %AppData%Claudeclaude_desktop_config.json
Add or update the configuration:
{
"mcpServers": {
"okta": {
"command": "node",
"args": [
"PATH_TO_PROJECT_DIRECTORY/dist/index.js"
],
"env": {
"OKTA_ORG_URL": "https://your-domain.okta.com",
"OKTA_API_TOKEN": "your-api-token"
}
}
}
}
Save the file and restart Claude Desktop.
The server provides the following tools:
Retrieves detailed user information from Okta, including: - User Details (ID, Status) - Account Dates (Created, Activated, Last Login, etc.) - Personal Information (Name, Email) - Employment Details - Contact Information - Address - Preferences
Lists users from Okta with optional filtering and pagination: - Supports SCIM filter expressions (e.g., 'profile.firstName eq "John"') - Free-form text search across multiple fields - Sorting options (by status, creation date, etc.) - Pagination support with customizable limits
Lists user groups from Okta with optional filtering and pagination: - Filter expressions for groups (e.g., 'type eq "OKTA_GROUP"') - Free-form text search across group fields - Sorting options (by name, type, etc.) - Pagination support with customizable limits
After setup, you can use commands like:
The server includes robust error handling for: - User or group not found (404 errors) - API authentication issues - Missing or invalid user profiles - General API errors
Tools not appearing in Claude:
- Check Claude Desktop logs: tail -f ~/Library/Logs/Claude/mcp*.log
- Verify all environment variables are set correctly
- Ensure the path to index.js is absolute and correct
Authentication Errors: - Verify your API token is valid - Check if OKTA_ORG_URL includes the full URL with https:// - Ensure your Okta domain is correct
Server Connection Issues:
- Check if the server built successfully
- Verify file permissions on build/index.js (should be 755)
- Try running the server directly: node /path/to/build/index.js
To view server logs:
For MacOS/Linux:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
For Windows:
Get-Content -Path "$env:AppDataClaudeLogsmcp*.log" -Wait -Tail 20
If you're getting environment variable errors, verify:
- OKTA_ORG_URL
: Should be complete URL (e.g., "https://dev-123456.okta.com")
- OKTA_API_TOKEN
: Should be a valid API token
The server includes TypeScript interfaces for Okta user and group data:
interface OktaUserProfile {
login: string;
email: string;
secondEmail?: string;
firstName: string;
lastName: string;
displayName: string;
nickName?: string;
organization: string;
title: string;
division: string;
department: string;
employeeNumber: string;
userType: string;
costCenter: string;
mobilePhone?: string;
primaryPhone?: string;
streetAddress: string;
city: string;
state: string;
zipCode: string;
countryCode: string;
preferredLanguage: string;
profileUrl?: string;
}
interface OktaUser {
id: string;
status: string;
created: string;
activated: string;
lastLogin: string;
lastUpdated: string;
statusChanged: string;
passwordChanged: string;
profile: OktaUserProfile;
}
interface OktaGroup {
id: string;
created: string;
lastUpdated: string;
lastMembershipUpdated: string;
type: string;
objectClass: string[];
profile: {
name: string;
description: string;
};
}
MIT License - See LICENSE file for details.
If you encounter any issues: - Check the troubleshooting section above - Review Claude Desktop logs - Examine the server's error output - Check Okta's developer documentation
Note: PRs welcome!