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

# VS CodeとCopilotからDidit MCPサーバーに接続

> VS CodeのGitHub Copilotエージェントモードに Didit MCPサーバーを追加します。ワンクリックインストールリンク、mcp.json、code CLIから設定でき、APIキーは不要で Didit にサインインできます。

> [card] [VS CodeにDiditを追加](https://vscode.dev/redirect/mcp/install?name=didit\&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.didit.me%2Fmcp%22%7D)
>
> サーバー`didit`（HTTP、mcp.didit.me/mcp）のVS Codeインストールフローを開きます。Installをクリックし、Diditでサインインします。

VS Codeは、インストールリンク、`mcp.json`のエントリー、または1つの`code`コマンドを使って、GitHub Copilotのエージェントモードをホスト型のDidit MCPサーバー（`https://mcp.didit.me/mcp`）に接続します。その後VS Codeがサインインを求めるので、ブラウザで**Log in with Didit**をクリックします。APIキーをコピーする必要はありません。

独自のボタンやREADMEで使うインストールリンクは次のとおりです：

```text theme={null}
https://vscode.dev/redirect/mcp/install?name=didit&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.didit.me%2Fmcp%22%7D
```

リンク先は`vscode:mcp/install?{"type":"http","url":"https://mcp.didit.me/mcp","name":"didit"}`です。VS Code Insidersの場合は、同じクエリ文字列を付けて`https://insiders.vscode.dev/redirect/mcp/install?…`を使用します。

***

## 方法別のセットアップ

> [tab] インストールリンク
>
> 1. [**Didit を VS Code に追加 →**](https://vscode.dev/redirect/mcp/install?name=didit\&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.didit.me%2Fmcp%22%7D) をクリックし、ブラウザーから VS Code を開きます。
> 2. VS Code に `didit` サーバーが表示されます。**インストール** をクリックします。
> 3. VS Code からサインインを求められたら許可し、ブラウザーで **Log in with Didit** を完了します。

> [tab] mcp.json
>
> 1つのワークスペースに対して設定する場合は、`.vscode/mcp.json` を追加します。
>
> ```json theme={null}
> {
>   "servers": {
>     "didit": {
>       "type": "http",
>       "url": "https://mcp.didit.me/mcp"
>     }
>   }
> }
> ```
>
> VS Code は、他のクライアントが使う `mcpServers` キーではなく `servers` を使用します。完全な `/mcp` URL を指定してください。サーバーは OAuth メタデータをそのパスで公開しています。

> [tab] コマンドパレット
>
> 1. コマンドパレットで **MCP: Add Server** を実行します。
> 2. **HTTP** を選択し、`https://mcp.didit.me/mcp` を貼り付けて、名前を `didit` にします。
> 3. 保存先（ユーザープロファイルまたはワークスペース）を選択し、求められたらサインインします。

> [tab] コマンドライン
>
> `code` コマンドを使って、ユーザープロファイルにサーバーを追加します。
>
> ```bash theme={null}
> code --add-mcp '{"name":"didit","type":"http","url":"https://mcp.didit.me/mcp"}'
> ```
>
> `Added MCP servers: didit` と表示され、ユーザーの `mcp.json` にエントリーが書き込まれます。

> [!NOTE]
>
> **設定にAPIキーは不要です。** サーバーはOAuth 2.1とPKCEを使用し、**あなた**として動作します。サインイン時に承認した組織でのみ、あなたの役割に付与された権限の範囲で動作します。詳しくは [認証](https://docs.didit.me/ja/integration/mcp/authentication.md) をご覧ください。

***

## 動作確認

Copilot Chatを開き、**Agent**モードに切り替えて、次のように尋ねます：

```text theme={null}
Use the Didit MCP server to call didit_context_get and list my organizations and applications.
```

Copilotから`didit_context_get`の呼び出しを許可するよう求められます。その後、組織とそのアプリケーションの一覧が表示されます。

> [!TIP]
>
> **ツールが多すぎますか？** Didit にサインインしたユーザーには、100個を大幅に超えるツールが提供されます。Copilot からツール数について警告が表示された場合は、チャット入力欄のツールピッカーを開き、作業に必要な Didit のツールグループ（たとえばセッションやワークフロー）だけを残してください。

***

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

* **インストールリンクを開いても何も起きない。** 代わりに **mcp.json** または **Command line** タブを使用してください。
* **サインインがループする、または失敗する。** まず、既定のブラウザーで [business.didit.me](https://business.didit.me) にログインしてください。その後 **MCP: List Servers** を実行し、`didit` を選択して再起動してください。
* **ツールが `missing_scope` で応答する。** その組織内の役割には、この権限がありません。[役割と権限](https://docs.didit.me/ja/integration/mcp/authentication.md#役割と権限) を参照してください。

***

## 次のステップ

> [card] [Cursorに接続](https://docs.didit.me/ja/integration/mcp/cursor.md)
>
> Cursor用のワンクリックインストールリンクとmcp.json。

> [card] [OpenAI Codexに接続](https://docs.didit.me/ja/integration/mcp/codex.md)
>
> Codex CLIとIDE拡張機能向けの1つのコマンドです。

> [card] [ツールリファレンス](https://docs.didit.me/ja/integration/mcp/tools.md)
>
> エージェントが呼び出せるすべてのツールを、ツールごとに説明します。

> [card] [その他のクライアント](https://docs.didit.me/ja/integration/mcp/installation.md)
>
> Windsurf、Zed、任意のMCPクライアント、およびセルフホストについて説明します。


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