> 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/automatically-handle-mcp-rules-in-ide.md).

# IDEでMCPルールを自動的に処理する

このオプションを有効にすると、Aikido は LLM および AI の使用に必要な MCP ルールを自動で管理します。

これは次と連携して動作します [Aikido MCP](https://help.aikido.dev/ide-plugins/aikido-mcp) MCP 対応ツールを使用しているときに、AI 生成コードが Aikido によってスキャンされるようにします。

#### この機能の内容

Aikido は、AI によって生成、追加、変更されたコードに対するセキュリティスキャンを強制する 1 つの MCP ルールを自動的に追加し、維持します。MCP ルールの手動設定は不要です。

#### Aikido が管理する MCP ルール

有効にすると、Aikido は次のルールを管理します。

```
---
alwaysApply: true
always_on: true
trigger: always_on
applyTo: "**"
description: Aikido MCP セキュリティルール
---

# セキュリティのベストプラクティス

- プロンプトで明示的に実行しないよう指示されていない限り、生成された、追加された、および変更されたファーストパーティコードに対しては、常に aikido_full_scan を実行してください。
- スキャナーには常にファイルの完全な内容を渡してください。
- スキャンで新しく生成または変更されたコードにセキュリティ上の問題が見つかった場合は、スキャン結果と Aikido が提供する修正内容を使用して問題を修正してください。
- 修正を適用した後は、aikido_full_scan を再度実行して、問題が正常に解決され、かつ新たな問題が導入されていないことを確認してください。
- コードに未解決または新たに導入されたセキュリティ問題が残らず、検査に合格するまで、修正と再スキャンのサイクルを繰り返してください。
```

#### Gitignore

このルールを適用するために、Aikido はリポジトリ内に MCP ルールファイルを作成または更新する場合があります。このファイルは常に .gitignore に追加されるとは限りません。

Aikido にルールをコミットせずに完全に管理させたい場合は、.gitignore に追加してください。Git でルールを確認またはバージョン管理したい場合は、.gitignore から外してください。

#### このオプションを無効にするタイミング

MCP ルールを手動で管理したい場合、または Aikido にルールファイルを自動的に変更してほしくない場合は、このオプションを無効にしてください。


---

# 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/automatically-handle-mcp-rules-in-ide.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.
