Skip to main content
Glama

NEXUS — God-Tier MCP Server for Agentic Coding Agents

The most powerful, advanced, and robust MCP server for CLI coding agents.

NEXUS gives your AI coding agent capabilities it structurally lacks: deep code understanding, change-impact awareness, persistent memory, engineered context, verified execution, and deterministic orchestration.

32 tools · 10 families · 20+ languages · zero native dependencies


Quick Install (Cline CLI / Claude Desktop / Cursor / etc.)

git clone https://github.com/Senpai-Sama7/nexus-mcp-server.git
cd nexus-mcp-server
npm install
npm run build

# Install MCP config for all detected clients (Cline CLI, Claude Desktop, Cursor, Windsurf, Gemini, OpenCode)
./install-mcp.sh /path/to/project1 /path/to/project2

The install-mcp.sh script writes a cline_mcp_settings.json (and equivalents for other clients) that registers one NEXUS MCP server instance per workspace. Each instance points at a different NEXUS_WORKSPACE so you get a separate code index per project.


Related MCP server: ContextWeaver

Manual Configuration

Cline CLI (~/.cline/cline_mcp_settings.json)

{
  "mcpServers": {
    "nexus": {
      "command": "node",
      "args": ["/path/to/nexus-mcp-server/dist/server.js"],
      "env": { "NEXUS_WORKSPACE": "/path/to/your/project" },
      "disabled": false
    },
    "nexus-other-project": {
      "command": "node",
      "args": ["/path/to/nexus-mcp-server/dist/server.js"],
      "env": { "NEXUS_WORKSPACE": "/path/to/another/project" },
      "disabled": false
    }
  }
}

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS)

Same mcpServers format as above.

Cline VSCode extension

~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json — same format.

Claude Code (.mcp.json in your project root)

{
  "mcpServers": {
    "nexus": {
      "command": "node",
      "args": ["./nexus-mcp-server/dist/server.js"],
      "env": { "NEXUS_WORKSPACE": "${workspaceFolder}" }
    }
  }
}

OpenCode (~/.config/opencode/opencode.jsonc)

OpenCode uses a different MCP schema — mcp keyed by server name, command as an array, environment under environment, plus enabled/timeout:

{
  "mcp": {
    "nexus": {
      "type": "local",
      "command": ["node", "/path/to/nexus-mcp-server/dist/server.js"],
      "environment": {
        "NEXUS_WORKSPACE": "/path/to/your/project",
        "NEXUS_LOG_LEVEL": "info"
      },
      "enabled": true,
      "timeout": 15000
    },
    "nexus-other-project": {
      "type": "local",
      "command": ["node", "/path/to/nexus-mcp-server/dist/server.js"],
      "environment": {
        "NEXUS_WORKSPACE": "/path/to/another/project",
        "NEXUS_LOG_LEVEL": "info"
      },
      "enabled": true,
      "timeout": 15000
    }
  }
}

Gemini CLI (~/.gemini/settings.json)

Same mcpServers shape as Cline CLI:

{
  "mcpServers": {
    "nexus": {
      "command": "node",
      "args": ["/path/to/nexus-mcp-server/dist/server.js"],
      "env": { "NEXUS_WORKSPACE": "/path/to/your/project", "NEXUS_LOG_LEVEL": "info" }
    },
    "nexus-other-project": {
      "command": "node",
      "args": ["/path/to/nexus-mcp-server/dist/server.js"],
      "env": { "NEXUS_WORKSPACE": "/path/to/another/project", "NEXUS_LOG_LEVEL": "info" }
    }
  }
}

Cursor (~/.cursor/mcp.json)

Windsurf (~/.codeium/windsurf/mcp_config.json)

Both use the same mcpServers format as Cline CLI above.


Why NEXUS?

Every current coding agent has 10 structural gaps. NEXUS fills all 10:

  1. Agents read raw text → NEXUS builds a semantic symbol/reference/dependency graph

  2. Agents edit blind → NEXUS computes blast radius before changes

  3. Agents forget everything between sessions → NEXUS persists namespaced memory

  4. Agents fetch context greedily → NEXUS ranks and budgets context (repo map, context packs)

  5. Agents can't verify structurally → NEXUS parses test/lint/typecheck output into structured diagnostics

  6. Agents do serial work → NEXUS runs deterministic parallel fan-out + persistent task DAGs

  7. Agents leak secrets / touch sensitive files → NEXUS scans, jails, and warns

  8. Agents get huge unreadable tool dumps → NEXUS paginates with cursors + head/tail truncation

  9. Agents lose state on crash → NEXUS snapshots files and checkpoints task state

  10. Agents can't see the project at a glance → NEXUS workspace health + map on demand


