auth0-mcp-server

Official

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Enables management of Auth0 resources through natural language, including creating and updating applications, resource servers (APIs), actions, forms, and accessing Auth0 logs. Allows performing operations like creating new Auth0 apps, deploying actions, and checking authentication logs.

📚ドキュメント• 🚀はじめに• 💻サポートされているツール• 💬フィードバック

MCP (モデル コンテキスト プロトコル)は、Anthropic によって導入されたオープン プロトコルであり、大規模な言語モデルが外部ツール、リソース、またはリモート サービスと通信する方法を標準化します。

**⚠ ベータ版機能に関するお知らせ:**この機能は現在ベータ版です。機能が不安定になったり、変更されたりする可能性があるため、ツールを呼び出す際はご注意ください。

Auth0 MCPサーバーはLLMおよびAIエージェントと統合されており、自然言語を使用してAuth0のさまざまな管理操作を実行できます。例えば、ClaudeにAuth0の管理操作を実行するよう指示するだけで済みます。

  • 新しいAuth0アプリを作成し、ドメインとクライアントIDを取得する

  • JWTトークンを生成するための新しいAuth0アクションを作成してデプロイする

  • Auth0 ログで 192.108.92.3 IP アドレスからのログインを確認できますか?

🚀 はじめに

前提条件:

Auth0 MCPサーバーをインストールする

Auth0 MCPサーバーをインストールし、お好みのMCPクライアントで動作するように設定してください。-- --toolsパラメータで、利用可能なツールを指定します(指定しない場合はデフォルトで*になります)。

すべてのツールを備えたClaudeデスクトップ

npx @auth0/auth0-mcp-server init

読み取り専用ツールを備えたClaudeデスクトップ

npx @auth0/auth0-mcp-server init --tools 'auth0_list_*,auth0_get_*'

ウィンドサーフィン

npx @auth0/auth0-mcp-server init --client windsurf

カーソル

npx @auth0/auth0-mcp-server init --client cursor

ツールへのアクセスが制限されている

npx @auth0/auth0-mcp-server init --client cursor --tools 'auth0_list_applications,auth0_get_application'

その他のMCPクライアント

Auth0 MCP サーバーを他の MCP クライアントと一緒に使用するには、この構成をクライアントに手動で追加し、再起動して変更を有効にします。

{ "mcpServers": { "auth0": { "command": "npx", "args": ["-y", "@auth0/auth0-mcp-server", "run"], "capabilities": ["tools"], "env": { "DEBUG": "auth0-mcp" } } } }

利用可能なツールを制御するには、args配列に--tools '<pattern>'を追加してください。推奨されるパターンについては、セキュリティのベストプラクティスをご覧ください。

Auth0で認証する

ブラウザが自動的に開き、OAuth 2.0デバイス認証フローが開始されます。Auth0アカウントにログインし、要求された権限を付与してください。

[!NOTE] 認証情報はシステムのキーチェーンに安全に保存されます。必要に応じて、キーチェーン管理ツールを使って保存状況を確認することもできます。詳しくは認証をご覧ください。

統合を確認する

MCPクライアント(Claude、Windsurf、Cursorなど)を再起動し、Auth0テナントの管理を依頼します。

🛠️ サポートされているツール

Auth0 MCP サーバーは、Claude が Auth0 テナントと対話するための次のツールを提供します。

アプリケーション

道具説明使用例
auth0_list_applicationsAuth0テナント内のすべてのアプリケーションを一覧表示するか、名前で検索します- Show me all my Auth0 applications - Find applications with 'api' in their name - What applications do I have in my Auth0 tenant?
auth0_get_application特定のAuth0アプリケーションの詳細を取得する- Show me details for the application called 'Customer Portal' - Get information about my application with client ID abc123 - What are the callback URLs for my 'Mobile App'?
auth0_create_application新しいAuth0アプリケーションを作成する- Create a new single-page application called 'Analytics Dashboard' - Set up a new native mobile app called 'iOS Client' - Create a machine-to-machine application for our background service
auth0_update_application既存のAuth0アプリケーションを更新する- Update the callback URLs for my 'Web App' to include https://staging.example.com/callback - Change the logout URL for the 'Customer Portal' - Add development environment metadata to my 'Admin Dashboard' application

リソースサーバー

