> ## Documentation Index
> Fetch the complete documentation index at: https://auth0-feat-init-gt-translations.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Auth0 Model Context Protocol (MCP) Server を AIクライアントと連携します。

# Auth0 Model Context Protocol (MCP) Server の利用を始める

<Card title="始める前に">
  * システムに [Node.js v18 以降](https://nodejs.org/en/download) をインストールしておきます。
  * 管理者権限を持つ有効な [Auth0 アカウント](https://auth0.com/)を作成しておきます。
  * 少なくとも 1 つのサポート対象の MCP クライアント (たとえば [Claude Desktop](https://claude.ai/download)、[Cursor](https://www.cursor.com/downloads)、または [Windsurf](https://www.windsurf.com/editor)) をインストールしておきます。
</Card>

[Auth0 Model Context Protocol (MCP) Server](/docs/ja-jp/get-started/auth0-mcp-server) をインストールし、よく使われている複数の [MCP クライアント](https://modelcontextprotocol.io/clients) と連携することで、チームやユーザーの活用の幅を広げましょう。

<h2 id="installation-and-configuration">
  インストールと設定
</h2>

ターミナルで次のいずれかのコマンドを実行して、Auth0 MCP Serverをインストールします。

<h3 id="for-claude-desktop-default">
  Claude Desktop の場合 (デフォルト)
</h3>

```bash lines theme={null}
npx @auth0/auth0-mcp-server init
```

<h3 id="for-cursor">
  Cursor の場合
</h3>

```bash lines theme={null}
npx @auth0/auth0-mcp-server init --client cursor
```

<h3 id="for-windsurf">
  Windsurf向け
</h3>

```bash lines theme={null}
npx @auth0/auth0-mcp-server init --client windsurf
```

<h3 id="other-mcp-clients">
  その他のMCPクライアント
</h3>

Auth0 MCP Serverを他のMCPクライアントで使用するには、この設定をクライアントに手動で追加し、変更を反映させるために再起動してください。

```json lines theme={null}
{
  "mcpServers": {
    "auth0": {
      "command": "npx",
      "args": ["-y", "@auth0/auth0-mcp-server", "run"],
      "capabilities": ["tools"],
      "env": {
        "DEBUG": "auth0-mcp"
      }
    }
  }
}
```

<h2 id="authenticate-with-auth0">
  Auth0 で認証する
</h2>

<Tooltip tip="OAuth 2.0: 認可プロトコルとワークフローを定義する認可フレームワーク。" cta="用語集を見る" href="/docs/ja-jp/glossary?term=OAuth+2.0">OAuth 2.0</Tooltip> のデバイス<Tooltip tip="OAuth 2.0: 認可プロトコルとワークフローを定義する認可フレームワーク。" cta="用語集を見る" href="/docs/ja-jp/glossary?term=authorization+flow">認可フロー</Tooltip>を開始するため、ブラウザーが自動的に開きます。Auth0 アカウントにログインし、求められたアクセス許可を付与してください。

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  資格情報はシステムのキーチェーンに安全に保存されます。必要に応じて、キーチェーン管理ツールで保存を確認できます。
</Callout>

<h2 id="verify-your-integration">
  連携を確認する
</h2>

<h3 id="claude-desktop">
  Claude Desktop
</h3>

1. 新しくインストールした Auth0 MCP Server が確実に認識されるよう、Claude Desktop を再起動します。
2. Claude Desktop で **Tools** アイコンをクリックし、Auth0 のツール (たとえば `auth0_create_action` や `auth0_delete_application`) が **Available MCP Tools** の一覧に表示されていることを確認します。
3. Claude Desktop との会話を開始し、Auth0 テナントの管理についてサポートを求めます。

<h3 id="cursor">
  Cursor
</h3>

1. 新しくインストールした Auth0 MCP Server を Cursor が認識するよう、Cursor を再起動します。
2. Cursor で **設定 > MCP** を開き、**MCP Servers** の一覧に **Auth0** が表示されていることを確認します。
3. Cursor との会話を開始し、Auth0 テナントの管理についてサポートを依頼します。

<h3 id="windsurf">
  Windsurf
</h3>

1. 新しくインストールした Auth0 MCP Server を Windsurf で認識させるため、Windsurf を再起動します。
2. Windsurf で **Windsurf 設定 > Cascade** を開き、**Model Context Protocol (MCP) Servers** の一覧に **Auth0** が表示されていることを確認します。
3. Windsurf との会話を開始し、Auth0 テナントの管理についてサポートを依頼します。

<h2 id="common-troubleshooting-steps">
  一般的なトラブルシューティング手順
</h2>

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  接続に関する問題の多くは、Auth0 MCP Server を設定し、MCP クライアントを再起動することで解決できます。
</Callout>

<h4 id="get-command-line-help">
  コマンドラインヘルプを表示:
</h4>

次のコマンドで、利用可能なコマンドの一覧と使用例を確認できます。

```bash lines theme={null}
npx @auth0/auth0-mcp-server help
```

<h4 id="authentication-issues">
  認証に関する問題
</h4>

Auth0 テナントで適切な権限が設定されていることを確認し、次の方法で再初期化をお試しください：

```bash lines theme={null}
npx @auth0/auth0-mcp-server init
```

<h4 id="connection-failures">
  接続エラー:
</h4>

1. 次のコマンドで、MCP サーバーが実行中であることを確認します。

   ```ps lines theme={null}
   ps aux | grep auth0-mcp
   ```

2. サーバーが実行中であることを確認したら、AI クライアントを再起動します。

<h4 id="claude-cant-connect-to-the-server-error">
  Claude がサーバーに接続できないエラー:
</h4>

1. インストール後に Claude Desktop を再起動します。
2. 次のコマンドで、サーバーが実行中であることを確認します。

   ```ps lines theme={null}
   ps aux | grep auth0-mcp
   ```

<h4 id="api-errors">
  API エラー：
</h4>

Auth0のトークンの権限と有効期限を確認してください。詳細なログを確認するには、デバッグモードを有効にしてください (以下を参照) 。

<h2 id="debug-configuration-issues">
  設定の問題をデバッグする
</h2>

<h4 id="enable-debug-mode">
  デバッグモードを有効にする
</h4>

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

```bash lines theme={null}
export DEBUG=auth0-mcp
```

<h4 id="debug-client-logs">
  MCPクライアントログのデバッグ
</h4>

Claude Desktopで詳細なMCPクライアントログを取得できます：

```bash lines theme={null}
# リアルタイムでログを追跡する
tail -n 20 -F ~/Library/Logs/Claude/mcp*.log
```

Auth0 MCP Server をデバッグモードで実行すると、MCP サーバーの詳細なログを取得できます:

```bash lines theme={null}
DEBUG=auth0-mcp npx @auth0/auth0-mcp-server run
```

<h4 id="advanced-debugging-using-mcp-inspector">
  MCP Inspector を使用した高度なデバッグ
</h4>

高度なトラブルシューティングには、MCP Inspector を使用してください。

```bash wrap lines theme={null}
npx @modelcontextprotocol/inspector -e DEBUG='auth0-mcp' @auth0/auth0-mcp-server run__text in bold__
```

<h2 id="next-steps">
  次のステップ
</h2>

[Auth0 Model Context Protocol (MCP) Server Tools Reference](/docs/ja-jp/get-started/auth0-mcp-server/auth0-mcp-tools-reference)にアクセスしてAuth0 MCP Serverの全機能を確認するか、実践的な例やユースケースについてはAuth0 Model Context Protocol Server Guidesをご覧ください。
