
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 分