servers
servers copied to clipboard
Tool: AgentShield MCP Guard — runtime security for MCP tool calls
Summary
AgentShield provides a security guard for MCP servers with two integration patterns:
Pattern 1: Decorator (for new/existing servers)
from mcp.server import Server
from agentshield_mcp import MCPShield
app = Server("my-server")
shield = MCPShield(api_key="your-key")
@app.tool()
@shield.guard
async def query_database(query: str) -> str:
return db.execute(query)
Pattern 2: Stdio Proxy (zero changes to existing servers)
Sits between MCP client and server, intercepts every tools/call JSON-RPC message:
MCP Client → AgentShield Proxy → Real MCP Server
What it checks
- Trust level of the data source triggering the tool call
- Intent consistency (does this tool call make sense in context?)
- 22 built-in security rules (injection, exfiltration, escalation)
- Audit trail with Merkle hash chain
Decision mapping
| AgentShield | MCP Behavior |
|---|---|
| ALLOW | Tool proceeds |
| BLOCK | JSON-RPC error -32001 with reason |
| REQUIRE_CONFIRMATION | Blocked with descriptive message |
Links
- MCP Guard code
- AgentShield (Apache 2.0, 342 tests)
Fail-open by default — if AgentShield is unreachable, tool calls proceed normally.
Thanks for your interest in contributing! We are no longer accepting issues to add server or framework listings to this README. Please publish your server to the MCP Server Registry instead — you can follow the quickstart guide to get listed.