> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/ai-totsru/aikido-mcp/github-copilot.md).

# GitHub Copilot

Aikido MCPプラグインは、AikidoのセキュリティエンジンをAIコーディングツールに接続します。生成されたAIコードを作成直後に、自動で脆弱性やハードコードされたシークレットをスキャンします。

AIアシスタントは自分の出力をレビューできますが、そのレビューは完璧ではありません。Aikidoは、実証済みのスキャンルールを用いて、生成されたすべてのスニペットを確認する、信頼性が高く一貫したセキュリティ層を追加します。

**Aikido MCPを使う理由**

* コミットされる前の、すべてのAI生成スニペットに対する決定論的で独立したセキュリティチェック
* AI支援ワークフローにおける脆弱性とハードコードされたシークレットの即時検出と修正
* リアルタイムのフィードバックにより、AI主導の開発を標準でより安全にします

**利用可能なツール**

* **aikido\_full\_scan**: ローカルのコードファイルを脆弱性（SAST）とハードコードされたシークレットについてスキャンします。
* **aikido\_issues\_list**: Aikidoフィードからセキュリティ問題を取得します。
  * スコープで絞り込み: `repo_name`, `cloud_name`, `vm_name`, `domain_name`, `container_name`, `workspace_name` または `team_name`
  * 必要に応じて、リポジトリのスコープを単一ブランチに絞り込むには `repo_branch_name`
  * 1つ以上の問題タイプを選択してください: `sast`, `leaked_secret`, `iac`, `open_source`, `cloud`, `cloud_instance`, `docker_container`, `malware`, `eol`, `mobile`, `surface_monitoring`, `scm_security`, `license`, `ai_pentest` , `code_audit`
  * 次の設定で結果をページ送りします: `ページ` （0始まり）
  * 各問題を、タイトル、種類、重大度、および修復手順とともに返します
  * 次のフィルターを選んでSLAで絞り込みます: `out_of_sla` または `due_soon`
* **aikido\_ignore\_issue**: フィード内のセキュリティ問題を無視します。必要なのは `issue_id` と `理由`.
* **aikido\_login**: Aikidoのサインインフローを開始します。サインインURLを返すか、すでにサインイン済みであることを確認します。

