@cavdax/mcp-server

中文文档
1.2.8发布于 2026/11/07Apache-2.0ES Module构建来源已验证近 30 天下载 1832

CAVDAX Enclosed Model Context Protocol (MCP) Server backed by FalkorDB GraphBLAS

原始使用文档
文档目录11 节
  1. Quick Start
  2. Cursor (project-level .cursor/mcp.json )
  3. Claude Code CLI
  4. Claude Desktop ( claude_desktop_config.json )
  5. Hosted Enterprise SSE (Cursor / any SSE-capable client)
  6. CLI Commands
  7. MCP Tools Exposed
  8. FalkorDB Setup (Local)
  9. Modes
  10. Environment Variables
  11. License

@cavdax/mcp-server

CAVDAX — Contextual Action & Verified Decision Autonomous eXecution
Enclosed MCP Server backed by FalkorDB GraphBLAS

Blocks AI coding agents from writing code grounded in stale or superseded Architecture Decisions. Implements the Model Context Protocol 2024-11-05 over stdio for zero-config integration with Cursor, Claude Code, and Claude Desktop.


Quick Start

Cursor (project-level .cursor/mcp.json)

{
  "mcpServers": {
    "cavdax": {
      "command": "npx",
      "args": ["-y", "@cavdax/mcp-server"]
    }
  }
}

Claude Code CLI

claude mcp add cavdax npx -y @cavdax/mcp-server

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "cavdax": {
      "command": "npx",
      "args": ["-y", "@cavdax/mcp-server"]
    }
  }
}

Hosted Enterprise SSE (Cursor / any SSE-capable client)

{
  "mcpServers": {
    "cavdax-cloud": {
      "url": "https://cavdax.sahnirmaan.live/api/mcp/sse",
      "transport": "sse"
    }
  }
}

CLI Commands

npx @cavdax/mcp-server              # Start MCP stdio server (default)
npx cavdax mcp                      # Start MCP stdio server (explicit)
npx cavdax ingest --repo .          # Ingest ADRs from current repo into FalkorDB
npx cavdax check --staged           # Validate staged files (git pre-commit hook)
npx cavdax check --staged --strict  # ...and fail if FalkorDB is unreachable (CI)
npx cavdax check --pr 42            # Validate PR #42 changed files (CI)
npx cavdax gate --repo org/repo --sha <commit_sha> [--strict] # Verify PR commit against invariants in CI/CD
npx cavdax doctor                   # Diagnose FalkorDB & MCP readiness

MCP Tools Exposed

ToolDescription
apply_code_changeWrites a file (confined to the repo root) only if the referenced decision_id is causally valid. Hard-rejects stale, invalidated and unknown decisions.
revalidate_decisionArchives an invalidated decision and creates a new one grounded in a superseding ADR.
check_intent_clearancePre-flight check. Call before writing code to find out whether a decision_id is still valid, without generating anything. Takes decision_id (required), target_file and proposed_action.
acquire_decision_lockLeases an exclusive lock on a decision so two agents cannot change it at once. Takes decision_id, agent_id, optional ttl_ms and reason.
release_decision_lockReleases a lock held by the calling agent.
query_causal_graphInspects the causal graph (optionally one node_id) to check node statuses and dependency paths.
export_graph_imageGenerates a standalone SVG or PNG vector snapshot of the active causal graph for PR artifacts and visual debugging.

About decision locks. Locks are leased (5 seconds to 5 minutes) and held in the memory of one MCP server process. They stop two agents that share that server from changing the same decision at once. Each IDE or agent that starts its own npx stdio process gets its own lock table, so those processes do not see each other's locks. For multi-agent safety across separate clients, point them at one shared server, such as the hosted SSE endpoint.


FalkorDB Setup (Local)

docker run -d --name falkordb -p 6379:6379 falkordb/falkordb:latest
npx cavdax doctor
npx cavdax ingest --repo .     # ADRs may declare decision_id / decision_title in frontmatter; plain Markdown ADRs (no frontmatter) are also parsed

Modes

ModeWhenBehaviour
liveFalkorDB reachableReal causal gate query, file written only on approval, audit node recorded. Responses carry "mode": "live".
simulationFalkorDB unreachableIn-memory demo graph where DEC-102 is stale. Approved writes still land on disk. Unknown decision IDs are rejected. Every response carries "simulated": true.

CAVDAX_MODE=auto (default) picks live when possible and retries on each call. CAVDAX_MODE=live never simulates and fails closed. CAVDAX_MODE=simulation never connects.


Environment Variables

VariableDefaultDescription
FALKORDB_HOSTlocalhostFalkorDB server host
FALKORDB_PORT6379FalkorDB server port
FALKORDB_PASSWORD(none)FalkorDB password
FALKORDB_GRAPH_NAMEcavdax_core_graphGraph to use
CAVDAX_MODEautoauto, live or simulation
CAVDAX_REPO_ROOTcurrent directoryDirectory file writes are confined to
CAVDAX_SERVER_URL(none)Remote CAVDAX server URL for CI/CD gate fallback
CAVDAX_API_KEY(none)Bearer API token for authenticated remote decision checks

License

Apache-2.0 — © CAVDAX Authors & Contributors

版本与发布记录

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

版本发布日期距今
1.2.8latest2026/11/073 天前
1.2.72026/11/073 天前
1.2.62026/11/063 天前
1.2.52026/11/055 天前
1.2.32026/11/055 天前
1.2.22026/11/037 天前

关于 @cavdax/mcp-server 的常见问题

@cavdax/mcp-server 是什么?

CAVDAX Enclosed Model Context Protocol (MCP) Server backed by FalkorDB GraphBLAS

如何安装 @cavdax/mcp-server?

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

@cavdax/mcp-server 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/cavdax__mcp-server 是否存在。

@cavdax/mcp-server 支持 ESM 还是 CommonJS?

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

@cavdax/mcp-server 需要什么版本的 Node.js?

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

@cavdax/mcp-server 可以商用吗?

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

@cavdax/mcp-server 的下载量有多少?

根据 npm 官方下载统计,@cavdax/mcp-server 在 2026/10/09 – 2026/11/07 这 30 天内被下载 1,832 次,日均约 61 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cavdax/mcp-server 还在维护吗?

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