Enterprise-MCP-Router
Exports routed tool schemas into Amazon Bedrock toolConfig format so Bedrock-based agents can use the filtered enterprise tool set.
Exports routed tools to CrewAI for use in CrewAI agent workflows.
Exports routed tools to Hugging Face smolagents so those agents can call the filtered enterprise tool set.
Integrates with Informatica IICS to validate ELT/ETL pipeline freshness, row counts, and SLA status before unlocking downstream data retrieval.
Exports routed tools as LangGraph ToolNode-compatible tools for use in LangGraph agent workflows.
Emits OpenTelemetry trace spans for tool routing, approvals, and incident telemetry, enabling observability of agent actions.
Provides a PostgreSQL connector with parameterized queries and one-click table snapshots/rollbacks for safe agent-driven data access.
Provides a guarded Snowflake connector for AI agents, including SELECT-only SQL execution, blocking of destructive queries, and Cortex Search access to Snowflake data.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Enterprise-MCP-Router (v2.3.0)
Fail-Closed Model Context Protocol (FastMCP / JSON-RPC 2.0 + SSE) Gateway, 120-Tool Hybrid BM25 + BAAI/bge-small-en-v1.5 Router, AST SQL Guard & Executive Light-Mode Control Plane
Enterprise-MCP-Router addresses tool-bloat, privilege escalation, SQL injection, and auditability gaps when connecting LLM agents to relational stores, warehouses, and execution APIs:
Fail-Closed Identity & Group-Separated HITL Governance:
Server lifespan startup raises
RuntimeErrorunlessROUTER_JWT_SECRET,ROUTER_JWT_PUBLIC_KEY_PEM, orROUTER_JWKS_JSONis configured, orROUTER_DEV_MODE=1is explicitly enabled.All
/api/v1/*and/mcp/jsonrpcendpoints fail closed (401) for unauthenticated callers unlessROUTER_DEV_MODE=1.Demo API keys (
ak-*-demo) andPOST /api/v1/auth/tokenare disabled by default; even in dev mode,/api/v1/auth/tokenis capped to theplatform_operatorsgroup and cannot mintsuper_adminorhitl_approvers.Verifies both RS256 (OIDC / JWKS
kidlookup) and HS256 JWTs, enforcingexp,sub,iss, andaudclaims.Mutating tool calls require a single-use, TTL-expiring ticket bound to the canonical SHA-256 hash of
tool_name + arguments(hitl_ticket_arguments_hash_mismatchblocks post-approval argument mutation).Approvers must be distinct (
reviewer != requested_by), hold an approver role, and belong to the dedicatedhitl_approversgroup (reviewer_missing_approver_group-> HTTP403), preventing dual-account operator self-approval (mallory+sock_puppet).
AST-Based SQL & Table Allow-List Guard:
Parses SQL via
sqlglot(Snowflake / PostgreSQL / SQLite dialects) using a single-SELECT/UNIONAST shape allow-list.Walks every
exp.TableAST node (coveringFROM,JOIN,UNION/UNION ALL, subqueries, and CTE bodies) to enforce schema and table allow-lists (PORTFOLIO_GOLD.FUNDS,ACCOUNTS, etc.), enforce theschemaparameter directly against AST tables, reject unexpected catalogs or unqualified Snowflake tables, and block CTE table shadowing (WITH FUNDS AS (...)->cte_table_shadowing_blocked).Rejects
SELECT INTO, locking clauses (exp.Lock), and unsafe functions outside an allow-list (SYSTEM$*,pg_sleep,pg_read_file,lo_import), while preserving safe quoted column identifiers (SELECT "update" FROM ...) and pairing local execution withsqlite3.set_authorizer(READ_ONLY).
Role-Filtered Semantic Router (
BAAI/bge-small-en-v1.5+ Okapi BM25):Measures serialized JSON Schema tokens across all 120 tools (33,453 tokens over
{"name","description","inputSchema"}).Filters candidates by caller RBAC role before scoring (
analystcallers never seeplatform_admintools).Supports
hybrid_bge_bm25,bge_small_only(384-dimBAAI/bge-small-en-v1.5),bm25_only,hybrid(64-dim hash + BM25),dense_only(hash64), automaticwiden-kfallback, MCPtools/listcursor pagination, and a routing miss feedback queue.
Default SQLite WAL Persistence & Hash-Chained Audit Log:
Defaults to SQLite WAL persistence (
SQLiteStateStoreunlessROUTER_STORAGE_BACKEND=memoryis set), hydrating pending/resolved HITL tickets and recent audit history across router restarts.audit_eventsenforcesBEFORE UPDATE/BEFORE DELETEabort triggers and SHA-256 hash chaining (prev_hash -> entry_hash), verifiable viaGET /api/v1/governance/audit-verify.Non-root Docker image (
USER appuser, UID10001) and GitHub Actions CI runningruff,mypy,pip-audit,pytest --cov=src,run_demo.py, anddocker build.
Executive Light-Mode Control Plane (
GET /):Served from
src/static/index.htmlviasrc/dashboard_html.py, featuring an Operator Session Switcher, 200-query held-out benchmark charts, ticket-bound HITL workflow, AST table allow-list SQL tester, VSM advisor, and OpenTelemetry monitor.
Evaluation & Held-Out Benchmark Results (200 Queries)
Evaluated using src/registry/eval_dataset.py across 200 labeled queries (96 Train + 104 Held-Out Test, where Held-Out comprises 64 standard held-out queries and 40 newly authored paraphrased/adversarial zero-overlap queries) over the 120-tool / 33,453-token registry:
Held-Out Test Split (104 Unseen Queries: 64 Standard + 40 Paraphrased Zero-Overlap)
Configuration | Recall@3 | Recall@5 | Recall@8 | Recall@10 | Recall@25 | Single@5 | Cross@5 |
| 0.4231 | 0.4952 | 0.5240 | 0.6106 | 0.7837 | 0.5000 | 0.4792 |
| 0.6490 | 0.7067 | 0.7452 | 0.7500 | 0.8269 | 0.7250 | 0.6458 |
| 0.7404 | 0.7644 | 0.7740 | 0.7981 | 0.8606 | 0.7625 | 0.7708 |
| 0.7885 | 0.8269 | 0.8365 | 0.8365 | 0.8750 | 0.8250 | 0.8333 |
| 0.8798 | 0.8990 | 0.9231 | 0.9375 | 0.9856 | 0.9250 | 0.8125 |
| 0.8317 | 0.8798 | 0.9231 | 0.9375 | 0.9808 | 0.8875 | 0.8542 |
| 0.8317 | 0.9279 | 0.9231 | 0.9375 | 0.9808 | 0.9375 | 0.8958 |
Train vs. Held-Out Standard vs. Paraphrased Adversarial Breakdown (Recall@5)
Configuration | Train ( | Held-Out Std ( | Held-Out Paraphrased ( | Combined Held-Out ( |
| 0.7865 | 0.6953 | 0.1750 | 0.4952 |
| 0.9792 | 0.9922 | 0.4000 | 0.7644 |
| 0.9896 | 1.0000 | 0.5500 | 0.8269 |
| 0.9896 | 0.9766 | 0.7750 | 0.8990 |
| 0.9948 | 1.0000 | 0.6875 | 0.8798 |
| 0.9948 | 1.0000 | 0.8125 | 0.9279 |
Honest Conclusion on Embeddings vs. BM25:
The 64-dim signed feature-hashing baseline (
hash64) adds nothing over Okapi BM25. On vocabulary-matched queries (Held-Out Std 64),bm25_onlyreaches 1.0000 Recall@5, whereas addinghash64drops Recall@5 (0.9922/0.9141) and collapses to 0.1750 on paraphrased queries.A real pretrained dense bi-encoder (
BAAI/bge-small-en-v1.5, 384-dim) provides real lift on paraphrased zero-overlap intents: on the 40 paraphrased/adversarial queries,bge_small_onlyreaches 0.7750 Recall@5 (+22.5 points abovebm25_only's 0.5500), andhybrid_bge_bm25+auto_widenreaches 0.8125 Recall@5 on paraphrased queries (0.9279 overall across all 104 held-out queries) while cutting routed schema tokens by ~95% atk=5.For deterministic, fast offline/CI runs without downloading model weights, precomputed normalized 384-dim embeddings for the catalog and evaluation suite live in
src/registry/bge_cache.json, with liveBAAI/bge-small-en-v1.5inference for unseen runtime queries whentransformers+torchare installed.
Related MCP server: MCP and A2A Enterprise Gateway
Live vs. Simulated Component Matrix
Component | Mode | What Actually Executes | Simulated / External Boundary |
MCP Protocol & Routing |
| FastAPI JSON-RPC 2.0 + SSE ( | Tool execution calls outside SQLite/VSM return contextual domain telemetry labeled |
RBAC, OIDC/JWT & HITL |
| Fail-closed auth & startup guard, | Local |
SQL AST & Table Guard |
|
| When connected to live Snowflake/PostgreSQL clusters, pair with read-only DB roles and |
Persistence & Audit Chain |
| Default SQLite WAL store ( | Set |
VSM & Ledger Queries |
| Real relational SQLite tables ( | Pre-seeded local SQLite relational tables simulate external Planview / PostgreSQL hosts |
Snowflake, IICS, Bedrock & OTel |
| SQL AST validation, Cortex keyword retrieval, IICS SLA gate, Bedrock retry validation loop, W3C | Uses local fixtures/simulated provider fallback unless live Snowflake, IICS, AWS Bedrock, or OTLP collector endpoints are configured |
Quickstart & Verification
# Install dependencies
pip install -r requirements.txt
# Run full pytest suite (tests/conftest.py isolates ROUTER_DEV_MODE=1 + temp SQLite DB;
# dedicated fail-closed tests explicitly unset ROUTER_DEV_MODE to verify startup refusal & 401/403)
pytest -v
# Run CLI benchmark & governance smoke verification (uses ROUTER_DEV_MODE=1)
python run_demo.py
# Start locally in dev mode with interactive Control Plane at http://127.0.0.1:8000
ROUTER_DEV_MODE=1 uvicorn src.main:app --reload
# Start fail-closed (requires external RS256 JWKS or HS256 secret; refuses startup without credentials)
ROUTER_JWKS_JSON='{"keys":[...]}' ROUTER_JWT_ISSUER="https://idp.example.com" ROUTER_JWT_AUDIENCE="mcp-gateway" uvicorn src.main:appDev-Only Credentials (ROUTER_DEV_MODE=1 only; disabled by default)
ak-analyst-demo(analyst, groupplatform_operators)ak-engineer-demo(data_engineer,analyst, groupplatform_operators)ak-admin-demo(platform_admin, groupplatform_operators)ak-superadmin-demo(super_admin,compliance_officer, grouphitl_approvers— peer approver)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Security gateway for AI agents: policy, approval, and audited execution, no secrets shared.
Zero-trust gateway for AI agents: score tool calls, verify agent cards, enforce policy, audit.
Deterministic runtime safety for AI agents: scan PII, gate tool actions, verify LLM output.
Connect, monitor, and control AI agents — tasks, approvals, schedules, and governance.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables secure enterprise integration by bridging SQL, financial, SCADA, and document backends to LLM agents with RBAC, DLP redaction, human-in-the-loop approvals, and OpenTelemetry tracing.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely reach enterprise tools and other agents through a governed gateway with pinned tool definitions, delegated authorization, content inspection, human approval, and signed audit trails.Apache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to safely invoke enterprise tools such as Supabase PostgreSQL and the Notion API through a zero-trust gateway that performs server-side policy and risk evaluation, cryptographically binds approval tickets to exact parameters, and requires out-of-band human approval for destructive operations. It also scrubs credentials from logs and responses while providing audit trails, rate limiting, and a web console for reviewing pending authorizations.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to call tools through a security gateway that intercepts requests, enforces deterministic policy and risk checks, blocks or escalates high-risk actions for human approval, and keeps tool credentials and audit logs protected.1MIT