Home›MCP / Tooling›自作MCPサーバで「Tool Poisoning」を試す(Claude Codeを騙してみた)
自作MCPサーバで「Tool Poisoning」を試す(Claude Codeを騙してみた)

自作MCPサーバで「Tool Poisoning」を試す(Claude Codeを騙してみた)The author built a custom MCP memo server to demonstrate Tool Poisoning,…

元記事を読むRead original articleqiita.com(新しいタブで開きます)(opens in a new tab)
AI要点サマリSummary highlight

MCPサーバのツール説明文を意図的に実際の動作と食い違わせる「Tool Poisoning」を検証し、Claude Codeがどう騙されるかを自作のメモ管理サーバで実験した結果をまとめた記事。

The author built a custom MCP memo server to demonstrate Tool Poisoning, showing how misleading tool descriptions can manipulate Claude Code into unintended behavior, highlighting a real security concern in MCP ecosystems.

本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (qiita.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (qiita.com).

要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.

AIエージェントの拡張基盤として急速に普及するMCP(Model Context Protocol)に潜むセキュリティリスクを、自作サーバで実際に検証した記事が公開された。テーマは、ツールの説明文を悪用してAIを意図しない挙動へ誘導する「Tool Poisoning」だ。

MCPは、ClaudeなどのAIモデルを外部のツールやデータソースと接続するための仕組みで、各ツールには「description(説明文)」が付与される。AIはこの説明文を読み取り、どのツールをいつ使うべきかを判断する。裏を返せば、説明文の内容が実際の処理と食い違っていても、AIは記述を信頼して行動してしまう可能性がある。ここに攻撃の余地が生まれる。

筆者は検証のため、シンプルなメモ管理MCPサーバを自作したという。ツールの説明文を意図的に実際の動作とずらすことで、Claude Codeがどのように振る舞うのかを観察したものだ。記事はこの実験の過程と結果をまとめており、説明文という自然言語のメタ情報が、そのままAIの判断を左右する攻撃面になり得ることを具体的に示そうとしている。

Tool Poisoningは、プロンプトインジェクションと並んでMCPエコシステムで議論されるリスクの一つとされる。MCPはAnthropicが提唱したオープンな規格で、対応クライアントやサードパーティ製のサーバが増える一方、信頼できない第三者が公開したサーバをそのまま導入すると、悪意ある説明文を通じて予期しない操作を誘発される懸念が指摘されてきた。今回の検証は、その懸念が机上の議論にとどまらないことを示す一例と言えそうだ。

利用者側の対策としては、導入するMCPサーバの提供元を確認し、ツールの説明文と実装内容が一致しているかを見極める姿勢が重要になると見られる。エージェントに強い権限を与えるほど被害は拡大しかねないため、実行内容の確認や権限の最小化といった基本的な運用が、改めて問われることになりそうだ。

Model Context Protocol (MCP) has quickly become one of the more common ways to connect AI assistants such as Claude to external tools and data, which is exactly why a recent hands-on experiment is worth attention. In a post published on Qiita, an author built a custom memo-management MCP server specifically to test "Tool Poisoning," showing how misleading tool descriptions can manipulate Claude Code into unintended behavior and pointing to a genuine security concern within MCP ecosystems.

The core of the demonstration rests on how MCP actually works. Every tool an MCP server exposes carries a description, a natural-language string that explains what the tool does and when it should be used. Claude reads these descriptions to decide which tool to invoke and at what moment. The author's question was simple: if that description deliberately contradicts what the tool really does, how will Claude behave? To find out, they wrote a small memo server whose stated purpose and real behavior were intentionally out of sync, then observed how Claude Code responded when driven by the misleading metadata.

This class of problem is generally referred to as Tool Poisoning, and it is closely related to prompt injection. The distinction is where the malicious or misleading instruction lives. Rather than planting text in user input or in a document the model reads, the manipulation is embedded in the tool's own description, a field the AI agent trusts and parses but that a human operator may never scrutinize. Because the model treats the description as an authoritative account of the tool's function, a mismatch between what a tool claims to do and what it actually executes appears to be enough to steer the agent toward actions the user did not intend to authorize.

The experiment illustrates why this matters in practice. MCP is designed to let agents act, not merely answer, so a poisoned tool description could plausibly influence which operations an agent runs, in what order, and on what data. In the author's controlled setup the stakes are low, since it is a memo server built for testing. But the same mechanism scales to more consequential tools, such as those that read files, execute commands, or reach external services. The takeaway the article emphasizes is that tool descriptions are part of the trust boundary, not just documentation, and they deserve the same scrutiny given to code.

Some background helps frame the significance. MCP is an open standard introduced by Anthropic in late 2024 to give AI models a consistent interface to tools, files, and services, and it has since been adopted across a range of clients and integrations. Claude Code is Anthropic's agentic coding assistant, which uses MCP-style tool access to work within a developer's environment. As the ecosystem has grown, so has the number of third-party MCP servers a user might install, and that is precisely where a poisoned description becomes a realistic risk: a user may connect a server without reading every tool's metadata, effectively trusting the author's descriptions by default.

Security researchers have documented similar tool-poisoning and prompt-injection risks in agent frameworks, and the general guidance points in a consistent direction. Treat MCP servers like any other third-party dependency, prefer sources you can verify, and where possible review tool descriptions and the underlying implementation before granting access. Approaches such as requiring explicit user confirmation before sensitive actions, sandboxing tool execution, and pinning or auditing server versions are commonly suggested mitigations, though none is a complete fix on its own. The broader lesson is that the flexibility that makes MCP useful, letting natural-language descriptions guide autonomous behavior, is the same flexibility an attacker can exploit.

For readers building or adopting MCP tooling, the article functions less as an exploit disclosure and more as a reminder of an inherent design tension. As agents are given more autonomy and more tools, the metadata that guides their decisions becomes a meaningful attack surface. The author's memo-server test is a compact, reproducible way to see that risk in action, and it suggests that vetting tool descriptions, not just the tools themselves, is likely to be an increasingly important habit as MCP adoption widens.

ポコとTECHガイドPoko & TECH Guide

ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.

  1. ポコPoko「Tool Poisoning」って何?説明文だけでClaude Codeが騙されるの?What is “Tool Poisoning”? Can a description alone really fool Claude Code?
  2. TECHガイドTECH Guide簡単に言うと、ツールの説明と実際の動きをわざと食い違わせることじゃ。記事では、自作のメモ管理MCPサーバで検証したそうじゃよ。Simply put, it means deliberately making a tool’s description differ from its real behavior. According to the article, the author tested this with a custom MCP memo server.
  3. ポコPokoClaude Codeは、どうして説明文を信じちゃうの?それで何が困るのかな。Why does Claude Code trust the description? And what kind of problem does that cause?
  4. TECHガイドTECH Guide記事によれば、Claudeは説明文を読んで、どのツールをいつ使うか判断するんじゃ。説明が偽なら、意図しない動作へ誘導されるのが問題じゃな。The article says Claude reads descriptions to decide which tools to use and when. If a description is misleading, it can steer Claude toward unintended behavior.
  5. ポコPokoなるほど、便利そうな説明でも、実際の動きが同じとは限らないんだね。MCPの安全性に関わる話なんだ!Got it—even if a description sounds useful, the tool may behave differently. So this is a real MCP security issue!
  6. TECHガイドTECH Guideその理解でよいぞ。見どころは、ツールの説明だけでなく、実際の動作との一致をどう確かめるかという点じゃな。Exactly. The key question raised by the article is how to verify that a tool’s actual behavior matches its description.
記事情報・収集記録Article details & collection record
出典Source
Qiita MCPコミュニティCommunity
公開日時 (JST)Published (JST)
収集日時 (JST)Collected (JST)
配信形式Format
ブログBlog
原文言語Source language
JA
重要度の位置づけImportance in this lane
MediumMedium priority(MCP / Tooling 122件中、同等以上 112件)(112 of 122 MCP / Tooling entries are equal or higher)
出典の平均重要度(掲載直近 30 件・最大 30 件)Source average (last 30 listed, up to 30)
2.1 / 31=情報 · 2=中 · 3=高1=Info · 2=Medium · 3=High
情報の寿命Half-life
中期 (チュートリアル)Medium-term (tutorial)

🔗MCP / Tooling の他の記事More from MCP / Toolingもっと見る →View more →

ページ上部へScroll to top