{% hint style="info" %}
すべてのMCPツールがデフォルトで有効になっているわけではありません。管理者は次で有効にできます: [権限ページ](https://app.aikido.dev/settings/integrations/ide/mcp/permissions) 全員向けに
{% endhint %}

## インストール

### IDE

Aikido VSCode IDEプラグインは [拡張パック](/docs/docs-ja/ai-totsru/ide-plugins-overview/features/aikido-expansion-packs.md) 追加機能を提供するために使用します。Aikido MCP for Github Copilot はこれらの拡張パックの1つで、別途セットアップすることなく、簡単かつ迅速にインストールできます。下のリンク先ページで、有効化方法を確認してください。

{% content-ref url="/pages/7bf87efea46db267176141a31304f64620fb5493" %}
[VS Code IDE](/docs/docs-ja/ai-totsru/ide-plugins-overview/vs-code-plugin.md)
{% endcontent-ref %}

### Copilot IDEプラグインとの統合

{% stepper %}
{% step %}
**IDE設定にMCP構成を追加する**

Github Copilotプラグインの設定に移動し、 `mcp.json` ファイルを開きます。Aikidoサーバーを追加してください:

```json
{
  "servers": {
    "aikido": {
      "command": "npx",
      "args": ["-y", "@aikidosec/mcp@latest"]
    }
  }
}
```

{% endstep %}

{% step %}
**認証**

初回使用時に、Copilot に実行するよう依頼してください `aikido_login`。ブラウザのリンクが返されるので、それを開いて Aikido にログインしてください。ログインが完了すると、トークンは安全に保存されます。
{% endstep %}

{% step %}
**カスタムプロンプト指示を追加する**

あなたの `AGENTS.md` ファイル、またはエージェントに新しいツールを使うよう指示するカスタム指示を追加します。

```
変更を確定する前に、新規または変更済みのコードを `aikido_full_scan` でスキャンしてください。このセキュリティチェックは必須です。
```

{% endstep %}
{% endstepper %}

{% hint style="info" %}
ブラウザでのログインができない CI/CD やヘッドレス環境については、次を参照してください [トークン認証](/docs/docs-ja/ai-totsru/aikido-mcp/token-authentication.md).
{% endhint %}

### Copilot Cloud Agents との統合

GitHub Copilot コーディングエージェントは、実行中に MCP サーバーからツールを呼び出せます。以下の手順に従って、リポジトリに Aikido MCP を設定してください。設定はリポジトリごとに行います。

{% hint style="warning" %}
Copilot Cloud Agents はヘッドレス環境で実行され、トークンが必要です。ここではブラウザベースのログインは利用できません。Aikido の Personal Access Token が必要です。参照: [トークン認証](/docs/docs-ja/ai-totsru/aikido-mcp/token-authentication.md) 作成方法について。
{% endhint %}

すでに VS Code で Aikido MCP を使用している場合、 [その構成を再利用できます](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp#reusing-your-mcp-configuration-from-visual-studio-code) そして、リポジトリ設定にトークンを追加するだけです。

#### 設定手順

{% hint style="info" %}
GitHub の完全な手順（JSON の貼り付け先、検証の仕組み、Copilot 環境でシークレットがどのように公開されるか）については、 [GitHub のガイドをご覧ください](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp).
{% endhint %}

{% stepper %}
{% step %}
**リポジトリ設定に MCP 構成を追加する**

GitHub リポジトリで、Settings → Copilot → Coding agent に移動し、MCP の JSON 設定を貼り付けます。

Aikido MCP の設定例（npx 経由の local/stdio）:

{% tabs %}
{% tab title="Copilot Cloud Agent" %}

```json
{
  "mcpServers": {
    "aikido": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@aikidosec/mcp@latest"],
      "tools": ["aikido_full_scan", "aikido_sast_scan", "aikido_secrets_scan"],
      "env": {
        "AIKIDO_API_KEY": "COPILOT_MCP_AIKIDO_API_KEY"
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}
**Copilot 環境にトークンを追加する**

Github Copilot は、名前が `COPILOT_MCP_`

で始まる場合にのみ、シークレット/変数を MCP 設定に公開します

`次のようなシークレットを作成します:` COPILOT\_MCP\_AIKIDO\_API\_KEY
{% endstep %}

{% step %}
**カスタムプロンプト指示を追加する**

\= あなたの Aikido トークン [GitHub Copilot が MCP サーバーを使用するようにするには、リポジトリの指示を](https://docs.github.com/en/copilot/how-tos/configure-custom-instructions/add-repository-instructions).

次のように指示を追加します:

```
変更を確定する前に、新規または変更済みのコードを `aikido_full_scan` でスキャンしてください。このセキュリティチェックは必須です。
```

{% endstep %}

{% step %}
**検証**

これで [構成を確認できます](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp#validating-your-mcp-configuration) Copilot にファイルの1つをセキュリティスキャンするよう依頼して確認できます。
{% endstep %}
{% endstepper %}

**コードをスキャン中**

* 「Aikidoを使ってこのファイルをセキュリティ上の問題についてスキャンしてください」
* 「コミットする前に、ステージング済みの変更をAikidoでスキャンしてシークレットを確認してください」
* 「Aikidoで、私が今編集したファイルをスキャンして、それらをその `payments-api` リポジトリ」

**リポジトリ別に問題を確認**

* 「Aikidoの重大な問題をすべて表示して `payments-api`"
* 「漏えいしたシークレットをすべて一覧表示して `frontend-web` Aikidoで」
* 「Aikidoはどのオープンソースの脆弱性を `api-gateway`?"
* 「SASTとIaCの問題を表示して `infra-core` Aikidoで」

**クラウド、VM、またはコンテナ別に問題を確認**

* 「Aikidoのクラウドの問題をすべて一覧表示して `prod-aws`"
* 「マルウェアの検出結果を表示して `web-server-01` Aikidoで」
* 「どのサポート終了ソフトウェアが、Aikidoによって `nginx-proxy` コンテナで実行されているのか？」
* 「Aikidoの表面監視の問題を表示して `example.com` Aikidoで」

**組み合わせたワークフロー**

* 「Aikidoを使って現在の変更をスキャンし、同じリポジトリ内の既存の重大な問題を表示してください」
* 「このPRをAikidoでチェックし、リポジトリ内の未解決SAST問題と比較してください」


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/docs/docs-ja/ai-totsru/aikido-mcp/github-copilot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
