Okta Admin MCP Server
Provides tools for administering an Okta organization through MCP, including user lifecycle management, application and group operations, MFA factor listing, policy listing, system audit logs, and network zone management.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Okta Admin MCP Server list all users in my Okta organization"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Okta Admin MCP Server
A Model Context Protocol (MCP) server that provides comprehensive Okta administration capabilities through a standardized interface. This server enables AI assistants and other MCP clients to perform user management, application management, group operations, and system administration tasks in Okta environments.
Features
User Management
List Users: Retrieve all users in the Okta organization
Get User: Fetch detailed information about a specific user
Create User: Add new users to the organization
Update User: Modify existing user profiles (name, email, phone)
Enable/Disable Users: Activate or deactivate user accounts
Delete User: Permanently remove users from the organization
Reset Password: Generate password reset tokens for users
Application Management
List Applications: View all applications in the organization
Get Application: Retrieve detailed application information
Get User Apps: See applications assigned to a specific user
Assign User to App: Grant application access to users
Group Management
List Groups: View all groups in the organization
Get Group: Retrieve detailed group information
Create Group: Add new groups
Add User to Group: Assign users to groups
Remove User from Group: Unassign users from groups
List Group Users: See all users in a specific group
Multi-Factor Authentication (MFA)
List User Factors: View all MFA methods configured for a user
Policy Management
List Policies: View organizational policies (Sign-On, Password, MFA, etc.)
System Administration
List System Logs: Retrieve audit logs and system events
List Network Zones: View configured network zones
Related MCP server: Okta MCP Server
Installation
Clone the repository:
git clone <repository-url>
cd okta-admin-mcp-serverInstall dependencies:
npm installCreate a
.envfile in the project root:
OKTA_ORG_URL=https://your-org.okta.com
OKTA_API_TOKEN=your-api-token
NODE_ENV=productionBuild the project:
npm run buildConfiguration
Environment Variables
Variable | Description | Required |
| Your Okta organization URL | Yes |
| Okta API token with admin privileges | Yes |
| Environment mode ( | No |
Okta API Token Setup
Log in to your Okta Admin Console
Navigate to Security > API
Click Tokens tab
Click Create Token
Provide a name for the token
Copy the generated token (save it securely)
Required Okta Permissions
The API token must have the following administrator roles:
Super Administrator (recommended for full functionality)
Or specific admin roles:
User Administrator
Application Administrator
Group Administrator
Read-only Administrator (for read operations)
Usage
Starting the Server
npm startThe server will start in stdio mode and connect via the Model Context Protocol.
Development Mode
For development with mock data:
NODE_ENV=test npm startThis uses mock clients instead of making real API calls to Okta.
MCP Client Integration
Configure your MCP client to connect to this server. Example configuration for various clients:
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"okta-admin": {
"command": "node",
"args": ["path/to/okta-admin-mcp-server/dist/server.js"]
}
}
}API Tools Reference
User Management Tools
create-user
Creates a new user in Okta.
Parameters:
email,firstName,lastName,activate(optional, default: true)
get-user
Retrieves a specific user by ID.
Parameters:
userId
list-user
Lists all users in the organization.
Parameters: None
update-user
Updates an existing user's profile.
Parameters:
userId,firstName(optional),lastName(optional),email(optional),mobilePhone(optional)
disable-user / enable-user
Deactivates or activates a user account.
Parameters:
userId
delete-user
Permanently deletes a user.
Parameters:
userId,sendEmail(optional, default: false)
reset-user-password
Generates a password reset token for a user.
Parameters:
userId,sendEmail(optional, default: false)
Application Management Tools
list-applications
Lists all applications in the organization.
Parameters:
limit(optional, default: 20)
get-application
Retrieves detailed information about a specific application.
Parameters:
appId
get-user-apps
Gets all applications assigned to a user.
Parameters:
userId
assign-user-to-app
Assigns a user to an application.
Parameters:
appId,userId
Group Management Tools
list-groups
Lists all groups in the organization.
Parameters:
limit(optional, default: 20)
get-group
Retrieves detailed information about a specific group.
Parameters:
groupId
create-group
Creates a new group.
Parameters:
name,description(optional)
add-user-to-group
Adds a user to a group.
Parameters:
groupId,userId
remove-user-from-group
Removes a user from a group.
Parameters:
groupId,userId
list-group-users
Lists all users in a specific group.
Parameters:
groupId
System Administration Tools
list-system-logs
Retrieves system audit logs.
Parameters:
limit(optional, default: 100),since(optional, ISO 8601 format)
list-user-factors
Lists all MFA factors configured for a user.
Parameters:
userId
list-policies
Lists organizational policies by type.
Parameters:
type(required, one of: OKTA_SIGN_ON, PASSWORD, MFA_ENROLL, IDP_DISCOVERY, ACCESS_POLICY, PROFILE_ENROLLMENT, POST_AUTH_SESSION, ENTITY_RISK)
list-zones
Lists all network zones.
Parameters: None
Architecture
Project Structure
src/
├── server.ts # Main MCP server entry point
├── client/
│ ├── client-factory.ts # Factory for creating Okta clients
│ └── mock-client.ts # Mock client for testing
└── tools/
├── tool-registry.ts # Central tool registration
├── UserManagement.ts # User-related operations
├── GroupManagement.ts # Group-related operations
├── ApplicationManagement.ts # App-related operations
├── FactorManagement.ts # MFA-related operations
├── PolicyManagement.ts # Policy-related operations
├── SystemManagement.ts # System/logging operations
└── ZoneManagement.ts # Network zone operationsKey Components
Server: Main MCP server that handles protocol communication
Client Factory: Manages creation of real vs mock Okta clients
Tool Modules: Organized by functional area, each providing specific operations
Tool Registry: Central registration point for all available tools
Error Handling
The server includes comprehensive error handling:
API Errors: Okta API errors are caught and returned with descriptive messages
Validation Errors: Input validation using Zod schemas
Network Errors: Connection issues are handled gracefully
Authentication Errors: Invalid tokens or permissions are clearly reported
Testing
The project includes comprehensive Jest-based tests that can run against both mock data and real Okta instances.
Available Test Commands
# Run tests against mock data (safe, no real API calls)
npm run test
# Run tests against production Okta instance (requires valid credentials)
npm run prdtestTest Configuration
Tests use the Model Context Protocol client to interact with the server, providing end-to-end testing of the MCP interface.
Mock Mode Testing (npm run test)
Uses
NODE_ENV=testenvironmentNo real API calls to Okta
Predictable mock responses
Safe for continuous integration
Mock mode provides:
2 sample users (
u1,u2)2 sample groups (
g1,g2)2 sample applications (
app1,app2)Sample system logs, policies, and network zones
Production Testing (npm run prdtest)
Uses
NODE_ENV=productionenvironmentMakes real API calls to your Okta instance
Requires valid
OKTA_ORG_URLandOKTA_API_TOKENWarning: Creates/modifies/deletes real data in your Okta org
Test Coverage
The test suite covers all user management operations:
✅ List Users - Retrieves all users in the organization
✅ Create User - Creates test users with timestamp-based emails
✅ Update User - Modifies user profiles (first name, last name)
✅ Get User - Retrieves specific user details
✅ Reset Password - Generates password reset tokens
✅ Disable User - Deactivates user accounts
✅ Enable User - Reactivates user accounts
✅ Delete User - Permanently removes users
✅ Error Handling - Tests invalid user ID scenarios
Test Data Cleanup
Tests automatically clean up created data:
Test users are created with unique timestamp-based identifiers
Created users are deleted at the end of the test suite
Mock mode requires no cleanup (no real data created)
Running Individual Tests
# Run with debug output
DEBUG=true npm run test
# Run specific test file
npm test okta-api.test.tsTest Structure
// Example test structure
describe('User Management Functions', () => {
it('Should create a new user', async () => {
const result = await mclient.callTool({
name: "create-user",
arguments: {
email: "test@example.com",
firstName: "Test",
lastName: "User"
}
});
expect(result.isError).toBeFalsy();
expect(result.content).toBeDefined();
});
});CI/CD Integration
For continuous integration, use mock mode to avoid API rate limits and data pollution:
# GitHub Actions example
- name: Run Tests
run: npm run test
env:
NODE_ENV: testSecurity Considerations
API Token Security: Store tokens securely and rotate regularly
Least Privilege: Use admin roles with minimum required permissions
Network Security: Consider IP restrictions and network zones
Audit Logging: Monitor system logs for unauthorized access
Environment Separation: Use separate tokens for development/production
Troubleshooting
Common Issues
Authentication Failures
Verify
OKTA_ORG_URLis correct (include https://)Check API token validity and permissions
Ensure token hasn't expired
Permission Denied
Verify admin role assignments
Check if specific operations require higher privileges
Network Issues
Verify network connectivity to Okta
Check firewall and proxy settings
Validate SSL/TLS configuration
Resource Not Found
Verify user/group/app IDs are correct
Check if resources exist in your organization
Contributing
Fork the repository
Create a feature branch
Make your changes
Test thoroughly (including mock mode)
Submit a pull request
License
[License information to be added]
Support
For issues and questions:
Check the troubleshooting section
Review Okta API documentation
Open an issue in the project repository
Available Tools
22 toolsadd-user-to-groupC
Adds a user to a group
Inputs: userId (required), groupId (required).
assign-user-to-appC
Assigns a user to an application
Inputs: appId (required), userId (required).
create-groupC
Creates a new group
Inputs: name (required), description.
create-userC
Creates a new user in Okta
Inputs: email (required), lastName (required), firstName (required), activate.
delete-userB
Permanently deletes a user in Okta
Inputs: userId (required), sendEmail.
disable-userC
Disables an existing user in Okta
Inputs: userId (required), email, lastName, firstName, +1 more.
enable-userC
Enables an existing user in Okta
Inputs: userId (required), email, lastName, firstName, +1 more.
get-applicationB
Gets details of a specific application
Inputs: appId (required).
get-groupC
Gets details of a specific group
Inputs: groupId (required).
get-userC
Gets a specific user by ID
Inputs: userId (required).
get-user-appsB
Gets all applications assigned to an Okta user by ID
Inputs: userId (required).
list-applicationsC
Lists all applications in the Okta organization
Inputs: limit.
list-groupsC
Lists all groups in the Okta organization
Inputs: limit.
list-group-usersC
Lists all users in a specific group
Inputs: groupId (required).
list-policiesC
Lists all policies in the organization
Inputs: type.
list-system-logsC
Retrieves system logs
Inputs: limit, since.
list-userB
Lists all users in the Okta organization
Inputs: no named parameters.
list-user-factorsB
Lists all factors (MFA methods) for a user
Inputs: userId (required).
list-zonesB
Lists all network zones
Inputs: no named parameters.
remove-user-from-groupC
Removes a user from a group
Inputs: userId (required), groupId (required).
reset-user-passwordC
Resets a user's password
Inputs: userId (required), sendEmail.
update-userC
Updates an existing user in Okta
Inputs: userId (required), email, lastName, firstName, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Each tool targets a clear resource+action pair, and user lifecycle verbs (create/delete/disable/enable/update) are cleanly separated from group and app membership operations. The only mild confusion is list-user (all users) versus get-user (single user by ID), a singular/plural naming wrinkle that descriptions partly resolve.
Names follow a predictable kebab-case verb_noun pattern throughout (create-user, list-groups, assign-user-to-app). Minor deviations: list-user is singular while list-groups/list-applications are plural, and add-user-to-group is a longer compound form, but the convention is still readable.
22 tools is on the heavy side, but the server spans several Okta subdomains (users, groups, applications, policies, zones, logs, factors), so most tools earn their place. Slightly over-scoped relative to the smaller 3-15 sweet spot.
User management is fully covered (create/read/update/delete, enable/disable, password reset, factors, apps), but groups lack delete/update and there is no remove-user-from-app, and policies/zones/logs are list-only with no get or modify operations. Applications also have assign but no unassign, leaving several dead ends.
Maintenance
Related MCP Connectors
Discover, plan and run tools across your connected business systems through one OAuth MCP endpoint
Your company's AI assistants, agents, workflows and knowledge bases from Orckai, as MCP tools.
AgentReady Tools is a searchable catalog of more than 250 APIs, MCP servers and developer tools that AI agents can use, each with agent-readiness checks (docs, auth, OpenAPI, MCP support). Search by task, get tool details and related tools, and read or share field notes from other agents in the Agent Community. Remote MCP endpoint: https://agentready-tools.com/mcp
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.
Related MCP Servers
AlicenseNot gradedqualityCmaintenanceEnables LLM agents to manage Okta organizations through natural language, providing full CRUD operations for users, groups, applications, policies, and system logs via Okta's Admin Management APIs.1,659 PyPI80Apache 2.0- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to manage Okta organizations through the Okta Admin Management APIs, supporting user provisioning, group management, and more via natural language.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Okta users, groups, applications, policies, and logs through natural language commands.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables natural language management of Okta organizations, allowing users to perform administrative tasks such as user management, group operations, and application monitoring through AI agents.Apache 2.0