
Enterprise Mcp Gateway
io.github.BenjaminJ由 GitHub 账号 BenjaminJ 发布v1.0.0更新于 Oct 24, 2026
Production-grade MCP Gateway in Go with RBAC, in-flight PII redaction, and audit logging.
概览
一个自托管的 Go MCP 网关,把企业后端暴露为工具,并提供基于角色的工具权限、PII 脱敏和 JSON 审计日志。
- 可以做什么
- 从 OpenAPI 3.0 或 Swagger 规范自动注册 MCP 工具,并把调用转发到 CRM 接口、Java/Go 微服务和数据库等后端,README 中示例工具包括列出客户、查询客户详情和创建支持工单。按令牌到角色的规则限制每个调用方可见和可调用的工具。在工具响应到达模型前,对信用卡号、SSN、邮箱、电话、AWS 密钥、JWT、GitHub 令牌及自定义正则进行脱敏。输出结构化 JSON 审计记录,包含调用方身份、工具名、参数哈希、延迟和脱敏计数。支持面向桌面客户端的 stdio 传输,以及面向共享或分布式部署的 HTTP SSE 传输。
- 适用场景
- 适用于组织希望在 AI 助手与内部 API 之间建立统一受管控入口,并需要按角色控制工具权限、遮蔽 PII 和保留审计轨迹的场景。也适合已用 OpenAPI 规范描述后端、希望无需编写胶水代码即可生成工具的团队。
- 运行要求
- 以本地进程方式运行,需用 Go 1.24 或更高版本从源码构建,或使用 Docker 镜像;未发布任何软件包。需要一份 YAML 配置文件,列出令牌、角色、脱敏规则、审计设置和 OpenAPI 连接器规范,并需要可访问的后端服务。令牌通过命令行参数传入,后端凭据写在配置文件的连接器请求头中。
安装
在 SourceWeft 中
- 打开 控制台中的 Enterprise Mcp Gateway,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Enterprise MCP Gateway
[CI Status] [Last Commit] [Go Version] [MCP Version] [Glama Score] [Security] [License]
Production-grade, high-performance Model Context Protocol (MCP) Gateway in Go.
A secure, audited, and PII-sanitized bridge connecting AI agents (Claude Desktop, Cursor, Antigravity, LangGraph) to enterprise backends (OpenAPI, Java/Spring Boot, Go microservices, relational databases).
[enterprise-mcp-gateway Glama Card]
[Enterprise MCP Gateway Live Demo]
Live Demo: AI Agent querying CRM with in-flight PII & card redaction (left) while the Gateway streams structured JSON audit logs in real-time (right).
🚀 Key Features
- ⚡ Blazing Fast & Lightweight: Single static Go binary (<25MB resident memory footprint, sub-millisecond routing overhead, zero external runtime dependencies).
- 🛡️ High-Performance PII & Secret Redaction: Real-time stream and JSON-key masking (Credit Cards with Luhn checksum validation, SSNs, emails, phone numbers, AWS keys, JWTs, GitHub PATs, and custom regex rules) before tool responses reach LLMs.
- 🔐 Role-Based Tool Governance (RBAC): Token-to-role resolution that limits tool visibility in
tools/listand enforces execution permissions duringtools/call. - 🔌 Dynamic OpenAPI / Swagger Connector: Instantly registers validated MCP tools directly from OpenAPI 3.0/Swagger YAML or JSON specs without writing backend glue code.
- 📜 Structured JSON Audit Logging: Emits tamper-resistant, structured JSON logs containing caller identity, tool invoked, SHA-256 hashed parameters, execution latency, and PII redaction metrics.
- 🔄 Dual Transport Support: Fully compliant JSON-RPC 2.0 engine supporting both standard
stdio(for Claude Desktop / Cursor) and HTTP Server-Sent Events (SSE) for distributed microservices.
🏗️ Architecture
📦 Quick Start
1. Build from Source
Ensure you have Go 1.24+ installed:
2. Run the Mock Enterprise Backend (Terminal 1)
3. Run the Gateway with Sample Config (Terminal 2)
Option A: Stdio Mode (Default)
Option B: HTTP Server-Sent Events (SSE) Mode
4. Stream Live Audit Logs in Real-Time (Terminal 3)
Follow and format structured audit records as tools execute:
PowerShell (Windows):
Bash / Linux / macOS (jq):
🔍 Verification with Anthropic Official MCP Inspector
You can test and inspect the gateway using Anthropic's official @modelcontextprotocol/inspector:
Test via Stdio:
Test via SSE:
- Start the gateway in SSE mode:
- Open the inspector pointing to the SSE endpoint:
💻 Claude Desktop Integration
To connect Claude Desktop to your enterprise systems through enterprise-mcp-gateway:
-
Open your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add
enterprise-mcp-gatewayto themcpServersobject:
- Restart Claude Desktop. The enterprise tools (
listCustomers,getCustomerDetails,createSupportTicket, etc.) will appear with a hammer icon in the prompt interface.
⚙️ Configuration Guide (config.yaml)
🧪 Testing
Run all unit and end-to-end integration tests:
🐳 Docker Deployment
📄 License
MIT License.
来源:README.md,提交 76bbf14
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分