Environment Variables

Variable

Default

Description

NEXUS_WORKSPACE

process.cwd()

Workspace root (the jail boundary)

NEXUS_LOG_LEVEL

info

One of: debug, info, warn, error, silent


The 32 Tools

A. Workspace (3)

  • nexus_workspace_overview — languages, LOC, git state, index health

  • nexus_search — regex/literal/glob content search

  • nexus_read_span — line-range read with encoding + injection detection

B. Code Intelligence (6)

  • nexus_index_build — build/refresh the code index

  • nexus_file_symbols — symbol outline of a file

  • nexus_find_symbols — fuzzy workspace-wide symbol search

  • nexus_references — all reference sites of a symbol

  • nexus_call_graph — callers/callees, depth-N

  • nexus_dependency_graph — import graph: deps / dependents

C. Context Engineering (2) ⭐

  • nexus_repo_map — ranked repo map within a token budget (Aider-style)

  • nexus_context_pack — task-focused context bundle

D. Change Safety (4)

  • nexus_impact_analysis — blast radius before editing

  • nexus_git_diff — smart diff with stats + paginated hunks

  • nexus_snapshot / nexus_restore — checkpoint and rollback

E. Execution & Verification (4)

  • nexus_exec — run commands with timeout + secret redaction

  • nexus_exec_poll — poll/kill background jobs

  • nexus_test_run — detect framework (jest/vitest/pytest/cargo/go) → structured failures

  • nexus_diagnose — tsc/eslint → parsed {file, line, col, severity, rule, message}

F. Memory (3)

  • nexus_memory_write / nexus_memory_search / nexus_memory_forget — persistent knowledge

G. Orchestration (4)

  • nexus_task_submit / nexus_task_update / nexus_task_status — DAG task management

  • nexus_fanout — parallel map with concurrency limit

H. Security & Hygiene (2)

  • nexus_secret_scan — scan for AWS/GitHub/OpenAI/JWT/keys

  • nexus_audit_manifest — dependency risk heuristics (typosquat, unpinned)

I. Refactor (1)

  • nexus_rename_symbol — dry-run-by-default, graph-scoped, identifier-aware rename. Never matches inside strings or comments. apply:true writes the changes and first takes a snapshot, so nexus_restore <snapshotId> reverts the rename.

J. Meta (3)

  • nexus_server_status — self-diagnostics

  • nexus_guide — on-demand playbook for workflows

  • nexus_audit_log — read the record of destructive operations performed


Safety model — what is and isn't guaranteed

Read this before granting NEXUS write or exec access.

Enforced:

  • Path jail. Every filesystem touch resolves symlinks and must land inside the workspace root. Caller-supplied path lists (including nexus_secret_scan's paths and nexus_rename_symbol's file) are jailed; rejected paths are reported, not silently skipped.

  • Sensitive files. .env*, *.pem, *.key, id_rsa*, credentials* and similar are blocked for reads without allowSensitive:true, and are never written.

  • Dry run by default on the tools that can destroy work: nexus_rename_symbol (apply:false) and nexus_memory_forget (dryRun:true). nexus_restore accepts dryRun:true to preview.

  • Checkpoints are honest. nexus_snapshot reports every file it could NOT capture (binary, oversized, unreadable) in skipped[]. A rename refuses to apply if any target could not be checkpointed, so an applied change is always reversible.

  • Audit trail. Destructive operations are appended to .nexus/audit.log.

Explicitly NOT guaranteed:

  • The dangerous-command filter is a guardrail, not a sandbox. It blocks common catastrophic shapes (rm -rf against absolute/home/parent paths, mkfs, dd to devices, fork bombs, curl-pipe-to-shell, force pushes, git reset --hard). It cannot stop an obfuscated command. Do not rely on it as a security boundary — it exists to catch accidents.

  • The audit log is evidence, not proof. Anything that can write the workspace can rewrite .nexus/audit.log. It is not a tamper-evident ledger.

  • Parsing is lexical, not a real parse. See the parser note below.

