@gwdn/nexus-mcp

中文文档
0.10.19发布于 2026/11/01Apache-2.0TypeScriptES Module构建来源已验证

MCP server for the Gatewarden Nexus platform — mediation layer between local agent runtimes and the Nexus HTTP API

原始使用文档
文档目录15 节
  1. Install
  2. Architecture
  3. Layer 1 -- Knowledge Access (6 tools)
  4. Layer 2 -- Coordination (48 tools)
  5. Layer 3 -- Governance (3 tools)
  6. Layer 4 -- Reviews (5 tools)
  7. Authentication
  8. Environment Variables
  9. Development
  10. Recommended: Devbox
  11. Project Structure
  12. Known Issues
  13. npx cache prevents version upgrade
  14. Related
  15. License

Nexus MCP

npm License: Apache-2.0 Node.js 20+

MCP server for the Gatewarden Nexus platform. Provides the mediation layer between local agent runtimes and the Nexus HTTP API via the Model Context Protocol (stdio transport).

Install

npx @gwdn/nexus-mcp

Or add to your agent's MCP configuration (OpenCode, Claude Code, Cursor, etc.):

{
  "mcpServers": {
    "nexus": {
      "command": "npx",
      "args": ["-y", "@gwdn/nexus-mcp@latest"],
      "env": {
        "NEXUS_API_URL": "https://nexus.gatewarden.eu",
        "NEXUS_PRIVATE_TOKEN": "nxs_pat_..."
      }
    }
  }
}

Architecture

The server exposes 62 tools across 4 layers. All data access goes through the Nexus HTTP API -- the MCP server has no direct database access.

Agent Runtime (OpenCode, Claude, Cursor, ...)
    |
    |  stdio (MCP protocol)
    v
nexus-mcp (this package)
    |
    |  HTTPS (Bearer token auth)
    v
Nexus API (nexus.gatewarden.eu)
    |
    v
Supabase (PostgreSQL + RLS)

Layer 1 -- Knowledge Access (6 tools)

ToolDescription
kb_searchFull-text, semantic, or hybrid search across project entities
kb_memoryStructured project memory snapshot (ADRs, tasks, sessions, letters, customer docs)
kb_getRetrieve a specific entity by type and ID
kb_relatedFind entities related to a given entity
project_listList accessible projects
project_updatePatch a project's readme and/or description (partial update). description is one short plain-text sentence (listing subtitle); long-form Markdown goes into readme

Layer 2 -- Coordination (48 tools)

GroupTools
Vault Lettersvl_create, vl_reply, vl_inbox, vl_outbox, vl_ack
Dispatchesdispatch_create, dispatch_reply, dispatch_inbox, dispatch_outbox, dispatch_ack, dispatch_assign, dispatch_forward, dispatch_resolve, dispatch_close, dispatch_sweep, dispatch_get, dispatch_related
Taskstask_create, task_update, task_note, task_list, task_delete
Documentsdoc_ingest, doc_list, doc_classify, doc_update, doc_delete
Sessionssession_create, session_append, session_close, session_list
Decision Commentsdc_add, dc_list
Skillssk_list, sk_get, sk_create, sk_update, sk_activate, sk_assign, sk_unassign, sk_export
Directivespd_list, pd_get, pd_create, pd_update, pd_delete, pd_toggle, directive_export

Directives: short binding rules (ADR-0125)

A directive is one short binding rule. pd_list returns the effective list per project, and every entry carries a source:

sourceOriginEditable via pd_update
mandatoryPlatform catalog, always activeno
flagPlatform catalog, switched by a project setting (nexus env set policy.<key>)no
templateDefault/optional catalog rule added to the projectenabled only
projectRule written for this projectyes

Fields for pd_create / pd_update:

FieldNotes
ruleOne imperative sentence, at most 240 characters. Always rendered to agents.
rationaleBackground, at most 2000 characters. Never sent to agents.
levelmust | should
categorycommits | language | docs | security | workflow | operations | communication
sort_orderInteger, ascending
enabledBoolean
template_slug / template_idpd_create only: add a default/optional catalog rule instead of writing your own. Cannot be combined with rule fields.

title, body and priority are deprecated aliases for rule, rationale and level (high maps to must). The backend no longer accepts the legacy general category.

// project rule
{ "rule": "Write commit messages in English.", "level": "must", "category": "commits" }
// catalog rule
{ "template_slug": "<catalog-slug>" }

Skills: description and invocation (ADR-0124)

sk_create requires description (1 to 500 characters, not blank): one line saying what the skill does and when to use it. Agents pick skills by it. sk_create and sk_update accept an optional invocation:

  • model (default): the agent may load the skill on its own.
  • user: only on explicit request (/command); rendered as disable-model-invocation for Claude Code.

Layer 3 -- Governance (3 tools)

