Okta MCP Server
Okta MCP 服务器
该 MCP 服务器使 Claude 能够与 Okta 的用户管理系统进行交互,提供全面的用户和组管理功能以及入职自动化。
先决条件
Node.js(v16 或更高版本)
克劳德桌面应用程序
Okta开发者账户
Okta 的管理员 API 令牌
Related MCP server: Okta MCP Server
设置说明
1.创建 Okta 开发者账户
创建新帐户或登录现有帐户
记下您的 Okta 域名(例如,
dev-123456.okta.com)
2. 创建 API 令牌
在 Okta 开发者控制台中,转到“安全”>“API”>“令牌”
点击“创建代币”
给你的令牌起一个有意义的名字(例如,“MCP 服务器令牌”)
复制令牌值(您将无法再看到它)
3. 初始项目设置
安装依赖项:
npm install4.配置Claude桌面
打开您的 Claude Desktop 配置文件:
对于 MacOS:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json对于 Windows:
code %AppData%\Claude\claude_desktop_config.json添加或更新配置:
{
"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"
}
}
}
}保存文件并重新启动 Claude Desktop。
可用工具
该服务器提供以下工具:
用户管理
获取用户
从 Okta 检索详细的用户信息,包括:
用户详细信息(ID、状态)
帐户日期(创建、激活、上次登录等)
个人信息(姓名、电子邮件)
就业详情
联系信息
地址
偏好设置
列出用户
列出 Okta 中的用户,并提供可选的过滤和分页功能:
支持 SCIM 过滤表达式(例如,'profile.firstName eq“John”')
跨多个字段的自由格式文本搜索
排序选项(按状态、创建日期等)
具有可自定义限制的分页支持
激活用户
在 Okta 中激活用户:
发送激活电子邮件的选项
将用户状态更新为活跃
暂停用户
在 Okta 中暂停用户
取消暂停用户
取消 Okta 中先前暂停的用户
删除用户
从 Okta 中删除用户(注意:必须先停用用户)
获取用户最后位置
从 Okta 系统日志中检索用户的最后已知位置和登录信息
集团管理
列表组
列出 Okta 中的用户组,并带有可选的过滤和分页功能:
组的过滤表达式(例如,'type eq“OKTA_GROUP”')
跨组字段的自由格式文本搜索
排序选项(按名称、类型等)
具有可自定义限制的分页支持
创建组
在 Okta 中创建一个新组,并指定名称和可选描述
获取组
检索特定组的详细信息
删除组
从 Okta 中删除一个组
将用户分配给组
在 Okta 中将用户分配到组
从组中删除用户
从 Okta 中的组中删除用户
列出组用户
列出特定组中的所有用户,并支持分页
入职自动化(实验性)
**注意:**入门自动化工具尚处于实验阶段,可能会根据 Okta 的 API 限制而有所变更或受限。请在生产环境中谨慎使用。
批量用户导入
从 CSV 字符串导入多个用户:
根据 CSV 数据创建用户帐户
用户可选激活
可选的电子邮件通知
分配到默认组
将用户分配到组
根据属性映射将多个用户分配到组:
将用户属性(部门、职称等)映射到特定组
根据属性批量分配用户
预配应用程序
为多个用户提供应用程序访问权限:
将用户分配到应用程序
支持批量配置
运行入职工作流
通过 CSV 数据为多个用户运行完整的入职工作流程:
从 CSV 导入用户
自动激活
基于属性的组分配
应用程序配置
欢迎电子邮件配置
Claude 中的示例用法
设置完成后,您可以使用以下命令:
用户管理
“显示用户 ID XXXX 的详细信息”
“用户john.doe@company.com的状态是什么?”
“用户jane.smith@organization.com的上次登录时间是什么时候”
“列出市场部所有用户”
“查找上个月创建的用户”
“激活 ID XXXX 的用户”
“暂停 ID 为 XXXX 的用户”
“删除 ID 为 XXXX 的已停用用户”
“用户XXXX上次从哪里登录的?”
集团管理
“显示我的 Okta 组织中的所有群组”
“列出包含单词‘admin’的组”
“创建一个名为‘营销团队’的新组”
“获取 ID 为 XXXX 的组的详细信息”
“删除 ID 为 XXXX 的组”
“将用户 XXXX 添加到组 YYYY”
“从组 YYYY 中删除用户 XXXX”
“列出‘财务’组中的所有用户”
入职自动化
“从 CSV 数据导入这些用户:[CSV 内容]”
“根据部门属性将用户分配到组”
“为这 5 位用户提供应用程序访问权限”
“为这些新员工运行完整的入职流程:[CSV 内容]”
错误处理
该服务器包括强大的错误处理功能:
未找到用户或组(404 错误)
API 身份验证问题
用户资料缺失或无效
常规 API 错误
CSV解析问题
用户属性映射失败
应用程序配置错误
故障排除
常见问题
Claude 中未出现的工具:
检查 Claude Desktop 日志:
tail -f ~/Library/Logs/Claude/mcp*.log验证所有环境变量是否设置正确
确保 index.js 的路径是绝对的并且正确
身份验证错误:
验证您的 API 令牌是否有效
检查 OKTA_ORG_URL 是否包含带有 https:// 的完整 URL
确保您的 Okta 域名正确
服务器连接问题:
检查服务器是否搭建成功
验证 build/index.js 的文件权限(应为 755)
尝试直接运行服务器:
node /path/to/build/index.js
查看日志
查看服务器日志:
对于 MacOS/Linux:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log对于 Windows:
Get-Content -Path "$env:AppData\Claude\Logs\mcp*.log" -Wait -Tail 20环境变量
如果您收到环境变量错误,请验证:
OKTA_ORG_URL:应为完整的 URL(例如,“ https://dev-123456.okta.com ”)OKTA_API_TOKEN:应该是一个有效的 API 令牌
安全注意事项
确保您的 API 令牌安全
不要将凭证提交到版本控制
使用环境变量来存储敏感数据
定期轮换 API 令牌
在 Okta 管理控制台中监控 API 使用情况
实施 API 调用速率限制
使用 API 令牌所需的最低权限
类型
该服务器包括用于 Okta 用户和组数据的 TypeScript 接口:
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;
};
}用于入职培训的 CSV 格式
使用批量导入或入职工作流工具时,您的 CSV 应包含以下标题:
firstName(必填)lastName(必填)email(必填)department(可选)title(可选)mobilePhone(可选)
例子:
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 文件。
支持
如果您遇到任何问题:
查看上面的故障排除部分
查看 Claude Desktop 日志
检查服务器的错误输出
查看 Okta 的开发者文档
注意:欢迎 PR!
Available Tools
20 toolsactivate_userC
Activate a user in Okta
| Name | Required | Description | Default |
|---|---|---|---|
| sendEmail | No | Whether to send an activation email (default: true) | |
| userId | Yes | The unique identifier of the Okta user |
assign_users_to_groupsC
Assign multiple users to groups based on attributes
| Name | Required | Description | Default |
|---|---|---|---|
| attributeMapping | Yes | Mapping of user attributes to group IDs (e.g., {"department": {"Engineering": "group1Id", "Sales": "group2Id"}}) | |
| userIds | Yes | List of user IDs to assign |
assign_user_to_groupC
Assign a user to a group in Okta
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes | ID of the group | |
| userId | Yes | ID of the user to assign to the group |
bulk_user_importC
Import multiple users from a CSV string
| Name | Required | Description | Default |
|---|---|---|---|
| activateUsers | No | Whether to activate users immediately (default: false) | |
| csvData | Yes | CSV string with user information (header row required) | |
| defaultGroups | No | Default group IDs to assign all imported users to | |
| sendEmail | No | Whether to send activation emails (default: true) |
create_groupC
Create a new group in Okta
| Name | Required | Description | Default |
|---|---|---|---|
| description | No | Description of the group (optional) | |
| name | Yes | Name of the group |
create_userC
Create a new user in Okta
| Name | Required | Description | Default |
|---|---|---|---|
| activate | No | Whether to activate the user immediately (default: false) | |
| Yes | User's email address | ||
| firstName | Yes | User's first name | |
| lastName | Yes | User's last name | |
| login | No | User's login (defaults to email if not provided) |
deactivate_userC
Deactivate a user in Okta
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | The unique identifier of the Okta user |
delete_groupC
Delete a group from Okta
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes | ID of the group to delete |
delete_userA
Delete a user from Okta (must be deactivated first)
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | The unique identifier of the Okta user |
get_groupC
Get detailed information about a specific group
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes | ID of the group to retrieve |
get_userB
Retrieve detailed user information from Okta by user ID
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | The unique identifier of the Okta user |
get_user_last_locationC
Retrieve the last known location and login information for a user from Okta system logs
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | The unique identifier of the Okta user |
list_groupsC
List user groups from Okta with optional filtering and pagination
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Cursor for pagination, obtained from previous response | |
| filter | No | Filter expression for groups | |
| limit | No | Maximum number of groups to return (default: 50, max: 200) | |
| search | No | Free-form text search across group fields | |
| sortBy | No | Field to sort results by | |
| sortOrder | No | Sort order (asc or desc, default: asc) |
list_group_usersC
List all users in a specific group
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Cursor for pagination, obtained from previous response | |
| groupId | Yes | ID of the group | |
| limit | No | Maximum number of users to return (default: 50, max: 200) |
list_usersB
List users from Okta with optional filtering and pagination
| Name | Required | Description | Default |
|---|---|---|---|
| after | No | Cursor for pagination, obtained from previous response | |
| filter | No | SCIM filter expression to filter users | |
| limit | No | Maximum number of users to return (default: 50, max: 200) | |
| search | No | Free-form text search across multiple fields | |
| sortBy | No | Field to sort results by | |
| sortOrder | No | Sort order (asc or desc, default: asc) |
provision_applicationsC
Provision application access for multiple users
| Name | Required | Description | Default |
|---|---|---|---|
| applicationIds | Yes | Application IDs to provision | |
| userIds | Yes | List of user IDs to provision access for |
remove_user_from_groupC
Remove a user from a group in Okta
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes | ID of the group | |
| userId | Yes | ID of the user to remove from the group |
run_onboarding_workflowC
Run a complete onboarding workflow for multiple users from CSV data
| Name | Required | Description | Default |
|---|---|---|---|
| activateUsers | No | Whether to activate users immediately (default: true) | |
| applicationIds | No | Application IDs to provision for all users | |
| csvData | Yes | CSV string with user information | |
| defaultGroups | No | Default group IDs to assign all users to | |
| groupMappings | No | Mapping of user attributes to group IDs (e.g., {"department": {"Engineering": "group1Id"}}) | |
| sendWelcomeEmail | No | Whether to send welcome emails (default: true) |
suspend_userC
Suspend a user in Okta
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | The unique identifier of the Okta user |
unsuspend_userC
Unsuspend a user in Okta
| Name | Required | Description | Default |
|---|---|---|---|
| userId | Yes | The unique identifier of the Okta user |
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
20 tool updates
v1.0.0- First observed
activate_user - First observed
assign_user_to_group - First observed
assign_users_to_groups - First observed
bulk_user_import - First observed
create_group - First observed
create_user - First observed
deactivate_user - First observed
delete_group - First observed
delete_user - First observed
get_group - First observed
get_user - First observed
get_user_last_location - First observed
list_group_users - First observed
list_groups - First observed
list_users - First observed
provision_applications - First observed
remove_user_from_group - First observed
run_onboarding_workflow - First observed
suspend_user - First observed
unsuspend_user
TDQS
Scored across 20 tools
Each tool has a clearly distinct purpose targeting specific resources (users, groups, applications) and actions (create, get, list, activate, assign, etc.). There is no significant overlap; for example, assign_user_to_group and assign_users_to_groups differ in scope but are clearly distinguished by their descriptions.
Tool names follow a consistent verb_noun pattern throughout, using snake_case uniformly. Verbs like create, get, list, assign, delete, etc., are applied predictably to nouns like user, group, or specific operations, making the set highly readable and systematic.
With 20 tools, the count is slightly high but reasonable for an Okta server covering user and group management, onboarding, and application provisioning. It includes core CRUD operations and specialized workflows, though it might be borderline heavy for some agents.
The tool surface provides comprehensive coverage for Okta's domain, including full CRUD/lifecycle operations for users and groups (e.g., create, get, list, activate/deactivate, suspend/unsuspend, delete), bulk operations, assignment workflows, and application provisioning, with no obvious gaps for core administrative tasks.
Maintenance
Related MCP Connectors
Run UX research from Claude — create card sort studies, list studies, pull headline stats.
Manage your WorkOS workspace in plain language: orgs, users, SSO, Directory Sync, and AuthKit.
Read and write Sage Intacct from Claude or ChatGPT. Write tools are flagged for approval.
Users, organizations, roles, permissions, applications and feature flags.
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,573 PyPI76Apache 2.0- AlicenseNot gradedqualityDmaintenanceEnables management of Okta identity platform through natural language, allowing users to perform operations on applications, groups, and users with secure API token authentication.18 npm2MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to manage Okta organizations, including users, groups, and applications, via natural language.2 npm7MIT
- 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