enterprise-mcp-gateway
This server is an enterprise MCP gateway that exposes CRM capabilities to AI agents with security, redaction, and auditing.
List and filter customer accounts (
listCustomers)Retrieve full customer details including address, tax ID, and email (
getCustomerDetails)View billing history and payment methods (
getBillingHistory)Query support tickets by customer or priority (
listSupportTickets)Open new support tickets (
createSupportTicket)Enforces role-based access control (RBAC) for tool visibility and execution
Redacts PII, secrets, and sensitive keys from tool responses in real time
Emits structured JSON audit logs with hashed parameters and latency metrics
Supports both stdio and HTTP SSE transports
Dynamically registers tools from OpenAPI/Swagger specs
Allows AI agents to connect to and invoke APIs of Java/Spring Boot enterprise backends through the gateway.
Dynamically creates MCP tools from OpenAPI/Swagger specifications, enabling AI agents to call any compatible backend API.
Enterprise MCP Gateway
๐ 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.
Related MCP server: Nervora
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AI Client (Claude / Cursor / Agent) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ JSON-RPC 2.0 (stdio or SSE)
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Enterprise MCP Gateway (Single Go Binary) โ
โ โ
โ 1. Transport Layer (pkg/mcp/transport) โ
โ - Stdio & HTTP-SSE Transceivers โ
โ 2. Security & Auth Guard (pkg/governance/rbac) โ
โ - Token authentication & least-privilege filtering โ
โ 3. Router & Tool Registry (pkg/mcp/protocol) โ
โ - JSON-RPC 2.0 & MCP handshake engine โ
โ 4. Backend Dispatcher (pkg/connector/openapi) โ
โ - Dynamic OpenAPI 3.0 path/query/body mapper โ
โ 5. Sanitization Engine (pkg/sanitizer/pii) โ
โ - Zero-alloc PII, secret, & JSON key redactor โ
โ 6. Structured Audit Logger (pkg/audit) โ
โ - Cryptographic JSON event trail for SIEM โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Authorized & Sanitized Calls
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Internal Enterprise Services (Java / Go / DBs) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ๐ฆ Quick Start
1. Build from Source
Ensure you have Go 1.24+ installed:
# Clone the repository
git clone https://github.com/goschan/enterprise-mcp-gateway.git
cd enterprise-mcp-gateway
# Build gateway and mock backend server
go build -o bin/mcp-gateway ./cmd/gateway
go build -o bin/mockserver ./cmd/mockserver2. Run the Mock Enterprise Backend (Terminal 1)
./bin/mockserver --port 80813. Run the Gateway with Sample Config (Terminal 2)
Option A: Stdio Mode (Default)
./bin/mcp-gateway --config ./examples/config.yaml --token "agent-support-key"Option B: HTTP Server-Sent Events (SSE) Mode
./bin/mcp-gateway --config ./examples/config.yaml --transport sse --port 80804. Stream Live Audit Logs in Real-Time (Terminal 3)
Follow and format structured audit records as tools execute:
PowerShell (Windows):
Get-Content -Path .\audit.log -Wait -Tail 10 | ForEach-Object {
if ($_ -match '^\s*\{') {
$e = $_ | ConvertFrom-Json
$time = ([DateTime]$e.timestamp).ToLocalTime().ToString("HH:mm:ss")
$statusColor = if ($e.status -eq "SUCCESS") { "Green" } else { "Red" }
$redactColor = if ($e.pii_redacted_count -gt 0) { "Yellow" } else { "DarkGray" }
Write-Host "[$time] " -NoNewline -ForegroundColor DarkGray
Write-Host "[$($e.status)] " -NoNewline -ForegroundColor $statusColor
Write-Host "$($e.tool) " -NoNewline -ForegroundColor Cyan
Write-Host "(Role: $($e.role), Latency: $($e.duration_ms)ms, Redacted: $($e.pii_redacted_count))" -ForegroundColor $redactColor
}
}Bash / Linux / macOS (jq):
tail -f audit.log | jq -c '{time: .timestamp, status: .status, tool: .tool, role: .role, latency_ms: .duration_ms, redacted: .pii_redacted_count}'๐ Verification with Anthropic Official MCP Inspector
You can test and inspect the gateway using Anthropic's official @modelcontextprotocol/inspector:
Test via Stdio:
npx @modelcontextprotocol/inspector ./bin/mcp-gateway --config ./examples/config.yaml --token agent-support-keyTest via SSE:
Start the gateway in SSE mode:
./bin/mcp-gateway --config ./examples/config.yaml --transport sse --port 8080Open the inspector pointing to the SSE endpoint:
npx @modelcontextprotocol/inspector http://localhost:8080/sse
๐ป 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.jsonLinux:
~/.config/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add
enterprise-mcp-gatewayto themcpServersobject:
{
"mcpServers": {
"enterprise-gateway": {
"command": "/absolute/path/to/enterprise-mcp-gateway/bin/mcp-gateway",
"args": [
"--config",
"/absolute/path/to/enterprise-mcp-gateway/examples/config.yaml",
"--token",
"agent-support-key"
]
}
}
}Restart Claude Desktop. The enterprise tools (
listCustomers,getCustomerDetails,createSupportTicket, etc.) will appear with a hammer icon in the prompt interface.
โ๏ธ Configuration Guide (config.yaml)
server:
name: "enterprise-mcp-gateway"
version: "1.0.0"
transport: "stdio" # "stdio" or "sse"
host: "0.0.0.0"
port: 8080
governance:
enabled: true
default_role: "support_agent"
tokens:
"agent-ro-secret": "readonly_agent"
"agent-support-secret": "support_agent"
"admin-master-secret": "admin"
roles:
readonly_agent:
allowed_tools:
- "list*"
- "get*"
support_agent:
allowed_tools:
- "list*"
- "get*"
- "createSupportTicket"
admin:
allowed_tools:
- "*"
sanitizer:
enabled: true
mask_card_numbers: true # Luhn-verified Credit Card masking
mask_ssn: true # US SSN masking
mask_secrets: true # Private keys, AWS keys, JWTs, PATs
sensitive_keys:
- "password"
- "secret"
- "token"
- "apiKey"
- "ssn"
- "creditCard"
custom_regex:
- name: "Internal Employee ID"
pattern: "\\bEMP-[0-9]{6}\\b"
replacement: "[REDACTED-EMP-ID]"
audit:
enabled: true
log_path: "stdout" # "stdout" or path to file e.g. "/var/log/mcp-audit.log"
hash_inputs: true # SHA-256 hashes tool arguments for compliance
connectors:
- name: "enterprise-crm"
type: "openapi"
spec_file: "./examples/crm-openapi.yaml"
base_url: "http://localhost:8081"
headers:
Authorization: "Bearer backend-secret-token"
X-Gateway-Source: "enterprise-mcp-gateway"
timeout_seconds: 15๐งช Testing
Run all unit and end-to-end integration tests:
# Run all unit and integration tests
go test -v ./...
# Run tests with the Go race detector enabled
go test -race ./...๐ณ Docker Deployment
# Build lightweight Docker image
docker build -t enterprise-mcp-gateway:latest .
# Run container in SSE mode
docker run -d -p 8080:8080 -p 8081:8081 enterprise-mcp-gateway:latest --transport sse --port 8080๐ License
MIT License.
Maintenance
Related MCP Servers
AlicenseNot gradedqualityAmaintenanceToolMesh is an Apache-2.0, self-hosted MCP gateway written in Go that sits between AI agents and backend systems. It enforces a fail-closed pipeline on every tool call, including per-tool and per-user authorization, server-side credential injection, structured audit logging, and output policies. APIs are declared in YAML with DADL, turning REST endpoints into MCP tools without writing a custom MCP6Apache 2.0- AlicenseNot gradedqualityCmaintenanceA secure MCP gateway for enterprise AI tool execution, enabling governed invocation of business tools with authentication, RBAC, audit logging, PII redaction, and async processing.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP gateway adding per-tool RBAC, tenant isolation, audit export, and PII redaction to any server.MIT
- AlicenseNot gradedqualityCmaintenanceUniversal MCP router and gateway that bridges LLM agents to OpenAPI, GraphQL, and AWS Lambda services with ISO/IEC 42001 AI governance, RBAC, PII redaction, semantic tool routing, and a web dashboard.MIT
Related MCP Connectors
Self-hosted federated MCP gateway: one OAuth 2.1 MCP server in front of N apps, user-level scopes.
Go MCP server for GitLab: 2 dynamic tools reach 1000+ REST/GraphQL actions. Free/CE, no paid tier.
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BenjaminJ/enterprise-mcp-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server