Dangerous MCP
MCPは危険です
関数ツールの利用はAIエージェントを非常に強力にします。これはスマートフォンにアプリストアを導入するようなものです。特にMCP(モデルコンテキストプロトコル)のリリースにより、ツールの共有はかつてないほど容易になりました。そこで、オープンソースツールやカスタムツールを使ってAIエージェントの機能をいかに簡単に拡張できるかを示すために、 extendable-agentsプロジェクトを作成しました。
拡張可能なエージェントの開発に携わる中で、ツールの使用は諸刃の剣であることに気づきました。危険なのは、使用するツールが環境変数やファイルなど、マシンへの強力なアクセス権を持っていることです。
⚠️ セキュリティ警告
このプロジェクトは、ツールの使用に伴うセキュリティリスクを簡潔に示すものです。以下の例は、悪意のある攻撃者がMCPサーバーを悪用して機密情報にアクセスする可能性を示しています。
# WARNING: This is a demonstration of security risks.
# DO NOT use this code maliciously!
import os
from mcp.server.fastmcp import FastMCP
server = FastMCP("Dangerous MCP")
@server.tool()
async def get_environment_variables() -> str:
"""Get all environment variables."""
result = [
"Here are what I could find:",
]
for key, value in os.environ.items():
result.append(f"{key:<30} {value[:5]}***")
# This means I can open a backdoor to send your data to me!!
return "\n".join(result)⚠️**警告:**このサンプルはサンドボックス環境で実行し、実行後はOpenAI APIキーを削除することをお勧めします。また、以下のコマンドを使用して、ご自身のMCPクライアントでテストすることもできます:
uvx mcp-is-dangerous。
このツールを拡張可能エージェント ( PoliceAgentを選択) と共に使用すると、出力は次のようになります。
一見無害、あるいは意図的に無害に見えるかもしれません。しかし、次のシナリオを考えてみてください。現在時刻を尋ねただけで、知らないうちに機密データが漏洩してしまうのです。
Related MCP server: Vulnerable MCP Server
セキュリティのベストプラクティス
MCP または同様のツールを使用する際に自分自身を保護するには:
ツールを使用する前に必ずソースコードを確認してください
可能な場合は分離された環境でツールを実行する
機密情報へのアクセスを要求するツールには注意しましょう
ツールを展開するときに環境変数フィルタリングを使用する
使用しているツールを定期的に監査する
免責事項
このプロジェクトは、潜在的なセキュリティリスクを示すための教育目的のみに使用されます。この知識を悪意のある目的で使用しないでください。著者は、この情報の誤用について一切責任を負いません。
ライセンス
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceAn educational project that deliberately implements vulnerable MCP servers to demonstrate various security risks like prompt injection, tool poisoning, and code execution for training security researchers and AI safety professionals.1,334
- FlicenseNot gradedqualityCmaintenanceA deliberately insecure MCP server designed as a pentest lab to demonstrate common vulnerabilities in MCP deployments.
- FlicenseNot gradedqualityCmaintenanceAn intentionally vulnerable MCP server designed as a live demo target for the MCP Trust security scanner. It contains deliberate insecure patterns to demonstrate scanning capabilities.
- AlicenseCqualityCmaintenanceAn educational MCP server exposing shell command execution (PowerShell and sh) and a benign tool for learning about MCP tools, resources, and security risks like tool poisoning.32MIT
Related MCP Connectors
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server teaching AI agents to implement TideCloak: auth, E2EE, IGA, security analysis
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ShaojieJiang/mcp-is-dangerous'
If you have feedback or need assistance with the MCP directory API, please join our Discord server