ToolDescription
adr_createCreate a new ADR in draft status
adr_submitSubmit a draft ADR for review
adr_decideAccept or reject an ADR under review

Layer 4 -- Reviews (5 tools)

ToolDescription
rv_listList reviews with optional filters
rv_getGet review details by ID or entity
rv_createCreate a new review for a skill or agent
rv_decideTransition a review state (submit, accept, reject, ...)
rv_commentAdd a comment to a review

Authentication

Identity is resolved once at startup via GET /api/mcp/identity using the NEXUS_PRIVATE_TOKEN as a Bearer token. All subsequent API calls use the same token for authentication. The Nexus backend resolves the token to a user identity and enforces project-scoped RBAC.

Environment Variables

VariableRequiredDescription
NEXUS_API_URLyesNexus API base URL (e.g. https://nexus.gatewarden.eu)
NEXUS_PRIVATE_TOKENyesnxs_pat_* API token for identity resolution
NEXUS_MODELnoModel identifier for session metadata enrichment
NEXUS_TOOLSTACKnoToolstack identifier (e.g. opencode, claude-code)

Development

We recommend using Devbox to get a fully reproducible, isolated development environment with all required tools pre-installed (Node.js 22, git, ripgrep, tmux, lazygit, and more).

Install Devbox (once, system-wide):

curl -fsSL https://get.jetify.com/devbox | bash

Enter the dev shell:

devbox shell

This drops you into a Nix-managed shell with every tool pinned to the versions declared in devbox.json. No global installs, no version drift.

Available Devbox scripts:

ScriptCommandDescription
devdevbox run devStart MCP server via tsx (watch mode)
builddevbox run buildCompile TypeScript to dist/
testdevbox run testRun full test suite
typecheckdevbox run typecheckTypeScript type-check only
validatedevbox run validateFull pre-commit validation (typecheck + tests)
check-localdevbox run check-localLocal environment health check
sec-scandevbox run sec-scanSecurity scan (gitleaks + audit)
tmux-2wdevbox run tmux-2wOpen 2-window tmux workspace
tmux-3wdevbox run tmux-3wOpen 3-window tmux workspace

Without Devbox, you can still run commands directly:

npm install
npm run typecheck   # TypeScript check
npm test            # Run tests (164 unit + 34 E2E)
npm run build       # Compile to dist/
npm run dev         # Run via tsx (development)
npm start           # Run compiled JS (production)

Project Structure

nexus-mcp/
├── src/
│   ├── server.ts          # MCP server entry point (stdio transport)
│   ├── auth.ts            # Token-based identity resolution via Nexus API
│   ├── nexus-api.ts       # HTTP client for Nexus API (nexusGet, nexusPost)
│   ├── machine-id.ts      # Machine identification for session metadata
│   ├── project-scope.ts   # NEXUS_PROJECT_ID fallback for project-scoped tools
│   ├── version.ts         # Package version for MCP serverInfo (read from package.json)
│   ├── tools/             # 27 tool modules (62 tools total)
│   └── __tests__/         # 17 test files (205 unit + 34 E2E)
├── LICENSE                # Apache-2.0
├── SECURITY.md            # Security policy
├── CONTRIBUTING.md        # Contribution guidelines
└── CODE_OF_CONDUCT.md     # Contributor Covenant

Known Issues

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.

Symptoms: MCP tools report an older version, or new tools/fixes are missing.

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

Tip: Pin @latest in your MCP config args to always resolve the newest version: ["--yes", "@gwdn/nexus-mcp@latest"]

License

Apache-2.0 -- Copyright (c) 2026 RelicFrog Holding UG (haftungsbeschraenkt)

版本与发布记录

@gwdn/nexus-mcp 共发布 32 个版本,首次发布于 2026/04/20;过去 12 个月发布了 32 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.10.19latest2026/11/012 天前
0.10.182026/10/1222 天前
0.10.172026/10/1222 天前
0.10.162026/10/0826 天前
0.10.152026/09/271 个月前
0.10.142026/09/201 个月前

关于 @gwdn/nexus-mcp 的常见问题

@gwdn/nexus-mcp 是什么?

用于Gatewarden Nexus平台的MCP服务器——本地代理运行时和Nexus HTTP API之间的中介层

如何安装 @gwdn/nexus-mcp?

在项目目录运行 npm install @gwdn/nexus-mcp,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 nexus-mcp,可以用 npx nexus-mcp 直接运行。

@gwdn/nexus-mcp 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@gwdn/nexus-mcp 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@gwdn/nexus-mcp 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@gwdn/nexus-mcp 可以商用吗?

@gwdn/nexus-mcp 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@gwdn/nexus-mcp 还在维护吗?

最新版本 0.10.19 发布于 2026/11/01(2 天前);至今共发布 32 个版本,其中过去 12 个月发布了 32 个;首次发布于 2026/04/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。