インストール
コンテンツ詳細
代替品
インストール
{
"mcpServers": {
"okta-mcp-server": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/okta-mcp-server",
"okta-mcp-server"
],
"env": {
"OKTA_ORG_URL": "<OKTA_ORG_URL>",
"OKTA_CLIENT_ID": "<OKTA_CLIENT_ID>",
"OKTA_SCOPES": "<OKTA_SCOPES>",
"OKTA_PRIVATE_KEY": "<PRIVATE_KEY_IF_NEEDED>",
"OKTA_KEY_ID": "<KEY_ID_IF_NEEDED>"
}
}
}
}
{
"mcpServers": {
"okta-mcp-server": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/okta-mcp-server",
"okta-mcp-server"
],
"env": {
"OKTA_ORG_URL": "<OKTA_ORG_URL>",
"OKTA_CLIENT_ID": "<OKTA_CLIENT_ID>",
"OKTA_SCOPES": "<OKTA_SCOPES>",
"OKTA_PRIVATE_KEY": "<PRIVATE_KEY_IF_NEEDED>",
"OKTA_KEY_ID": "<KEY_ID_IF_NEEDED>"
}
}
}
}🚀 Okta MCP Server
MCP (Model Context Protocol) は、Anthropicによって導入されたオープンプロトコルで、大規模言語モデルが外部ツール、リソース、またはリモートサービスと通信する方法を標準化します。Okta MCP Serverは、LLMやAIエージェントと統合し、自然言語を使用してさまざまなOkta管理操作を実行できるようにします。
🚀 クイックスタート
前提条件
- Python 3.8+
- uv パッケージマネージャー
- Claude Desktop またはその他の MCP Client
- 適切な権限を持つ Okta アカウント
Okta MCP Serverのインストール
Okta MCP Serverをインストールし、好みのMCPクライアントと連携するように設定します。
Claude Desktop(全ツール使用)
- サーバーをクローンしてインストールします。
git clone https://github.com/okta/okta-mcp-server.git
cd okta-mcp-server
uv sync
claude_desktop_config.jsonに以下を追加してClaude Desktopを設定します。
{
"mcpServers": {
"okta-mcp-server": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/okta-mcp-server",
"okta-mcp-server"
],
"env": {
"OKTA_ORG_URL": "<OKTA_ORG_URL>",
"OKTA_CLIENT_ID": "<OKTA_CLIENT_ID>",
"OKTA_SCOPES": "<OKTA_SCOPES>",
"OKTA_PRIVATE_KEY": "<PRIVATE_KEY_IF_NEEDED>",
"OKTA_KEY_ID": "<KEY_ID_IF_NEEDED>"
}
}
}
}
VS Code
VS Codeの settings.json に以下を追加します。
{
"mcp": {
"inputs": [
{
"type": "promptString",
"description": "Okta Organization URL (e.g., https://dev-123456.okta.com)",
"id": "OKTA_ORG_URL"
},
{
"type": "promptString",
"description": "Okta Client ID",
"id": "OKTA_CLIENT_ID",
"password": true
},
{
"type": "promptString",
"description": "Okta Scopes (separated by whitespace, e.g., 'okta.users.read okta.groups.manage')",
"id": "OKTA_SCOPES"
},
{
"type": "promptString",
"description": "Okta Private Key. Required for 'browserless' auth.",
"id": "OKTA_PRIVATE_KEY",
"password": true
},
{
"type": "promptString",
"description": "Okta Key ID (KID) for the private key. Required for 'browserless' auth.",
"id": "OKTA_KEY_ID",
"password": true
}
],
"servers": {
"okta-mcp-server": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/the/okta-mcp-server",
"okta-mcp-server"
],
"env": {
"OKTA_ORG_URL": "${input:OKTA_ORG_URL}",
"OKTA_CLIENT_ID": "${input:OKTA_CLIENT_ID}",
"OKTA_SCOPES": "${input:OKTA_SCOPES}",
"OKTA_PRIVATE_KEY": "${input:OKTA_PRIVATE_KEY}",
"OKTA_KEY_ID": "${input:OKTA_KEY_ID}"
}
}
}
}
}
その他のMCPクライアント
他のMCPクライアントでOkta MCP Serverを使用する場合は、この設定を手動でクライアントに追加し、変更を有効にするために再起動します。
{
"mcpServers": {
"okta-mcp-server": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/okta-mcp-server",
"okta-mcp-server"
],
"env": {
"OKTA_ORG_URL": "<OKTA_ORG_URL>",
"OKTA_CLIENT_ID": "<OKTA_CLIENT_ID>",
"OKTA_SCOPES": "<OKTA_SCOPES>",
"OKTA_PRIVATE_KEY": "<PRIVATE_KEY_IF_NEEDED>",
"OKTA_KEY_ID": "<KEY_ID_IF_NEEDED>"
}
}
}
}
Oktaでの認証
サーバーは2つの認証方法をサポートしています。使用ケースに最適な方法を選択してください。
方法1: デバイス認証グラント(対話型)
- Okta組織で、新しいアプリ統合を作成します。
- OIDC - OpenID Connect と ネイティブアプリケーション を選択します。
- グラントタイプ で、デバイス認証 がチェックされていることを確認します。
- Okta APIスコープタブに移動し、必要なAPIの権限を付与します(例: okta.users.read, okta.groups.manage)。
- アプリケーションを保存し、クライアントID をコピーします。
- ドキュメント: Oktaデバイス認証グラントガイド
方法2: 秘密鍵JWT(ブラウザレス)
- アプリの作成: Okta組織で、新しいアプリ統合 を作成します。APIサービス を選択します。アプリを保存し、クライアントID をコピーします。
- クライアント認証の設定:
- アプリの 全般 タブで、クライアント資格情報 セクションを見つけ、編集 をクリックします。
- トークン要求で所有権の証明 (DPoP) ヘッダーを要求する を無効にします。
- 認証方法として 公開鍵 / 秘密鍵 を選択します。
- 公開鍵の追加: 鍵を追加するには2つのオプションがあります。
- オプションA: Oktaで鍵を生成する(推奨)
- 公開鍵 セクションで、鍵を追加 をクリックします。
- ダイアログで、新しい鍵を生成 を選択します。
- Oktaがすぐに鍵ペアを生成します。秘密鍵をダウンロードまたは保存 し(
private.pem)、安全に保管します。 - 新しく生成された鍵の 鍵ID (KID) をコピーします。
- オプションB: 独自の鍵を使用する
- 以下の
opensslコマンドを使用してローカルで鍵ペアを生成します。
- 以下の
- オプションA: Oktaで鍵を生成する(推奨)
# 2048ビットのRSA秘密鍵を生成
openssl genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits:2048
# 秘密鍵から公開鍵を抽出
openssl rsa -in private.pem -pubout -out public.pem
2. **鍵を追加** をクリックし、**公開鍵** (`public.pem`) の内容をダイアログに貼り付けます。
3. 追加した鍵の **鍵ID (KID)** をコピーします。
- APIスコープの付与: Okta APIスコープ タブに移動し、必要なAPIの権限を 付与 します。
- 管理者ロールの割り当て:
403 Forbiddenエラーを回避するために、管理者ロール タブに移動し、このアプリケーションに スーパー管理者 ロールを割り当てます。
統合の検証
MCPクライアント(Claude Desktop、VS Codeなど)を再起動し、Oktaテナントの管理を依頼します。
Show me the users in my Okta organization
✨ 主な機能
- LLMによるOkta管理: LLMエージェントが自然言語の指示に基づいてOkta環境内で管理タスクを実行できるようにします。
- 安全な認証: 対話型使用のためのデバイス認証グラントと、安全な自動サーバー間通信のための秘密鍵JWTの両方をサポートします。
- Okta管理APIとの統合: 公式のOkta APIを利用して、Okta組織との安全で信頼性の高いやり取りを保証します。
- 拡張可能なアーキテクチャ: 新しい機能や追加のOkta APIエンドポイントのサポートで簡単に拡張できるように設計されています。
- 包括的なツールサポート: ユーザー、グループ、アプリケーション、ポリシーなどの完全なCRUD操作をサポートします。
このMCPサーバーは、OktaのPython SDK を利用してOkta APIと通信し、堅牢でサポート体制の整った統合を保証します。
🛠️ サポートされているツール
ユーザー
| ツール | 説明 | 使用例 |
|---|---|---|
list_users |
Okta組織内のすべてのユーザーをリストします。 | - Show me the users in my Okta org- Find users with 'john' in their name- What users do I have in the Engineering department? |
get_user |
特定のユーザーの詳細情報を取得します。 | - Show me details for user john.doe@company.com- Get information about user ID 00u1234567890- What groups is Jane Smith a member of? |
create_user |
Okta組織内に新しいユーザーを作成します。 | - Create a new user named John Doe with email john.doe@company.com- Add a new employee to the Sales department- Set up a contractor account |
update_user |
既存のユーザーのプロファイル情報を更新します。 | - Update John Doe's department to Engineering- Change the phone number for user jane.smith@company.com- Update the manager for this user |
deactivate_user |
ユーザーを非アクティブ化します。 | - Deactivate the user john.doe@company.com- Disable access for former employee Jane Smith- Suspend the contractor account temporarily |
delete_deactivated_user |
非アクティブ化されたユーザーを永久に削除します。 | - Delete the deactivated user john.doe@company.com- Remove former employee Jane Smith permanently- Clean up old contractor accounts |
get_user_profile_attributes |
サポートされているすべてのユーザープロファイル属性を取得します。 | - What user profile fields are available?- Show me all the custom attributes we can set- List the standard Okta user attributes |
グループ
| ツール | 説明 | 使用例 |
|---|---|---|
list_groups |
Okta組織内のすべてのグループをリストします。 | - Show me the groups in my Okta org- Find groups with 'Engineering' in their name- What security groups do we have? |
get_group |
特定のグループの詳細情報を取得します。 | - Show me details for the Engineering group- How many members are in the Administrators group?- What applications are assigned to Sales? |
create_group |
新しいグループを作成します。 | - Create a new group called DevOps Team- Set up a security group for the Finance department- Add a group for temporary contractors |
update_group |
既存のグループの情報を更新します。 | - Update the description for the Engineering group- Change the name of the Sales group to Revenue Team- Modify the Finance group settings |
delete_group |
グループを削除します(確認が必要)。 | - Delete the old Marketing group- Remove the temporary project group- Clean up unused security groups |
list_group_users |
グループのメンバーであるすべてのユーザーをリストします。 | - Who are the members of the Engineering group?- Show me all administrators- List users in the Finance department |
list_group_apps |
グループに割り当てられたすべてのアプリケーションをリストします。 | - What applications does the Engineering group have access to?- Show apps assigned to Sales team- List all applications for Administrators |
add_user_to_group |
ユーザーをグループに追加します。 | - Add john.doe@company.com to the Engineering group- Give Jane Smith access to the Finance applications- Add the new hire to the Sales team |
remove_user_from_group |
ユーザーをグループから削除します。 | - Remove john.doe@company.com from the Engineering group- Revoke Jane's admin privileges- Remove the contractor from the Finance group |
アプリケーション
| ツール | 説明 | 使用例 |
|---|---|---|
list_applications |
Okta組織内のすべてのアプリケーションをリストします。 | - Show me the applications in my Okta org- Find applications with 'API' in their name- What SSO applications do we have configured? |
get_application |
特定のアプリケーションの詳細情報を取得します。 | - Show me details for the Salesforce application- What are the callback URLs for our mobile app?- Get the client ID for our web application |
create_application |
新しいアプリケーションを作成します。 | - Create a new SAML application for our HR system- Set up a new API service application- Add a mobile app integration |
update_application |
既存のアプリケーションを更新します。 | - Update the callback URLs for our web app- Change the logo for the Salesforce application- Modify the SAML settings for our HR system |
delete_application |
アプリケーションを削除します(確認が必要)。 | - Delete the old legacy application- Remove the unused test application- Clean up deprecated integrations |
activate_application |
アプリケーションをアクティブ化します。 | - Activate the new HR application- Enable the Salesforce integration- Turn on the mobile app for users |
deactivate_application |
アプリケーションを非アクティブ化します。 | - Deactivate the legacy CRM application- Temporarily disable the mobile app- Turn off access to the test environment |
ポリシー
| ツール | 説明 | 使用例 |
|---|---|---|
list_policies |
Okta組織内のすべてのポリシーをリストします。 | - Show me the security policies- What password policies do we have?- List all MFA enrollment policies |
get_policy |
ポリシーの詳細情報を取得します。 | - Show me the details of our password policy- What are the MFA requirements?- Display the sign-on policy for contractors |
create_policy |
新しいポリシーを作成します。 | - Create a new password policy for contractors- Set up MFA requirements for high-risk applications- Add a sign-on policy for remote workers |
update_policy |
既存のポリシーを更新します。 | - Update the password complexity requirements- Modify the MFA policy for executives- Change the session timeout for contractors |
delete_policy |
ポリシーを削除します。 | - Delete the old password policy- Remove the deprecated MFA policy- Clean up unused security policies |
activate_policy |
ポリシーをアクティブ化します。 | - Activate the new password policy- Enable the MFA requirements- Turn on the contractor sign-on policy |
deactivate_policy |
ポリシーを非アクティブ化します。 | - Deactivate the old security policy- Temporarily disable MFA for testing- Turn off the strict password requirements |
list_policy_rules |
特定のポリシーのすべてのルールをリストします。 | - Show me all rules for the password policy- What MFA rules are configured?- List the exceptions in our sign-on policy |
get_policy_rule |
ポリシールールの詳細情報を取得します。 | - Show me the details of the contractor MFA rule- What are the conditions for the VPN access rule?- Display the emergency access rule |
create_policy_rule |
ポリシーに新しいルールを作成します。 | - Add an exception rule for executives- Create a rule for contractor access- Set up emergency access rules for IT admins |
update_policy_rule |
既存のポリシールールを更新します。 | - Update the location restrictions for remote workers- Modify the device trust requirements- Change the risk-based authentication settings |
delete_policy_rule |
ポリシーからルールを削除します。 | - Delete the old contractor exception- Remove the deprecated VPN rule- Clean up unused policy exceptions |
activate_policy_rule |
ポリシールールをアクティブ化します。 | - Activate the new emergency access rule- Enable the contractor restrictions- Turn on the location-based access rule |
deactivate_policy_rule |
ポリシールールを非アクティブ化します。 | - Deactivate the old emergency rule- Temporarily disable location restrictions- Turn off the device trust requirements for testing |
ログ
| ツール | 説明 | 使用例 |
|---|---|---|
get_logs |
Okta組織のシステムログを取得します。 | - Show me recent login attempts- Find failed logins from the past 24 hours- Get authentication logs for user john.doe@company.com |
🔐 認証
Okta MCP ServerはOkta管理APIを使用し、Oktaテナントにアクセスするには認証が必要です。
認証フロー
サーバーは、Oktaとの安全な認証にOAuth 2.0デバイス認証フローを使用するか、ブラウザレス認証に秘密鍵JWTを使用します。資格情報は安全に管理され、平文で露出することはありません。
初期設定
MCPサーバーは、設定に基づいて適切な認証フローを自動的に開始します。
- デバイス認証グラント: 対話型のブラウザベースの認証
- 秘密鍵JWT: クライアント資格情報を使用したブラウザレス認証
⚠️ 重要提示
デバイス認証フローは プライベートクラウド テナントではサポートされていません。プライベートクラウドユーザーは、クライアント資格情報を使用した秘密鍵JWT認証を使用する必要があります。
⚠️ 重要提示
MCPサーバーを使用すると、サブスクリプションプランに応じて管理APIのレート制限が消費されます。詳細については、レート制限ポリシー を参照してください。
🩺 トラブルシューティング
Okta MCP Serverで問題が発生した場合、いくつかのトラブルシューティングオプションが利用可能です。
🐞 デバッグモード
詳細なログを表示するには、デバッグモードを有効にします。
export OKTA_LOG_LEVEL=DEBUG
💡 使用建议
デバッグモードは、接続または認証の問題をトラブルシューティングする際に特に役立ちます。
🚨 一般的な問題
- 認証失敗
- Oktaテナントで正しい権限を持っていることを確認します。
OKTA_ORG_URL、OKTA_CLIENT_ID、OKTA_SCOPESが正しいことを確認します。- アプリケーションに必要なAPIスコープが付与されていることを確認します。
- MCPクライアントがサーバーに接続できない
- インストール後にMCPクライアントを再起動します。
- 設定でサーバーパスが正しいことを確認します。
uvがインストールされており、PATHでアクセス可能であることを確認します。
- APIエラーまたは権限問題
export OKTA_LOG_LEVEL=DEBUGでデバッグモードを有効にします。- Oktaアプリケーションに必要なスコープがあることを確認します。
- アプリケーションに適切な管理者ロールが割り当てられていることを確認します。
- Oktaシステムログで詳細なエラー情報を確認します。
- "Claude's response was interrupted..." エラー
- これは通常、Claudeがコンテキスト長の制限に達したときに発生します。
- より具体的に問い合わせを行い、クエリを簡潔に保つようにします。
- 大きなリクエストを小さな焦点の絞った操作に分割します。
💡 使用建议
ほとんどの接続問題は、サーバーとMCPクライアントの両方を再起動することで解決できます。
📋 デバッグログ
詳細なログを表示するには、デバッグモードを有効にします。
export OKTA_LOG_LEVEL=DEBUG
ログファイルを指定することもできます。
export OKTA_LOG_FILE="/path/to/okta-mcp.log"
👨💻 開発
ソースからのビルド
# リポジトリをクローン
git clone https://github.com/okta/okta-mcp-server.git
cd okta-mcp-server
# 依存関係をインストール
uv sync
# サーバーを直接実行
uv run okta-mcp-server
開発用スクリプト
# デバッグログを有効にして実行
OKTA_LOG_LEVEL=DEBUG uv run okta-mcp-server
# テストを実行
uv run pytest
# 開発モードでインストール
uv pip install -e .
⚠️ 重要提示
このサーバーは Python 3.8以上 と uv が必要です。
🔒 セキュリティ
Okta MCP Serverはセキュリティを最優先しています。
- 資格情報は安全な認証フローを通じて管理されます。
- 機密情報は平文で保存されません。
- 認証にはOAuth 2.0デバイス認証フローまたは秘密鍵JWTを使用します。
- 細かいAPIスコープ権限をサポートします。
- 環境変数を通じた簡単な資格情報管理。
⚠️ 重要提示
セキュリティのベストプラクティスとして、認証プロセス中に要求される権限を常に確認し、セキュリティ要件に沿っていることを確認してください。
⚠️ 重要提示
OktaアプリケーションにAPIスコープを付与する際には、最小権限の原則を常に適用してください。
🧪 セキュリティスキャン
このサーバーや、展開する他のMCP互換サーバーを定期的に、プロトコルレベルのリスクや誤設定を明らかにするために構築されたコミュニティツールでスキャンすることをお勧めします。
これらのスキャナーは、サーバー実装のバグ、ツール定義とライフサイクルのリスク、相互作用とデータフローの弱点、構成または環境のギャップなどの主要な脆弱性クラスにまたがる問題を特定するのに役立ちます。
脆弱性を発見した場合は、責任ある開示プロセス に従ってください。
💬 フィードバックと貢献
このプロジェクトへのフィードバックと貢献を歓迎します!始める前に、以下を参照してください。
- Oktaの一般的な貢献ガイドライン
問題の報告
フィードバックを提供するか、バグを報告するには、問題トラッカーで問題を提起 してください。
脆弱性の報告
セキュリティ脆弱性は、公開のGitHub問題トラッカーで報告しないでください。責任ある開示プロセス に従ってください。
📄 ライセンス
このプロジェクトはApache 2.0ライセンスの下でライセンスされています。詳細は LICENSE ファイルを参照してください。
Oktaとは?
Oktaは独立したトップクラスのIDプロバイダーです。詳細については Why Okta? をご覧ください。
Copyright © 2025-Present, Okta, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
代替品







