Shield MCP
@modelShield
关于 Shield MCP
A shield for logging, deep debug and sanitization for MCP servers at development stage
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"shieldmcp": {
"command": "python",
"args": [
"-m",
"venv",
"venv"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Shield MCP?
Shield MCP is a security middleware for Model Context Protocol (MCP) servers. It enhances security and monitoring capabilities—like access control, output sanitization, and rate limiting—without modifying the official MCP SDK. It is designed for developers who want to secure and audit MCP tool calls following best practices.
How to use Shield MCP?
Install via pip (Python 3.8+ required), then import the decorator and helpers. Decorate your MCP tool functions with @secure_tool, passing an allowed tools whitelist, an optional sanitizer function, user/session IDs, and rate limit configuration. The middleware automatically enforces access control, sanitizes outputs, logs calls, and applies rate limits.
Key features of Shield MCP
- Whitelist-based tool access control
- Configurable result sanitization (text length, sensitive patterns)
- Structured audit logging via structlog
- Token‑bucket rate limiting (requests per minute, burst size)
- Standardized error handling and formatting
- Compatible with MCP Inspector
Use cases of Shield MCP
- Restrict which tools a client can call in a multi‑user MCP server
- Sanitize tool outputs to remove credit card numbers or email addresses
- Log all tool invocations with user and session IDs for compliance
- Prevent abuse by throttling requests with configurable rate limits
- Add a security layer to existing MCP tools without modifying their code
FAQ from Shield MCP
What are the system requirements for Shield MCP?
Python 3.8 or higher and pip. Virtualenv is recommended for development.
Does Shield MCP modify the MCP SDK?
No. It works as a middleware layer that intercepts and secures tool calls without altering the official SDK.
What logging library does Shield MCP use?
It uses structlog for structured, production‑ready audit logging.
Can I use Shield MCP with the MCP Inspector?
Yes, Shield MCP is designed to be fully compatible with the MCP Inspector tool.
How do I define which tools are allowed?
Pass a set of allowed tool names to the @secure_tool decorator’s allowed_tools parameter. Only tools in that whitelist will be permitted.
其他 分类下的更多 MCP 服务器
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
AutoBrowser MCP
autobrowser-aiBrowser MCP is a Model Context Provider (MCP) server that allows AI applications to control your browser
ghidraMCP
LaurieWiredMCP Server for Ghidra
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
评论