Known limitations

  • No tree-sitter backend. All 20+ languages are handled by pure-JS lexical tokenizers with comment/string masking. This is accurate enough for symbol outlines, import graphs, and ranked repo maps, but it is heuristic: heavy macro use, unusual generics, and dynamically-constructed names will be missed. Every file reports parseBackend: 'lexical'.

  • Ambiguity is surfaced, not resolved. nexus_call_graph and nexus_impact_analysis return an AMBIGUOUS_SYMBOL error listing candidates rather than guessing which log you meant. Pass a file::qualname to disambiguate.

  • nexus_search re-reads files from disk on each call; content is not indexed. Fine at repo scale, slower on very large trees.

  • nexus_audit_manifest covers npm, PyPI, Go, and Cargo manifests with heuristics (unpinned versions, non-registry sources, typosquat edit-distance against a popular-package list). It is not a CVE scanner.


New Feature

1. nexus_workspace_overview
2. nexus_repo_map
3. nexus_context_pack focusFiles:[...]
4. nexus_dependency_graph file:...
5. nexus_snapshot (checkpoint)
6. Implement (using nexus_read_span, nexus_search)
7. nexus_test_run + nexus_diagnose
8. nexus_secret_scan
9. nexus_memory_write (record decisions)

Refactor

1. nexus_index_build force:true
2. nexus_find_symbols name:"oldName"
3. nexus_impact_analysis target:"oldName" mode:"symbol"
4. nexus_snapshot
5. nexus_rename_symbol (preview!)
6. nexus_test_run

Debug

1. nexus_diagnose
2. nexus_test_run
3. nexus_search pattern:"error message"
4. nexus_call_graph symbol:... direction:callers
5. nexus_memory_write (record the fix)

Architecture Highlights

  • Zero native dependencies — pure JS regex-based parser works on any platform

  • 20+ languages supported — TS/JS/Python/Go/Rust/Java/C/C++/C#/Ruby/PHP/Swift/Kotlin/Lua/Shell/...

  • Path jail — every file op goes through symlink-resolved boundary check

  • Sensitive file protection — .env, keys, credentials blocked by default

  • Indirect prompt injection guard — file contents/command outputs scanned for attack patterns

  • Secret redaction — 15+ detectors (AWS, GitHub, OpenAI, Anthropic, JWT, etc.)

  • Process-group kill — timeouts kill entire process trees, no leaks

  • Atomic persistence — tmp-file + rename for index, memory, snapshots

  • LRU memory caps — never unbounded growth

  • Tool annotations — truthful readOnlyHint / destructiveHint / idempotentHint / openWorldHint

  • Multi-workspace — run multiple NEXUS instances, each indexing a different project


Testing

npm run test:client

Validates all 32 tools via the full JSON-RPC protocol end-to-end, including regression checks for the path jail, rename-apply, and dry-run gates. 100% pass rate.


License

MIT

Available Tools

31 tools
nexus_audit_manifestA
Read-onlyIdempotent

Dependency inventory with risk heuristics: typosquatting, unpinned versions, abandoned packages.

Inputs: no named parameters.

nexus_call_graphA
Read-onlyIdempotent

Callers or callees of a function, depth-N.

Inputs: symbol (required), depth, direction.

nexus_context_packB
Read-onlyIdempotent

Task-focused context bundle: repo map slice + symbol outlines of focus files + related files.

Inputs: focusFiles (required), maxTokens.

nexus_dependency_graphA
Read-onlyIdempotent

Import dependencies of a file (what it depends on) or dependents (what depends on it).

Inputs: file (required), direction.

nexus_diagnoseA

Run typecheck (tsc) and linter (eslint). Parses output into structured diagnostics {file, line, col, severity, rule, message}.

Inputs: tsc, files, eslint.

nexus_execB

Run a command with timeout, ring-buffer output, and secret redaction. Process-group killed on timeout.

Inputs: command (required), args, timeoutMs, background, +1 more.

nexus_exec_pollB
Read-only

Poll, list, or kill background exec jobs.

Inputs: action (required), jobId.

nexus_fanoutA

Parallel map: run a command over multiple items with concurrency limit.

Inputs: items (required), command (required), timeoutMs, concurrency.

nexus_file_symbolsB
Read-onlyIdempotent

Get the symbol outline of a file (functions, classes, types, etc.).

Inputs: file (required).

nexus_find_symbolsA
Read-onlyIdempotent

Fuzzy search for symbols across the entire workspace.

Inputs: name (required), kind, limit.

nexus_git_diffA
Read-onlyIdempotent

Smart git diff: stat summary + paginated hunks. Binary files flagged.

Inputs: staged.

nexus_guideA
Read-onlyIdempotent

On-demand playbook: recommended workflows, recipes, and gotchas for using NEXUS effectively.

Inputs: topic.

nexus_impact_analysisA
Read-onlyIdempotent

Blast radius of editing a symbol or file: what else would be affected? Uses reverse reachability on the dependency/call graph.

