by kapilduraphe
This project provides an Okta MCP (Multi-Cloud Platform) server that enables Claude to interact with Okta's user management system, offering comprehensive user and group management capabilities along with onboarding automation.
Okta MCP Server is a tool that integrates with Claude to manage Okta users and groups. It allows for automation of user onboarding and provides a programmatic interface to Okta's identity management functionalities.
To use Okta MCP Server, you need Node.js (v16 or higher), Claude Desktop App, and an Okta Developer Account with an Admin API Token. The setup involves creating an Okta Developer Account, generating an API Token, installing project dependencies (npm install
), and configuring Claude Desktop to point to the server's index.js
file with the necessary OKTA_ORG_URL
and OKTA_API_TOKEN
environment variables.
Q: Tools not appearing in Claude?
A: Check Claude Desktop logs (~/Library/Logs/Claude/mcp*.log
), verify environment variables, and ensure the path to index.js
is absolute and correct.
Q: Authentication Errors?
A: Verify your API token is valid, ensure OKTA_ORG_URL
includes https://
, and confirm your Okta domain is correct.
Q: Server Connection Issues?
A: Check if the server built successfully, verify file permissions on build/index.js
(should be 755), and try running the server directly (node /path/to/build/index.js
).
Q: How to view server logs?
A: For MacOS/Linux, use tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
. For Windows, use Get-Content -Path "$env:AppData\Claude\Logs\mcp*.log" -Wait -Tail 20
.
Q: What environment variables are required?
A: OKTA_ORG_URL
(e.g., "https://dev-123456.okta.com") and OKTA_API_TOKEN
(a valid API token).
Q: What is the CSV format for onboarding?
A: The CSV should include firstName
(required), lastName
(required), email
(required), and optional fields like department
, title
, and mobilePhone
.
Q: What are the security considerations? A: Keep your API token secure, do not commit credentials to version control, use environment variables for sensitive data, regularly rotate API tokens, monitor API usage, implement rate limiting, and use minimum required permissions for API token.
This MCP server enables Claude to interact with Okta's user management system, providing comprehensive user and group management capabilities along with onboarding automation.
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%\Claude\claude_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:
Lists users from Okta with optional filtering and pagination:
Activates a user in Okta:
Suspends a user in Okta
Unsuspends a previously suspended user in Okta
Deletes a user from Okta (note: user must be deactivated first)
Retrieves the last known location and login information for a user from Okta system logs
Lists user groups from Okta with optional filtering and pagination:
Creates a new group in Okta with a name and optional description
Retrieves detailed information about a specific group
Deletes a group from Okta
Assigns a user to a group in Okta
Removes a user from a group in Okta
Lists all users in a specific group with pagination support
Note: The onboarding automation tools are experimental and may be subject to changes or limitations based on Okta's API constraints. Use with caution in production environments.
Imports multiple users from a CSV string:
Assigns multiple users to groups based on attribute mappings:
Provisions application access for multiple users:
Runs a complete onboarding workflow for multiple users from CSV data:
After setup, you can use commands like:
The server includes robust error handling for:
Tools not appearing in Claude:
tail -f ~/Library/Logs/Claude/mcp*.log
Authentication Errors:
Server Connection Issues:
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:AppData\Claude\Logs\mcp*.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 tokenThe 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;
};
}
When using the bulk import or onboarding workflow tools, your CSV should include these headers:
firstName
(required)lastName
(required)email
(required)department
(optional)title
(optional)mobilePhone
(optional)Example:
firstName,lastName,email,department,title,mobilePhone
John,Doe,john.doe@example.com,Engineering,Senior Developer,+1-555-123-4567
Jane,Smith,jane.smith@example.com,Marketing,Director,+1-555-987-6543
MIT License - See LICENSE file for details.
If you encounter any issues:
Note: PRs welcome!
Reviews feature coming soon
Stay tuned for community discussions and feedback