mcp-guardian
A gateway that enforces permissions, sanitization, approval, and audit for AI agent MCP tool calls, with a policy engine and local proxy CLI.
README
MCP Guardian
AI Agent 调用 MCP 工具前的权限、脱敏、审批与审计网关。
仓库:https://github.com/Ailian0206/mcp-guardian
状态
Week 1:策略引擎与最小 Gateway。决策源见 docs/product-plan.md。
包结构
apps/web Dashboard / 落地页(Week 3 升级 Next.js)
packages/gateway 本地 MCP 代理 CLI
packages/policy-engine 策略评估
packages/shared 共享类型
packages/demo-servers 红队演示 MCP Server
policies/ 默认 fail-closed 策略
开发
pnpm install
pnpm lint && pnpm typecheck && pnpm test
pnpm build
# A1/A2:允许工作区读 / 拒绝系统写
pnpm guardian eval --policy policies/default.fail-closed.yaml \
--server demo-fs --tool read_file --args '{"path":"/workspace/a.txt"}'
bash scenarios/a1-a2.sh
Cursor 接入示例
先 pnpm build,再在 MCP 配置中指向 Gateway(示例):
{
"mcpServers": {
"guardian-demo-fs": {
"command": "node",
"args": [
"/ABS/PATH/mcp-guardian/packages/gateway/dist/cli.js",
"start",
"--config",
"/ABS/PATH/mcp-guardian/mcp-guardian.config.yaml"
]
}
}
}
下游 demo-fs 由配置文件启动;危险写路径会被策略 deny。
文档
| 文档 | 说明 |
|---|---|
| 产品总方案 | 决策源 |
| 四周推进计划 | Week 0–5 |
| 架构说明 | 包边界与错误码 |
| GitHub 流程 | 分支 / PR / 合并 |
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.