@anurag134/nexusmcp 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -21
- package/package.json +11 -2
package/README.md
CHANGED
|
@@ -1,25 +1,62 @@
|
|
|
1
1
|
# NexusMCP
|
|
2
2
|
|
|
3
|
-
**Local-First MCP Gateway
|
|
3
|
+
**Local-First MCP Gateway, Semantic Tool Router & Zero-Trust Security Layer**
|
|
4
4
|
|
|
5
|
-
Connect 50+ MCP servers behind a single local gateway without
|
|
5
|
+
Connect 50+ MCP servers behind a single local gateway (`http://localhost:3000/mcp/sse`) without flooding your AI client's context window or storing credentials in plain text.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
> **Demo:** Record a 15-second walkthrough of `http://localhost:3000` (search $\rightarrow$ `mcp.json` connect $\rightarrow$ live logs) and save it as `docs/demo.gif` in your public GitHub repo so it renders on both GitHub and npm:
|
|
8
|
+
>
|
|
9
|
+
> ``
|
|
8
10
|
|
|
9
|
-
|
|
10
|
-
- **Zero-Credential Database (OS-Native Vault)**: Secrets are stored in your OS credential layer (Windows DPAPI, macOS Keychain, Linux Secret Service) rather than SQLite, and active secret values + common token patterns (`ghp_`, `github_pat_`, `sk-`, `AKIA`, Bearer tokens) are redacted before any tool output reaches an AI model.
|
|
11
|
-
- **`mcp.json` Control Plane**: Paste or edit standard `mcp.json` directly, or search the official MCP Registry / npm and auto-extract `mcp.json` and environment variables from repo READMEs.
|
|
12
|
-
- **Parallel Startup & Live Diagnostics**: Connects upstream servers in parallel (`concurrency = 6`) with live progress tracking, `stderr` capture, cold-start `npx` retry, and inline missing-env Quick Fix.
|
|
13
|
-
- **1-Click IDE Migration**: Wrap or restore `~/.cursor/mcp.json` (`nexusmcp wrap` / `nexusmcp unwrap`).
|
|
14
|
-
- **Automatic Port Fallback**: Automatically switches to `3001+` if port `3000` is already occupied (or pass `--port <number>`).
|
|
11
|
+
---
|
|
15
12
|
|
|
16
|
-
##
|
|
13
|
+
## The Problem NexusMCP Solves
|
|
14
|
+
|
|
15
|
+
1. **Context Window Bloat:** Connecting 20–50 MCP servers directly to Cursor or Claude Desktop injects 300+ tool schemas into every prompt (~75,000+ wasted tokens).
|
|
16
|
+
2. **Credential Trust & `.zshrc` Friction:** Cloud-hosted MCP gateways ask you to paste personal tokens onto someone else's server, while raw CLI setups force users to manually maintain `.env` / `.zshrc` files.
|
|
17
|
+
3. **Opaque Startup Failures:** When an upstream `npx` or OAuth server fails, IDEs rarely surface `stderr`, cold-start delays, or missing environment variable names clearly.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## How It Works (End-to-End Flow)
|
|
22
|
+
|
|
23
|
+
```mermaid
|
|
24
|
+
flowchart LR
|
|
25
|
+
IDE["AI IDE (Cursor / Claude / Cline)"] -- "1. SSE (/mcp/sse)" --> GW["NexusMCP Gateway"]
|
|
26
|
+
GW -- "2. nexus_search_tools" --> SR["In-Memory Semantic Vector Router"]
|
|
27
|
+
SR -- "Top-K matching tools" --> IDE
|
|
28
|
+
IDE -- "3. nexus_execute" --> SG["Security Gate + OS Vault"]
|
|
29
|
+
SG -- "4. Spawn & inject in memory" --> UP["Upstream MCPs (GitHub, Filesystem, Playwright, ...)"]
|
|
30
|
+
UP -- "5. PII & Token Redaction + Output Pruning" --> IDE
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
1. **Single Gateway Connection:** Your IDE connects only to `nexusmcp` (`http://localhost:3000/mcp/sse`), seeing 5 lightweight synthetic tools (`nexus_search_tools`, `nexus_execute`, `nexus_list_servers`, `nexus_rollback`, `nexus_diff`).
|
|
34
|
+
2. **On-Demand Semantic Routing:** When your AI needs a tool, it calls `nexus_search_tools`. NexusMCP's subword cosine-similarity router returns only the top relevant tools and logs estimated schema tokens saved (~250 tokens per filtered-out tool).
|
|
35
|
+
3. **Zero-Credential Database:** Secrets entered in `mcp.json` are stored in your **OS-native credential layer** (Windows DPAPI, macOS Keychain, Linux `secret-tool`)—SQLite only stores `"__OS_VAULT__"` markers.
|
|
36
|
+
4. **Scoped Safety & Output Redaction:** Destructive SQL/shell commands (`DROP DATABASE`, `rm -rf`, `.env` path access) are blocked before execution, and any leaked tokens (`ghp_`, `github_pat_`, `sk-`, `AKIA`, Bearer tokens, or active vault secrets) are redacted from tool outputs before reaching the LLM.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Quick Start (60 Seconds)
|
|
41
|
+
|
|
42
|
+
### 1. Start NexusMCP locally
|
|
17
43
|
|
|
18
44
|
```bash
|
|
19
45
|
npx -y @anurag134/nexusmcp
|
|
20
46
|
```
|
|
21
47
|
|
|
22
|
-
|
|
48
|
+
* Requirements: **Node.js 24+** (uses built-in `node:sqlite`).
|
|
49
|
+
* If port `3000` is busy, NexusMCP automatically switches to `3001+` (or pass `--port 4500`).
|
|
50
|
+
|
|
51
|
+
### 2. Add Upstream MCPs at `http://localhost:3000`
|
|
52
|
+
|
|
53
|
+
- **Paste `mcp.json`:** Drop any standard `{ "mcpServers": { ... } }` config and click **Save & Connect All** (connects up to 6 servers in parallel with a live progress bar).
|
|
54
|
+
- **Search / Auto-Extract:** Type any tool name (e.g. `github`, `postgres`) or paste a GitHub repo URL—NexusMCP queries npm & `registry.modelcontextprotocol.io`, extracts the `mcp.json` + env vars from the README, and populates the editor.
|
|
55
|
+
- **1-Click IDE Migration:** Click **Wrap Cursor Config** (or run `npx -y @anurag134/nexusmcp wrap`) to import `~/.cursor/mcp.json` with automatic backup and restore.
|
|
56
|
+
|
|
57
|
+
### 3. Connect Your AI IDE
|
|
58
|
+
|
|
59
|
+
Add this single entry to Cursor (`~/.cursor/mcp.json`), Claude Desktop, or VS Code Cline:
|
|
23
60
|
|
|
24
61
|
```json
|
|
25
62
|
{
|
|
@@ -31,16 +68,18 @@ Open **`http://localhost:3000`** (or the port printed in your terminal) to add s
|
|
|
31
68
|
}
|
|
32
69
|
```
|
|
33
70
|
|
|
34
|
-
|
|
71
|
+
*(Use the exact port printed in your terminal or click the SSE pill in the dashboard header to copy it.)*
|
|
35
72
|
|
|
36
|
-
|
|
37
|
-
nexusmcp # Start gateway and local control plane UI
|
|
38
|
-
nexusmcp --port 4500 # Start on a custom port
|
|
39
|
-
nexusmcp wrap # Import ~/.cursor/mcp.json and route Cursor through NexusMCP
|
|
40
|
-
nexusmcp unwrap # Restore original ~/.cursor/mcp.json backup
|
|
41
|
-
nexusmcp list # List registered servers and indexed tool count
|
|
42
|
-
```
|
|
73
|
+
---
|
|
43
74
|
|
|
44
|
-
##
|
|
75
|
+
## CLI Reference
|
|
45
76
|
|
|
46
|
-
|
|
77
|
+
```bash
|
|
78
|
+
npx -y @anurag134/nexusmcp # Start gateway + web control plane
|
|
79
|
+
npx -y @anurag134/nexusmcp --port 4500 # Start on a custom port
|
|
80
|
+
npx -y @anurag134/nexusmcp wrap # Import ~/.cursor/mcp.json and wrap Cursor
|
|
81
|
+
npx -y @anurag134/nexusmcp unwrap # Restore original ~/.cursor/mcp.json backup
|
|
82
|
+
npx -y @anurag134/nexusmcp list # List registered servers and indexed tools
|
|
83
|
+
npx -y @anurag134/nexusmcp diff # Inspect git diff since last checkpoint
|
|
84
|
+
npx -y @anurag134/nexusmcp rollback # Roll back to latest git checkpoint
|
|
85
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anurag134/nexusmcp",
|
|
3
3
|
"mcpName": "io.github.Anurag6212/nexusmcp",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"description": "Local-first MCP Gateway & Semantic Router with OS-keychain secret storage, mcp.json control plane, and PII redaction.",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"type": "module",
|
|
@@ -24,7 +24,16 @@
|
|
|
24
24
|
"url": "git+https://github.com/Anurag6212/NexusMCP.git"
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/Anurag6212/NexusMCP#readme",
|
|
27
|
-
"keywords": [
|
|
27
|
+
"keywords": [
|
|
28
|
+
"mcp",
|
|
29
|
+
"model-context-protocol",
|
|
30
|
+
"mcp-server",
|
|
31
|
+
"router",
|
|
32
|
+
"gateway",
|
|
33
|
+
"ai",
|
|
34
|
+
"cursor",
|
|
35
|
+
"claude"
|
|
36
|
+
],
|
|
28
37
|
"author": "Anurag6212",
|
|
29
38
|
"license": "MIT",
|
|
30
39
|
"dependencies": {
|