mcp-data-gateway
mcp-data-gateway
把 AI 客户端交给一个人,MCP 很容易。把它交给一个团队——分析师、人事运营、负责人,各自有权访问不同的系统——服务器就需要一个它能捍卫的答案:谁在调用,他们可以碰什么?这个仓库就是那个答案,精简到承重部分。
一个 allows() 决策驱动一切。它过滤每个身份能看到的内容,并且拒绝他们无论如何尝试的内容,因此工具列表从来不是调用者和系统之间唯一的屏障。授权默认关闭:缺失或损坏的存储会拒绝所有人,除了一个存在于代码中的破窗超级用户,正是为了确保没有存储故障能把修复存储的人锁在外面。每次调用——以及每次拒绝——都会落为一条有大小上限的审计记录。
内置的观点:
授权逐个命名工具。Globs 在加载时被拒绝,因为某人下季度发布的写入工具绝不能继承进入只读身份。
连接两个系统的工具声明两者,调用者需要两者。泄露的是读取,而不是名称。
一个快照测试固定工具表面,另一个将写入表面保持在恰好一个工具。
SQL 门提供快速、具体的拒绝——但真正的围栏是数据库身份权限。你可以绕过文本扫描。你无法绕过 IAM。
快速开始
python3 -m unittest discover -s tests # no dependencies
python3 -m gateway.demo # three identities, one denial on the record
pip install mcp && GATEWAY_IDENTITY=analyst@example.com python3 -m gateway.serverRelated MCP server: mcp-policy-gateway
深入阅读
docs/design.md 用捕获的输出逐步讲解各个部分。docs/rules.md 为每条规则给出理由和测试。docs/lineage.md 记录诚实的限制和来源。
2026 年 8 月从生产网关中提炼而成,每条规则都是通过艰难方式赢得的。提交日志从提炼开始。
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for mandates, delegation, policy-gated execution, credential grants, and audit.
Identity, authorization, audit trails, and revocable permissions for AI agents accessing MCP tools.
- gatewayOAuthai.sealgate
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA least-privilege enforcement proxy for MCP servers. It sits between MCP clients and upstream servers, enforcing tool policies, hiding denied tools, requiring human approval for risky actions, and providing a structured audit trail.MIT
- AlicenseNot gradedqualityAmaintenanceAn authorizing reverse proxy for MCP servers that enforces per-call policy rules on tool arguments with audit logging, dry-run, and rate limiting.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnforces deterministic security policies as an inline firewall for MCP server tool calls, with AST-based validation, cryptographic audit logging, and CLI-based evaluation and verification.MIT
- AlicenseNot gradedqualityBmaintenanceEnables developers to scaffold secure-by-default MCP servers with deny-all permissions, typed tool stubs, and pre-wired audit hooks, while enforcing security posture through CI.3 npmMIT