nexus-mcp-gateway
by trobasuj-cpu
README.md
# NexusMCP ā Production Stateless Model Context Protocol Gateway & Secure Tooling Suite
[](LICENSE)
[](https://python.org)
[](https://modelcontextprotocol.io)
[-emerald.svg)](run_tests.py)
[](http://localhost:8080)
[](Dockerfile)
> **Stop letting autonomous coding agents execute dangerous commands on your production infrastructure.**
> NexusMCP is a production-grade, stateless Model Context Protocol (MCP) gateway that provides isolated AST code sandboxing, safe SQL circuit-breakers, and semantic token routing for **Cursor, Windsurf, Claude Desktop, and autonomous LLM agents**.
---
## š„ļø Built-in Dark Cyber Web Dashboard
NexusMCP includes an out-of-the-box, zero-dependency **Security Operations Center (SOC) Web Dashboard** served directly on `http://localhost:8080/`:
* **Live Threat Intercept Ledger**: Real-time telemetry monitoring blocked `DROP TABLE` queries, forbidden shell escapes, and unauthorized attribute visits.
* **Token Cost Savings Analytics**: Live tracking of token costs saved by routing routine tasks to **DeepSeek V4.1-Flash** ($0.20/M) vs frontier models (**Claude 5 Fable** at $12/M / **GPT-6 Astra** at $10/M).
* **Interactive Threat Simulator**: Test the AST Sandbox, Safe SQL Engine, and Cost Router directly in the browser with 1-click attack presets.
---
## Why NexusMCP?
Autonomous agents like Claude 5 Fable, GPT-6 Astra, and Cursor are incredibly powerful, but unconstrained tool access leads to catastrophic failure modes:
1. **Unbounded Destruction**: Agents running `DELETE` or `DROP TABLE` without safeguards.
2. **System Escapes**: Arbitrary shell execution (`os.system`, `subprocess`) compromising local credentials.
3. **Runaway Token Costs**: Routing trivial linting or formatting tasks to expensive $15/M reasoning models.
**NexusMCP solves this with an audited, zero-dependency stateless gateway that acts as a secure boundary.**
---
## 3-Pillar Architecture
```
[ Cursor / Windsurf / Claude Desktop ]
ā
ā¼ (Stateless JSON-RPC 2.0 / SSE)
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā NexusMCP Gateway (:8080) ā āāāŗ [ Web Dashboard / SOC ]
āāāāāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāā
ā¼ ā¼ ā¼
[ AST Sandbox ] [ Safe SQL ] [ Token Router ]
Static AST AST Guard DeepSeek V4.1-Flash
Memory/Timeout Read-Only Mode vs Claude 5 Fable
Zero Network Anti-DROP/TRUNC (-70% Token Costs)
```
---
## Included Production Tools
| Tool Name | Wire Identifier | Security Safeguards | Latency |
| :--- | :--- | :--- | :--- |
| **AST Code Sandbox** | `execute_python_sandbox` | AST node visitor, bans sockets/subprocess/eval/exec, CPU timeout watchdog. | ~0.2 ms |
| **Safe SQL Engine** | `safe_sql_query` | Intercepts `DROP`/`TRUNCATE`/unbounded mutations, enforce read-only transactions. | ~0.05 ms |
| **Model Cost Router** | `calculate_model_route` | Semantic task arbitrator dispatching between DeepSeek V4.1-Flash and Claude 5. | ~0.01 ms |
---
## š 10-Second Quickstart
### Option A: Pure Python (Zero External Dependencies)
```bash
python -m src.server
```
Visit **`http://localhost:8080/`** to view the live Cyber Web Dashboard!
### Option B: 1-Click Docker Compose
```bash
git clone https://github.com/trobasuj-cpu/nexus-mcp-gateway.git
cd nexus-mcp-gateway
docker compose up -d
```
The server starts on `http://localhost:8080` with the Web Dashboard on `/`, MCP on `/mcp`, and health checks on `/health`.
### Run Deterministic Verification Harness
```bash
python run_tests.py
# Or with pytest:
pytest tests/ -v
```
*(Runs 28 comprehensive security and live HTTP tests in <500ms).*
---
## š 1-Click Cursor & Claude Desktop Integration
### Cursor IDE Setup (`.cursor/mcp.json`)
Copy the included configuration into your project root:
```json
{
"mcpServers": {
"nexus-mcp-gateway": {
"url": "http://localhost:8080/sse",
"transport": "sse"
}
}
}
```
### Claude Desktop Setup
Add to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"nexus-mcp": {
"command": "python",
"args": ["-m", "src.server"],
"env": {
"NEXUS_MCP_PORT": "8080"
}
}
}
}
```
---
## š NexusMCP Pro Developer Suite ($29)
For engineering teams requiring enterprise isolation, the **Pro Suite** adds:
- **KMS / Vault Secret Enclave**: Stateless HMAC-signed credential injector (agents never see raw tokens).
- **Atomic Git Ops Tool**: Automated branch, commit, and PR creation with automated rollback.
- **Sliding Window Rate Limiter**: Redis & In-memory token bucket protection.
- **Cryptographic Audit Trail**: Chained tamper-proof logs for regulatory compliance.
- **Commercial Client License**: Unlimited deployments for your SaaS and client projects.
š **[Get the Pro Suite on Gumroad ($29)](https://beatsprom.gumroad.com/l/nexus-mcp-pro)**
---
## License
Open-core edition is distributed under the **Apache 2.0 License**. See [LICENSE](LICENSE) for details.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues