> ## Documentation Index
> Fetch the complete documentation index at: https://developers.authlete.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> ### Authlete versions
> Authlete 3.0 is the current version. Unless the user says they use another version, answer for Authlete 3.0 using the 3.x documentation.
> Documentation for Authlete 2.x (pages under `/v2/` and `/ja/v2/`) is for the legacy version. Refer to it only when the user is on Authlete 2.x.
>
> ### Authlete architecture
> Authlete is a backend engine for OAuth 2.0 and OpenID Connect processing. End users and client applications do not call it directly; the service provider's authorization server and API server call Authlete's APIs. Authlete handles protocol processing and token, client, and service management, while the service provider owns the OAuth/OIDC endpoints and user authentication.
> See [Architecture](https://developers.authlete.com/get-started/introduction-to-authlete/architecture.md).
>
> ### Concepts
> If the user is new to Authlete, read these pages first:
> - [Request and Response](https://developers.authlete.com/get-started/concepts/request-and-response.md): Core API requests pass the client's request parameters as-is, and responses return `resultCode`, `action`, and `responseContent`.
> - [Action Handling](https://developers.authlete.com/get-started/concepts/action-handling.md): Branch on `action`, never on `resultCode`, and map each action to the HTTP response your server returns.
> - [Two-Step API Calls](https://developers.authlete.com/get-started/concepts/two-step-api-calls.md): Actions such as `INTERACTION` are completed with a second call (`/auth/authorization/issue` or `/auth/authorization/fail`) linked by a `ticket`.
> - [Management API Overview](https://developers.authlete.com/get-started/concepts/overview.md): The Management API configures services, manages clients, and operates issued tokens, separately from the protocol flows handled by the Core API.
> - [API Authentication](https://developers.authlete.com/get-started/concepts/authentication.md): Authlete APIs use bearer tokens: a Service Access Token (one service) or an Organization Token (the whole organization).

# AI エージェント連携（llms.txt / MCP）

> Authlete のドキュメントを、llms.txt、Markdown 版のページ、MCP サーバーを通じて AI コーディングツールに読み込ませる方法を説明します。認証や事前の申請は不要です。

このドキュメントサイトは、AI コーディングツールから直接読み込める形式でも公開しています。形式は [llms.txt](https://llmstxt.org/)、各ページの Markdown 版、[MCP（Model Context Protocol）](https://modelcontextprotocol.io/)サーバーの 3 つです。これらの形式を利用すると、API 仕様、設定、実装ガイドをツール側から検索・参照できます。認証や事前の申請は不要です。

<Note>
  実装時の仕様確認だけでなく、リリース後のエラー調査や動作確認にも利用できます。
</Note>

## URL によるドキュメントの読み込み

AI エージェントにドキュメントを読み込ませるには、次のいずれかの URL を渡します。ツール側の設定は不要です。

| 用途 | URL |
| - | - |
| ページ一覧の取得 | `https://developers.authlete.com/llms.txt` |
| 全ページの本文を 1 ファイルで取得 | `https://developers.authlete.com/llms-full.txt` |
| ページ単位で Markdown 版を取得（例: アクションハンドリング） | `https://developers.authlete.com/ja/get-started/concepts/action-handling.md` |

* `llms.txt` には、英語と日本語、3.x と 2.x それぞれのインデックスへのリンクがあります。
* `llms-full.txt` に含まれるのは、英語の 3.x のページのみです。サイズは約 2.6 MB です。日本語や 2.x のページは、`llms.txt` のインデックスから必要なページを読み込んでください。
* ページの URL の末尾に `.md` を付けると、そのページの Markdown 版を取得できます。日本語のページは、パスの先頭に `/ja/` が付きます（上の表の例を参照）。

## ページメニューの操作

各ページ上部の「ページをコピー」の横にあるメニューでは、次の操作ができます。

| 操作 | 内容 |
| - | - |
| 「ページをコピー」 | ページを Markdown でコピーします |
| 「マークダウンで表示」 | ページを Markdown で表示します |
| 「ChatGPTで開く」「Claudeで開く」 | ページについて質問する会話を開始します |
| 「MCPサーバーをコピー」 | MCP サーバーの URL をコピーします |
| 「Cursorに接続」 | Cursor に MCP サーバーをインストールします |

## MCP サーバーへの接続

MCP に対応したツールでは、MCP サーバーのエンドポイント `https://developers.authlete.com/mcp` を登録します。登録すると、ドキュメントの検索と取得をツール側から直接実行できます。

```text theme={null}
https://developers.authlete.com/mcp
```

<Warning>
  MCP サーバーには Authlete 2.x のドキュメントも含まれます。`version` を指定しない場合、検索結果に 2.x のページが含まれることがあります。利用している Authlete のバージョンを AI エージェントに伝え、`search_authlete_documentation` の `version` を指定させてください（Authlete 3.0 の場合は `3.x`）。
</Warning>

トランスポートは HTTP です。認証は不要です。設定の書き方はツールによって異なるため、詳細は利用するツールのドキュメントを確認してください。次の例では、サーバー名を `authlete-docs` として登録します。

<CodeGroup>
  ```bash Claude Code theme={null}
  claude mcp add --transport http authlete-docs https://developers.authlete.com/mcp
  ```

  ```json Cursor (.cursor/mcp.json) theme={null}
  {
    "mcpServers": {
      "authlete-docs": {
        "url": "https://developers.authlete.com/mcp"
      }
    }
  }
  ```

  ```json VS Code (.vscode/mcp.json) theme={null}
  {
    "servers": {
      "authlete-docs": {
        "type": "http",
        "url": "https://developers.authlete.com/mcp"
      }
    }
  }
  ```

  ```toml Codex (~/.codex/config.toml) theme={null}
  [mcp_servers.authlete-docs]
  url = "https://developers.authlete.com/mcp"
  ```
</CodeGroup>

`.cursor/mcp.json`, `.vscode/mcp.json` などのプロジェクト単位の設定ファイルをリポジトリに含めると、プロジェクトのメンバー全員に同じ設定を配布できます。

### MCP サーバーのツール

MCP サーバーは、次の 3 つのツールを提供します。

| ツール | 内容 |
| - | - |
| `search_authlete_documentation` | ドキュメントを検索します。`language`（デフォルト値は `en`、日本語は `ja`）と `version`（`3.x`, `2.x` のいずれか）で結果を絞り込めます。 |
| `query_docs_filesystem_authlete_documentation` | `rg`, `cat`, `tree` などの読み取り専用コマンドで、ページや OpenAPI 仕様を読み取ります。 |
| `submit_feedback` | 誤り、古い記述、不足のあるページを Authlete のドキュメントチームに報告します。 |

## AI エージェントの回答の扱い

* 現行バージョンは Authlete 3.0 です。Authlete 2.x のドキュメント（`/v2/` 以下のページ）は、旧バージョンを利用している方向けです。
* ドキュメントは随時更新されます。AI エージェントの回答をそのまま判断の根拠とせず、該当ページの記載を確認してください。
* ドキュメントに記載が見つからない場合は、推測で判断せず[お問い合わせ](https://www.authlete.com/ja/contact/)ください。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.