Skip to main content
Glama

Nexus-MCP ⚑


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.


Related MCP server: nacre

πŸ” 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 mcp specification supporting STDIO & SSE JSON-RPC transports.

  • πŸ”’ Multi-Tenant & ACL Isolation: Strictly isolates document search and schema extraction per tenant_id and user acl_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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Governed MCP gateway that lets AI agents call tools with policy enforcement, prompt-injection screening, a kill-switch, and tamper-evident signed audit logs.
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      Provides a self-hosted knowledge index with document-level permissions, enabling AI agents to retrieve exactly the documents they are authorized to see via MCP. Supports OAuth 2.1, custom embedding models, and runs inside your network.
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Universal 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