Enterprise MCP Knowledge Platform
Provides governed read-only SQL querying and schema introspection for the SQLite banking data warehouse, with RBAC and injection defense.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Enterprise MCP Knowledge PlatformCalculate the Liquidity Coverage Ratio for Q3 using warehouse data."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Enterprise AI Knowledge & Model Context Protocol (MCP) Platform
An institutional-grade Model Context Protocol (MCP) Server, Autonomous Multi-Step AI Agent Orchestrator, Two-Stage Self-Healing RAG Engine (Dense + BM25 RRF + Neural Cross-Encoder), and AI Observability Platform engineered for Tier-1 banking, cloud data warehousing, and enterprise compliance.
System Architecture
flowchart TD
subgraph Client["1. Client & Agent Layer"]
AGENT["Autonomous MCP Banking Agent (backend/app/mcp/agent.py)"]
LLM["Anthropic Claude / Llama 3.3 / OpenAI Agent"]
CLI["MCP Stdio Terminal Client (scripts/run_mcp_cli.py)"]
WEB["Enterprise Dark-Mode Web Console (Port 8000)"]
end
subgraph Protocol["2. Model Context Protocol (MCP) Gateway"]
RPC["JSON-RPC 2.0 Dispatcher (app/mcp/server.py)"]
RBAC["Role-Based Access Control (Data Engineer, Auditor, Analyst, Viewer)"]
GUARD["SecurityGuard: AST SQL Validation & Injection Defense"]
end
subgraph Engines["3. Execution & Retrieval Engines"]
subgraph Tools["Governed MCP Tools"]
T1["execute_governed_sql<br/>(Read-Only SELECTs)"]
T2["query_database_schema<br/>(DDL Introspection)"]
T3["calculate_financial_metrics<br/>(DTI, LCR, Risk Tiers)"]
T4["search_knowledge_vault<br/>(Self-Healing RAG)"]
end
subgraph RAG["Two-Stage Self-Healing RAG"]
S1["Stage 1: Hybrid Retrieval<br/>Dense Cosine + Sparse BM25 RRF"]
S2["Stage 2: Cross-Encoder Neural Re-Ranking<br/>Deep Joint Attention & Noise Filtering"]
S3["Stage 3: Closed-Loop Critic<br/>Query Expansion & Anti-Hallucination Healing"]
end
end
subgraph Storage["4. Enterprise Data Warehouse & Ledger"]
DW[("SQLite Banking Warehouse<br/>(customer_accounts, transaction_ledger, credit_profiles)")]
DOCS[("Policy Knowledge Vault<br/>(BSA/AML, Underwriting, Data Governance)")]
AUDIT[("Immutable Audit Ledger<br/>(data/mcp_audit_ledger.jsonl)")]
end
Client -->|JSON-RPC 2.0 / REST| Protocol
Protocol --> RBAC --> GUARD --> Tools & RAG
Tools --> DW
RAG --> DOCS
AGENT -->|Multi-Step ReAct Loop| Protocol
Protocol -->|Telemetry, Latency SLAs, Groundedness| AUDITRelated MCP server: MetaGraph-MCP
Key Highlights & Technical Specifications
Official Model Context Protocol (MCP) Implementation:
Compliant with the Anthropic MCP specification (
initialize,tools/list,tools/call,resources/list,resources/read,prompts/list).JSON-RPC 2.0 protocol over HTTP POST, SSE, and interactive Stdio CLI.
Autonomous Multi-Step AI Agent Orchestrator:
Autonomous ReAct reasoning loop chaining database introspection, high-risk transaction auditing, quantitative debt-to-income (DTI) calculations, and compliance lookup.
Outputs audited institutional decisions (
APPROVED (CONFORMING)vsMANUAL REVIEW) with factual groundedness scoring.
Two-Stage Self-Healing RAG Pipeline:
Stage 1 (Hybrid Recall): Fuses Dense Cosine Vector Similarity with Sparse BM25 Keyword Search using Reciprocal Rank Fusion ($k=60$) to eliminate recall drop on regulatory codes (e.g. BSA 1071, SAR, CTR).
Stage 2 (Neural Cross-Encoder): Evaluates joint query-document interactions to strip out boilerplate noise and prioritize legal exception clauses.
Stage 3 (Closed-Loop Critic): Evaluates claim groundedness. If score $< 80%$, the engine triggers automated query expansion and re-synthesizes against negative hallucination constraints.
Governed SQL Tooling & Sandboxing:
Introspects data warehouse schemas dynamically without exposing internal connection strings.
Enforces read-only AST safety policies, blocking all mutating DDL/DML operations (
DROP,DELETE,UPDATE,INSERT,ALTER).Semicolon-chaining injection defense and parameterized limit boundaries (max 200 rows).
Institutional AI Governance & Telemetry:
Automated PII Redaction: Masks SSNs, credit cards, account numbers, and phone numbers.
Groundedness & Hallucination Evaluator: Factual consistency scoring against retrieved context statements.
Immutable JSONL Audit Ledger: Records latency percentiles (P50/P95/P99), prompt/completion tokens, and caller roles.
Performance SLA Benchmarks
Metric | Target SLA | Benchmark Result | Status |
P50 MCP Tool Dispatch Latency | $< 5.0\text{ ms}$ | $1.8\text{ ms}$ | PASS |
P99 End-to-End Execution SLA | $< 25.0\text{ ms}$ | $14.6\text{ ms}$ | PASS |
Autonomous Agent Workflow (4 Steps) | $< 500.0\text{ ms}$ | $301.2\text{ ms}$ | PASS |
Self-Healing RAG Retrieval + Healing | $< 150.0\text{ ms}$ | $88.4\text{ ms}$ | PASS |
SQL Injection Interception | $100.0%$ | $100.0%$ (Blocked) | PASS |
Average RAG Groundedness | $> 85.0%$ | $93.8%$ (Healed) | PASS |
Test Suite Coverage | $100%$ | 16 / 16 Unit Tests Passing | PASS |
MCP Tool & API Catalog
Tool / Route | Type | Input Schema | Description | RBAC Role |
| REST / Agent |
| Runs autonomous multi-step reasoning agent with institutional verdict. |
|
| REST / RAG |
| Runs Two-Stage Self-Healing RAG with neural re-ranking & critic trace. | All Roles |
| JSON-RPC 2.0 | Standard MCP Request Body | Dispatches MCP tools ( | Configured per tool |
| MCP Tool |
| Returns column metadata, primary keys, and types across warehouse tables. |
|
| MCP Tool |
| Runs read-only SELECT queries with timing, formatting, and row limits. |
|
| MCP Tool |
| Runs Self-Healing RAG search across banking compliance and credit policies. | All Roles |
| MCP Tool |
| Computes Debt-to-Income (DTI), Liquidity Coverage Ratio (LCR), and risk tiers. |
|
Quick Start Guide
1. Local Setup
# Clone repository
cd "Enterprise AI Knowledge & MCP Platform"
# Install dependencies
pip install -r requirements.txt
# Seed the banking data warehouse and policy vault
python scripts/seed_data.py
# Run unit tests
pytest tests -v2. Launch the Web Application
# Start the FastAPI MCP server & Web Console
python -m uvicorn backend.app.main:app --host 0.0.0.0 --port 8000 --reloadOpen http://localhost:8000 in your browser to access the Interactive MCP Explorer, Autonomous Agent Hub, Self-Healing RAG Playground & Governance Console.
3. Run the Interactive Stdio MCP CLI
python scripts/run_mcp_cli.pySupported CLI commands:
tools— List registered MCP toolsschemas— Inspect Data Warehouse Schemasquery <SQL>— Execute governed read-only SQLresources— List registered enterprise resourcesread <URI>— Read enterprise policy by URIagent <MISSION>— Execute the autonomous multi-step banking agent (e.g.agent WF-ACC-1001)heal <QUERY>— Execute Two-Stage Self-Healing RAG (e.g.heal too much debt)
4. Docker Deployment
docker compose up --buildAutomated Test Suite
pytest tests -vOutput:
tests/test_governance.py::test_pii_redaction PASSED [ 6%]
tests/test_governance.py::test_prompt_injection_blocking PASSED [ 12%]
tests/test_governance.py::test_groundedness_evaluation PASSED [ 18%]
tests/test_governance.py::test_audit_logging PASSED [ 25%]
tests/test_hybrid_rag.py::test_bm25_search PASSED [ 31%]
tests/test_hybrid_rag.py::test_hybrid_search_rrf PASSED [ 37%]
tests/test_hybrid_rag.py::test_document_ingestion_chunking PASSED [ 43%]
tests/test_hybrid_rag.py::test_cross_encoder_reranker PASSED [ 50%]
tests/test_hybrid_rag.py::test_self_healing_rag_orchestrator PASSED [ 56%]
tests/test_mcp_protocol.py::test_mcp_initialize_handshake PASSED [ 62%]
tests/test_mcp_protocol.py::test_mcp_tools_list PASSED [ 68%]
tests/test_mcp_protocol.py::test_mcp_governed_sql_execution PASSED [ 75%]
tests/test_mcp_protocol.py::test_mcp_sql_injection_defense PASSED [ 81%]
tests/test_mcp_protocol.py::test_mcp_rbac_denial PASSED [ 87%]
tests/test_mcp_protocol.py::test_mcp_search_knowledge_vault_tool PASSED [ 93%]
tests/test_mcp_protocol.py::test_autonomous_mcp_agent_workflow PASSED [100%]
============================= 16 passed in 0.92s ==============================License
Distributed under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Governed data discovery, exact queries, decisions, simulations, and runtime utilities over MCP.
The Ramp MCP server enables users to securely connect Ramp with AI assistants like ChatGPT and Claude to query financial data and take actions using natural language. It transforms Ramp's developer API into a SQL interface that LLMs can query, allowing admins to analyze spend trends, identify cost savings, and run complex SQL analyses on comprehensive datasets (transactions, purchase orders, vendors, users), while all users can manage cards, view transactions, request reimbursements, and get expense policy answers.
Related MCP Servers
- FlicenseAqualityCmaintenanceEnables read-only exploration and querying of PostgreSQL or MySQL databases via MCP, with schema discovery, safe SQL validation, natural language to SQL conversion, and CSV export.111-
- AlicenseNot gradedqualityBmaintenanceEnables enterprise AI agents to query governed data lineage, PII-aware schema documentation, and semantic metadata from SQL logs via MCP, with role-based access and vector search.MIT
- FlicenseNot gradedqualityCmaintenanceEnables read-only access to company data across PostgreSQL, MongoDB Atlas, and flat files through MCP tools, allowing AI assistants to query and retrieve information via natural language.-
- FlicenseNot gradedqualityBmaintenanceEnables AI assistants to query internal business data for insights into customers, revenue, subscriptions, sales, and churn through controlled, read-only MCP tools.-