Inputs: target (required), mode.

nexus_index_buildA
Read-onlyIdempotent

Build or refresh the code index (symbols, imports, calls). Required before code-intel tools.

Inputs: force.

nexus_memory_forgetA
DestructiveIdempotent

Delete memories by ID or text match. Audit-logged. DESTRUCTIVE.

Inputs: idOrText (required).

nexus_memory_writeA
Idempotent

Store a persistent memory: knowledge, decision, gotcha, or preference. Survives across sessions.

Inputs: key (required), value (required), tags, namespace.

nexus_read_spanA
Read-onlyIdempotent

Read a line range of a file. Encoding-safe, binary-aware, injection-scanned.

Inputs: file (required), end, start, allowSensitive.

nexus_referencesA
Read-onlyIdempotent

Find all reference sites of a symbol (calls, imports, type annotations).

Inputs: symbol (required).

nexus_rename_symbolB
Read-only

Preview workspace-wide rename of a symbol (graph-scoped, not blind sed). Returns the changes to make.

Inputs: file (required), newName (required), oldName (required), apply.

nexus_repo_mapA
Read-onlyIdempotent

Ranked repo map within a token budget. Shows top symbols per file, PageRank-ordered. Most important context feature.

Inputs: maxTokens, focusFiles.

nexus_restoreA
DestructiveIdempotent

Restore files from a snapshot. Overwrites current content. DESTRUCTIVE.

Inputs: id (required).

nexus_secret_scanA
Read-onlyIdempotent

Scan files for secrets (AWS, GitHub, OpenAI, JWT, private keys, etc.). Findings are redacted.

Inputs: limit, paths.

nexus_server_statusA
Read-onlyIdempotent

Server self-diagnostics: index age, backend, caps, state dirs, version.

Inputs: no named parameters.

nexus_snapshotB
Read-onlyIdempotent

Checkpoint files before editing. Creates a restore point with full file contents.

Inputs: id (required), files (required).

nexus_task_statusA
Read-onlyIdempotent

View task DAG: ready, blocked, in_progress, completed, failed.

Inputs: no named parameters.

nexus_task_submitA
Idempotent

Submit a task DAG (directed acyclic graph). Validates cycles. Persists across restarts.

Inputs: nodes (required).

nexus_task_updateA

Update task status (completed/failed/in_progress). Unblocks dependents.

Inputs: id (required), status (required), error, result.

nexus_test_runA

Detect framework (jest/vitest/pytest/cargo/go) and run tests. Returns structured pass/fail counts and failures.

Inputs: scope, timeoutMs.

nexus_workspace_overviewA
Read-onlyIdempotent

Project at a glance: languages, LOC, git state, index health, entry points.

Inputs: no named parameters.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 31 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, but the number of code-analysis tools (call_graph vs dependency_graph, repo_map vs context_pack) creates some risk of mis-selection without careful reading. The memory and task tools are cleanly separated by prefix and domain.

    Naming Consistency3/5

    All names share the 'nexus_' prefix and snake_case, which helps, but the internal structure is inconsistent: some use verb_noun (find_symbols, read_span), others noun_verb (memory_write, task_submit), and a few are single verbs (exec, restore, diagnose). This mixed pattern makes it less predictable than an ideal verb_noun convention.

    Tool Count2/5

    At 31 tools, the surface is very large and spans multiple domains (code intelligence, execution, memory, tasks, security), which feels heavy for an agent to navigate efficiently. Even though each tool has a unique role, the sheer number exceeds the typical well-scoped server count.

    Completeness4/5

    The server covers a comprehensive range of code analysis, search, execution, testing, memory, and task management workflows. The most notable gap is the lack of a direct file-edit or apply-patch tool—rename only previews changes and exec must be used as a workaround—but this is a minor gap rather than a fatal omission.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Provides AI coding agents with five intelligence layers (dependency graph, git history, documentation, architectural decisions, code health) via nine MCP tools, enabling deep codebase understanding and reducing exploration cost.
      5
      6,899 PyPI
      8,197
      AGPL 3.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      A semantic code retrieval engine for AI agents that enables hybrid search, graph expansion, and token-aware context packing, integrating with MCP to provide precise code context to LLMs.
      26 npm
      295
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to search code by meaning, explore codebase structure, store and query knowledge with temporal facts, and read source code through a set of MCP tools.
      7
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides code intelligence for AI coding agents by indexing repositories into a hybrid knowledge graph, enabling agents to query dependencies, impact, and context through 28 MCP tools.
      4
      Apache 2.0