道具説明使用例
auth0_list_resource_serversAuth0テナント内のすべてのリソースサーバー(API)を一覧表示する- Show me all the APIs in my Auth0 tenant - List my resource servers - What APIs have I configured in Auth0?
auth0_get_resource_server特定のAuth0リソースサーバーの詳細を取得する- Show me details for the 'User API' - What scopes are defined for my 'Payment API'? - Get information about the resource server with identifier https://api.example.com"
auth0_create_resource_server新しいAuth0リソースサーバーを作成する(API)- Create a new API called 'Inventory API' with read and write scopes - Set up a resource server for our customer data API - Create an API with the identifier https://orders.example.com"
auth0_update_resource_server既存のAuth0リソースサーバーを更新する- Add an 'admin' scope to the 'User API' - Update the token lifetime for my 'Payment API' to 1 hour - Change the signing algorithm for my API to RS256

アクション

道具説明使用例
auth0_list_actionsAuth0テナント内のすべてのアクションを一覧表示する- Show me all my Auth0 actions - What actions do I have configured? - List the actions in my tenant
auth0_get_action特定のAuth0アクションの詳細を取得する- Show me the code for my 'Enrich User Profile' action - Get details about my login flow action - What does my 'Add Custom Claims' action do?
auth0_create_action新しいAuth0アクションを作成する- Create an action that adds user roles to tokens - Set up an action to log failed login attempts - Create a post-login action that checks user location
auth0_update_action既存のAuth0アクションを更新する- Update my 'Add Custom Claims' action to include department information - Modify the IP filtering logic in my security action - Fix the bug in my user enrichment action
auth0_deploy_actionAuth0アクションをデプロイする- Deploy my 'Add Custom Claims' action to production - Make my new security action live - Deploy the updated user enrichment action

ログ

道具説明使用例
auth0_list_logsAuth0テナントからのログを一覧表示する- Show me recent login attempts - Find failed logins from the past 24 hours - Get authentication logs from yesterday - Show me successful logins for user john@example.com
auth0_get_logIDで特定のログエントリを取得する- Show me details for log entry abc123 - Get more information about this failed login attempt - What caused this authentication error?

フォーム

道具説明使用例
auth0_list_formsAuth0テナント内のすべてのフォームを一覧表示する- Show me all my Auth0 forms - What login forms do I have configured? - List the custom forms in my tenant
auth0_get_form特定のAuth0フォームの詳細を取得する- Show me the details of my 'Corporate Login' form - What does my password reset form look like? - Get the configuration for my signup form
auth0_create_form新しいAuth0フォームを作成する- Create a new login form with our company branding - Set up a custom signup form that collects department information - Create a password reset form with our logo
auth0_update_form既存のAuth0フォームを更新する- Update the colors on our login form to match our new brand guidelines - Add a privacy policy link to our signup form - Change the logo on our password reset form
auth0_publish_formAuth0フォームを公開する- Publish my updated login form - Make the new signup form live - Deploy the password reset form to production

🔒 ツールアクセスに関するセキュリティのベストプラクティス

Auth0 MCPサーバーを構成する際には、セキュリティのベストプラクティスに従い、特定のニーズに基づいてツールへのアクセスを制限することが重要です。サーバーは、AIアシスタントがアクセスできるツールを制御できる柔軟な構成オプションを提供します。

サーバーの起動時に--toolsフラグを使用してツールへのアクセスを簡単に制限できます。

# Enable only read-only operations npx @auth0/auth0-mcp-server run --tools 'auth0_list_*,auth0_get_*' # Limit to just application-related tools npx @auth0/auth0-mcp-server run --tools 'auth0_*_application*' # Restrict to only log viewing capabilities npx @auth0/auth0-mcp-server run --tools 'auth0_list_logs,auth0_get_log' # Run the server with all tools enabled npx @auth0/auth0-mcp-server run --tools '*'

このアプローチには、いくつかの重要な利点があります。

  1. 強化されたセキュリティ: 利用可能なツールを必要なものだけに制限することで、潜在的な攻撃対象領域を減らし、Auth0 テナントへの意図しない変更を防止します。
  2. パフォーマンスの向上:AIアシスタントに提供するツールの数を減らすと、実際にはパフォーマンスが向上します。モデルが多くのツールにアクセスできる場合、どのツールを使用するかを判断するためにコンテキストウィンドウをより多く使用します。ツールセットを絞り込むことで、より迅速かつ関連性の高い応答が得られます。
  3. リソースベースのアクセス制御: 特定のニーズに基づいて、異なるツール セットを使用して MCP サーバーの異なるインスタンスを構成できます。開発環境ではフル アクセスが必要になる場合がありますが、運用環境では読み取り操作のみに制限できます。
  4. 簡素化された監査: ツールが限られているため、AI アシスタントを通じて実行された操作を追跡しやすくなります。

