nexus-mcp
An enterprise-grade MCP gateway and security router that gives AI agents secure, observable access to internal corporate knowledge through hybrid vector+BM25 retrieval, RBAC, and prompt injection protection.
README
Nexus-MCP ⚡
<p align="center"> <strong>Production Enterprise MCP Gateway for Secure, Observable Agent Knowledge Access</strong> </p>
<p align="center"> <a href="https://www.python.org/downloads/release/python-3110/"><img alt="Python 3.11+" src="https://img.shields.io/badge/python-3.11%2B-blue.svg"></a> <a href="https://modelcontextprotocol.io"><img alt="Anthropic MCP" src="https://img.shields.io/badge/Anthropic%20MCP-v1.0-orange.svg"></a> <a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"></a> <a href="https://prometheus.io"><img alt="Prometheus" src="https://img.shields.io/badge/Prometheus-Telemetry-red.svg"></a> </p>
Overview
Nexus-MCP is an enterprise-grade Model Context Protocol (MCP) gateway and security router that gives AI agents (Claude Desktop, Cursor, LangGraph) secure, observable access to internal corporate knowledge.
Raw MCP implementations lack multi-tenancy, dynamic RBAC, tool injection protection, and audit logs. Nexus-MCP bridges this gap by acting as a zero-trust security router and document intelligence server.
🔁 The Enterprise Golden Path
MCP Client ──> Authentication & Tenant Context ──> RBAC Scope Check
│
▼
Prometheus & OTel ◄── Response ◄── Schema Extraction ◄── Hybrid RAG (Vector+BM25)
Key Features
- ⚡ Official Anthropic MCP SDK Integration: Built natively on Anthropic's
mcpspecification supporting STDIO & SSE JSON-RPC transports. - 🔒 Multi-Tenant & ACL Isolation: Strictly isolates document search and schema extraction per
tenant_idand useracl_groups. - 🛡️ Security Router & Prompt Injection Sanitizer: Prevents prompt/tool injection attacks (
DROP TABLE,IGNORE INSTRUCTIONS). - 🔍 Hybrid Vector + BM25 Retrieval: Reciprocal Rank Fusion (RRF) combining dense vector similarity and BM25 term frequency.
- 📊 Prometheus & OpenTelemetry Observability: Tracks tool execution counts, p95/p99 latency, and token expenditure.
Quick Start
Installation
pip install nexus-mcp
Or install locally for development:
git clone https://github.com/JasleenSingh/nexus-mcp.git
cd nexus-mcp
pip install -e .
Code Example: Golden Path Demo
Run the included commercial contract intelligence demo:
python examples/contract_intelligence_demo.py
Output:
🚀 Starting Nexus-MCP Enterprise Golden Path Demo...
✅ Ingested document into 4 hierarchical chunks for tenant 'tenant-acme-corp'.
🔍 Executing Tool [doc_hybrid_search]...
Found 1 matching chunks with Hybrid Vector + BM25 search.
📋 Executing Tool [doc_extract_schema]...
Extracted Agreement Schema (3 fields):
• payment_terms: Net 30 days (confidence: 0.92)
• total_contract_value: $3,500,000.00 (confidence: 0.88)
• governing_law: State of Delaware (confidence: 0.90)
📊 Executing Tool [system_health_telemetry]...
System Health: healthy
✨ Nexus-MCP Golden Path Execution Completed Successfully!
Running Server & CLI
# Start Nexus-MCP server over STDIO transport
nexus-mcp serve --transport stdio
Running Tests & Benchmarks
# Run complete unit, integration, and security test suite
pytest tests/
# Run retrieval accuracy benchmarks (Recall@K & MRR)
pytest tests/integration/test_retrieval_benchmarks.py -v
Project Structure
nexus-mcp/
├── src/nexus_mcp/
│ ├── models/ # Pydantic v2 domain schemas (TenantContext, DocumentChunk, SearchQuery)
│ ├── document_processor/ # Hierarchical chunker, schema extractor, and Hybrid RAG retriever
│ ├── security/ # RBAC scope validator and input injection sanitizer
│ ├── observability/ # Prometheus metrics and OpenTelemetry trace span exporters
│ ├── mcp_server/ # Official Anthropic MCP Server & tool registrations
│ └── cli/ # Rich CLI interface (nexus-mcp serve)
├── tests/
│ ├── unit/ # Unit tests (chunker, retriever, schemas, observability)
│ ├── integration/ # MCP JSON-RPC protocol & retrieval benchmarks
│ └── security/ # Adversarial security tests (cross-tenant & prompt injection)
├── examples/ # Contract intelligence demo & sample commercial agreements
├── docs/ # System architecture & tool specs
├── pyproject.toml
└── README.md
License
Distributed under the MIT License.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。