nexus-mcp
The MCP server that connects your AI agents to the Nexus platform.
nexus-mcp exposes 62 structured tools across four layers — knowledge access, coordination, governance, and reviews. It communicates exclusively with the Nexus HTTP API and holds no direct database credentials. Installed automatically when you run nexus init.
Installation
nexus-mcp is installed automatically when you run nexus init in your project workspace. The CLI writes the MCP server configuration to your agent config file.
For manual installation or standalone use:
npx @gwdn/nexus-mcp
Or install globally:
npm install -g @gwdn/nexus-mcp
Published on npm as @gwdn/nexus-mcp. Current version: v0.10.3.
Architecture
The MCP server acts as a mediation layer between local agent runtimes and the Nexus HTTP API via the Model Context Protocol (stdio transport).
Agent Runtime (OpenCode, Claude Code, Cursor, ...)
│
│ stdio (MCP protocol)
▼
nexus-mcp (this package)
│
│ HTTPS (Bearer token auth)
▼
Nexus API (nexus.gatewarden.eu)
│
▼
Supabase (PostgreSQL + RLS)
Identity is resolved once at startup via GET /api/mcp/identity using the NEXUS_PRIVATE_TOKEN (nxs_pat_* format) as a Bearer token. All subsequent API calls reuse this token for authentication. The Nexus backend resolves the token to a user identity and enforces project-scoped RBAC.
Tool layers
The server organizes its 62 tools into four layers:
Layer 1 — Knowledge Access (6 tools)
| Tool | Description |
|---|---|
kb_search | Full-text, semantic, or hybrid search across project entities |
kb_memory | Structured project memory snapshot (ADRs, tasks, sessions, dispatches) |
kb_get | Retrieve a specific entity by type and ID |
kb_related | Find entities related to a given entity |
project_list | List accessible projects |
project_update | Patch project readme and/or description |
Layer 2 — Coordination (48 tools)
| Group | Tools |
|---|---|
| Sessions | session_create, session_close, session_list, session_append |
| Tasks | task_create, task_update, task_delete, task_list, task_note |
| Dispatch | dispatch_create, dispatch_reply, dispatch_inbox, dispatch_outbox, dispatch_ack, dispatch_assign, dispatch_forward, dispatch_resolve, dispatch_close, dispatch_sweep, dispatch_get, dispatch_related |
| Dispatch (legacy) | vl_create, vl_reply, vl_inbox, vl_outbox, vl_ack |
| Documents | doc_ingest, doc_list, doc_classify, doc_update, doc_delete |
| Skills | sk_list, sk_get, sk_create, sk_update, sk_activate, sk_assign, sk_unassign, sk_export |
| Decision Comments | dc_add, dc_list |
| Directives | pd_list, pd_get, pd_create, pd_update, pd_delete, pd_toggle, directive_export |
Layer 3 — Governance (3 tools)
| Tool | Description |
|---|---|
adr_create | Create a new ADR in draft status |
adr_submit | Submit a draft ADR for review |
adr_decide | Accept or reject an ADR under review |
Layer 4 — Reviews (5 tools)
| Tool | Description |
|---|---|
rv_list | List reviews with optional filters |
rv_get | Get review details by ID or entity |
rv_create | Create a new review for a skill or agent |
rv_decide | Transition a review state (submit, accept, reject, ...) |
rv_comment | Add a comment to a review |
Utility (3 tools)
| Tool | Description |
|---|---|
identity | Show current user identity |
cost_summary | Token usage and cost for the current session |
show_plugins | List loaded Nexus plugins and their status |
Tool naming convention
All tools follow the {domain}_{operation} pattern:
| Prefix | Domain |
|---|---|
kb_* | Knowledge |
dispatch_* | Nexus Dispatch (v0.9.0+) |
vl_* | Nexus Dispatch (legacy aliases) |
task_* | Tasks |
session_* | Sessions |
dc_* | Decision Comments |
doc_* | Documents |
sk_* | Skills |
adr_* | ADR Governance |
rv_* | Reviews |
pd_* | Project Directives (CRUD) |
directive_* | Directives (export) |
project_* | Projects |
Configuration
After nexus init, your agent config contains an entry like:
{
"mcpServers": {
"nexus": {
"command": "npx",
"args": ["-y", "@gwdn/nexus-mcp@latest"],
"env": {
"NEXUS_API_URL": "https://nexus.gatewarden.eu",
"NEXUS_PRIVATE_TOKEN": "nxs_pat_..."
}
}
}
}
Environment variables
| Variable | Required | Description |
|---|---|---|
NEXUS_API_URL | Yes | Nexus API base URL (e.g. https://nexus.gatewarden.eu) |
NEXUS_PRIVATE_TOKEN | Yes | nxs_pat_* API token for identity resolution |
NEXUS_SEC_OPENAI_API_KEY | No | OpenAI API key for semantic and hybrid kb_search embeddings |
NEXUS_MODEL | No | Model identifier injected into session metadata (e.g. claude-sonnet-4.6) |
NEXUS_TOOLSTACK | No | Toolstack identifier for session metadata (e.g. opencode, claude-code) |
Schema version envelope
Since v0.10.0, structured tool responses are wrapped in a version envelope:
{
"schema": "nexus.{tool-name}.v1",
"data": { ... }
}
The schema field identifies the response shape and version, enabling forward-compatible parsing. Currently 12 tools emit this envelope. Tools that return simple confirmations or single-value results may omit the envelope.
Skill lifecycle
Skills are managed centrally in the Nexus platform and delivered to agents at runtime.
How skills are loaded:
- When an agent invokes a skill command (e.g.
/nexus-sec-scan), the skill body is loaded live from the Nexus backend via the MCP server — not from local files. - Skill updates pushed via
sk_updatetake effect immediately for all projects the skill is assigned to. No pull, restart, or re-deployment required. - The local
.nexus/skills/directory is a workspace cache written bynexus pull. It exists for offline reference and IDE autocompletion, but is never the authoritative source.
When to run nexus pull:
- To update local
.nexus/cache files (AGENTS.md, skill files, agent files) for reference - After adding new skill assignments in the dashboard
- Not required for skill content updates — agents always fetch the latest version at invocation time
Scope:
- Core skills (
project_id = NULL) are tenant-wide and available to all projects. Only platform owners and admins can create or modify them. - Project-scoped skills belong to a single project and are managed by project admins. They do not appear in other projects unless explicitly promoted to core.
Auto-ingested scan reports
When agents append a session entry with entry_type set to security_scan or performance_scan, the platform automatically creates a knowledge-base document from the entry summary.
- The ingest document is classified as
scan_reportand tagged with sourceauto-scan - The summary field of the session entry becomes the document body — skills instruct agents to write the complete structured report into this field
- Scan reports appear in the project knowledge base under the scan report classification and are searchable via
kb_search
Known issues
task_note actor constraint (fixed in v0.10.1)
nexus_task_note previously returned Database operation failed in some environments. Root cause: the task_notes.actor column is a UUID FK referencing auth.users. Prior versions passed a display name or email string, violating the constraint. Fixed in nexus-mcp v0.10.1 and the nexus-hub backend.
npx cache prevents version upgrade
When using npx to run the MCP server, npm caches the resolved package in ~/.npm/_npx/. Subsequent invocations may continue to use the cached (outdated) version even after a new release is published.
Fix: Clear all npx caches for this package before starting your agent:
find ~/.npm/_npx -path "*/node_modules/@gwdn/nexus-mcp" -type d \
-exec rm -rf {} + 2>/dev/null
Pin @latest in your MCP config args to always resolve the newest version: ["--yes", "@gwdn/nexus-mcp@latest"]