ほとんどのユースケースでは、必要最小限のツールセットから始め、必要に応じて追加します。これは、セキュリティの基本的なベストプラクティスである「最小権限の原則」に準拠しています。

🕸️ 建築

Auth0 MCP サーバーはモデル コンテキスト プロトコルを実装しており、Claude は次のことが可能になります。

  1. 利用可能なAuth0ツールのリストをリクエストする
  2. パラメータを使用して特定のツールを呼び出す
  3. Auth0 Management APIから構造化されたレスポンスを受信する

サーバーは、認証、リクエストの検証、Auth0 管理 API との安全な通信を処理します。

[!NOTE] サーバーは、Claude Desktop に接続するローカル プロセスとして動作し、Auth0 資格情報を公開することなく安全な通信を可能にします。

🔐 認証

Auth0 MCP サーバーは Auth0 管理 API を使用し、Auth0 テナントにアクセスするために認証が必要です。

初期設定

MCP サーバーを認証するには:

npx @auth0/auth0-mcp-server init

これにより、デバイス認証フローが開始され、Auth0 アカウントにログインして使用するテナントを選択できるようになります。

[!IMPORTANT] initコマンドは、次の場合に必ず実行する必要があります。

  • MCPサーバーを初めてセットアップする場合
  • 前回のセッションからログアウトしました
  • 別のテナントに切り替えたい
  • トークンの有効期限が切れました

セッション管理

現在の認証セッションに関する情報を表示するには:

npx @auth0/auth0-mcp-server session

ログアウト

セキュリティのベストプラクティスとして、セッションを終了するときは常に logout コマンドを使用してください。

npx @auth0/auth0-mcp-server logout

これにより、認証トークンがシステム キーチェーンから適切に削除されます。

認証フロー

サーバーはAuth0による安全な認証のためにOAuth 2.0デバイス認証フローを使用しています。認証情報はシステムのキーチェーンに安全に保存され、プレーンテキストで公開されることはありません。

🩺 トラブルシューティング

Auth0 MCP サーバーで問題が発生した場合、問題の診断と解決に役立ついくつかのトラブルシューティング オプションが利用できます。

利用可能なすべてのコマンドとオプションを調べてトラブルシューティングを開始します。

npx @auth0/auth0-mcp-server help

🚥 操作モード

🐞 デバッグモード

  • より詳細なログ
  • 環境変数を設定して有効にする: export DEBUG=auth0-mcp

[!TIP] デバッグ モードは、接続または認証の問題をトラブルシューティングするときに特に役立ちます。

🔑 スコープの選択

サーバーは初期化中に対話型のスコープ選択インターフェイスを提供します。

  • インタラクティブ選択:矢印キーで移動し、スペースバーで選択を切り替えます
  • デフォルトのスコープなし: デフォルトでは、セキュリティを最大限に高めるためにスコープは選択されていません。
  • Glob パターンのサポート: パターンを使用して複数の関連するスコープをすばやく選択します。
    # Select all read scopes npx @auth0/auth0-mcp-server init --scopes 'read:*' # Select multiple scope patterns (comma-separated) npx @auth0/auth0-mcp-server init --scopes 'read:*,create:clients,update:actions'

[!NOTE] 選択したスコープによって、MCP サーバーが Auth0 テナントで実行できる操作が決まります。

⚙️ 構成

その他の MCP クライアント:

Auth0 MCP サーバーを他の MCP クライアントと一緒に使用するには、次の構成をクライアントに追加し、再起動して変更を有効にします。

{ "mcpServers": { "auth0": { "command": "npx", "args": ["-y", "@auth0/auth0-mcp-server", "run"], "capabilities": ["tools"], "env": { "DEBUG": "auth0-mcp" } } } }

[!注記]
必要に応じて、または npx init コマンドの実行中に予期しないエラーが発生した場合は、手動で更新できます。

🚨 よくある問題

  1. 認証失敗
    • Auth0テナントに適切な権限があることを確認してください
    • npx @auth0/auth0-mcp-server initで再初期化してみてください
  2. クロードはサーバーに接続できません
    • インストール後にClaude Desktopを再起動します
    • ps aux | grep auth0-mcpでサーバーが稼働していることを確認します。
  3. APIエラーまたは権限の問題
    • export DEBUG=auth0-mcpでデバッグモードを有効にする
    • Auth0トークンの権限と有効期限を確認してください
    • 特定のスコープで再初期化: npx @auth0/auth0-mcp-server init --scopes 'read:*,update:*,create:*'
    • 特定の操作が失敗した場合、必要なスコープが不足している可能性があります

[!TIP] ほとんどの接続の問題は、サーバーと Claude Desktop の両方を再起動することで解決できます。

📋 デバッグログ

詳細なログを表示するにはデバッグ モードを有効にします。

export DEBUG=auth0-mcp

Claude Desktop から詳細な MCP クライアント ログを取得します。

# Follow logs in real-time tail -n 20 -F ~/Library/Logs/Claude/mcp*.log

高度なトラブルシューティングには、MCP Inspector を使用します。

npx @modelcontextprotocol/inspector -e DEBUG='auth0-mcp' @auth0/auth0-mcp-server run

詳細な MCP サーバー ログを取得するには、サーバーをデバッグ モードで実行します。

DEBUG=auth0-mcp npx @auth0/auth0-mcp-server run

👨‍💻 開発

ソースから構築

# Clone the repository git clone https://github.com/auth0/auth0-mcp-server.git cd auth0-mcp-server # Install dependencies npm install # Build the project npm run build # Initiate device auth flow npx . init # Configure your MCP client(Claude Desktop) with MCP server path npm run local-setup # Restart MCP client, in this case claude desktop app

[!NOTE] このサーバーにはNode.js v18 以上が必要です。

🔒 セキュリティ

Auth0 MCP サーバーはセキュリティを最優先します。

  • 認証情報はシステムの安全なキーチェーンに保存されます
  • 機密情報はプレーンテキストで保存されません
  • 認証にはOAuth 2.0デバイス認証フローを使用します
  • デフォルトでは権限(スコープ)は要求されません
  • インタラクティブなスコープ選択により、付与する権限を正確に選択できます。
  • 関連するスコープを素早く選択するための glob パターンのサポート (例: read:* )
  • 不要になった場合は、 logoutコマンドで簡単にトークンを削除できます。

[!IMPORTANT] セキュリティのベストプラクティスとして、セッションの終了時やテナントの切り替え時には、必ずnpx @auth0/auth0-mcp-server logout使用してください。これにより、認証トークンがシステムキーチェーンから適切に削除されます。

[!CAUTION] 認証プロセス中に要求されるアクセス許可がセキュリティ要件に準拠しているかどうかを常に確認してください。

匿名化された分析情報の開示

このMCPサーバーの使用中は、匿名化されたデータポイントが収集されます。このデータには、MCPのバージョン、オペレーティングシステム、タイムスタンプ、その他個人を特定しない技術的な詳細が含まれます。

Auth0 はこのデータを活用してこのツールの使用状況をより深く理解し、ユーザーにとって最も重要な機能、拡張機能、修正を優先します。

この収集をオプトアウトするには、 AUTH0_MCP_ANALYTICS環境変数をfalseに設定します。

💬 フィードバックと貢献

このプロジェクトへのフィードバックと貢献をお待ちしております。始める前に、以下をご確認ください。

問題の報告

フィードバックを提供したり、バグを報告するには、問題追跡システムで問題を報告してください。

脆弱性報告

セキュリティ上の脆弱性は、GitHubの公開課題トラッカーには報告しないでください。セキュリティ上の問題を開示するための手順については、責任ある開示プログラムをご覧ください。

📄 ライセンス

このプロジェクトはMITライセンスの下で提供されています。詳細はLICENSEファイルをご覧ください。

Auth0とは何ですか?

-
security - not tested
A
license - permissive license
-
quality - not tested

Auth0 MCPサーバーはLLMやAIエージェントと統合されており、自然言語を使ってAuth0の様々な管理操作を実行できます。例えば、Claudeに「新しいAuth0アプリを作成して、ドメインとクライアントIDを取得してください」と指示するだけで、操作が完了します。

  1. Install the Auth0 MCP Server
    1. Authenticate with Auth0
      1. Verify your integration
        1. 🛠️ Supported Tools
          1. Applications
          2. Resource Servers
          3. Actions
          4. Logs
          5. Forms
          6. 🔒 Security Best Practices for Tool Access
        2. 🕸️ Architecture
          1. 🔐 Authentication
            1. Initial Setup
            2. Session Management
            3. Logging Out
            4. Authentication Flow
          2. 🩺 Troubleshooting
            1. 🚥 Operation Modes
            2. ⚙️ Configuration
            3. 🚨 Common Issues
          3. 📋 Debug logs
            1. 👨‍💻 Development
              1. Building from Source
            2. 🔒 Security
              1. Anonymized Analytics Disclosure
                1. 💬 Feedback and Contributing
                  1. Reporting Issues
                  2. Vulnerability Reporting
                2. 📄 License
                  1. What is Auth0?
                    ID: lz9vzh2y5r