NeuroDock Cognitive Graph

io.github.tlennon-ie由 GitHub 账号 tlennon-ie 发布v0.0.6更新于 Oct 24, 2026

A local typed-edge graph of people, projects, and decisions that externalises memory.

已验证STDIO仅桌面数据库知识与记忆

概览

AI 生成的概览

一个本地 SQLite 图,记录人物、项目、决策与概念,让助手写入类型化事实并召回实体、决策和每周活动。

可以做什么
提供四个由本地 SQLite 文件支撑的工具。recall_entity 查找人物、项目、决策或概念,返回其事实、一度邻居和解析诊断。record_fact 持久化类型化边事实并自动创建实体,限定在八个谓词词表内。recall_decisions 按日期返回某项目的决策,weekly_rollup 生成最近七天的服务端模板化摘要,不调用 LLM。
适用场景
适合希望助手跨会话保留人物、项目和决策持久记忆的场景,尤其是长期运行或频繁切换上下文、否则每次会话都从零开始的工作。它是本地单文件存储,而非共享或团队知识库。
运行要求
作为本地 stdio 进程运行,从 PyPI 安装(例如使用 uv 或 pip),需要 Python 及该包运行时。图默认存储在 ~/.neurodock/cognitive-graph.sqlite,可用环境变量 NEURODOCK_GRAPH_DB_PATH 覆盖。未声明账户、API 密钥或网络访问。
安装前请注意
该服务器会写入本地 SQLite 文件,记录的事实和实体会持久保存,任何能访问该路径的程序都可读取。它本地优先,无网络访问和遥测,source 字符串按原样存储但从不抓取。此版本不含向量召回和嵌入。

安装

在 SourceWeft 中

  1. 打开 控制台中的 NeuroDock Cognitive Graph,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

neurodock-mcp-cognitive-graph

Persistent entity memory for the NeuroDock substrate, exposed as an MCP server. Externalises the user's working memory of people, projects, decisions, and concepts so a hyperfocused or context-switched session does not start from zero.

This is v0.0.3 — the current release. Vector recall, fastembed embeddings, and sqlite-vec are deferred to a future version; see CHANGELOG.md.

Install

sh
uv add neurodock-mcp-cognitive-graph# orpip install neurodock-mcp-cognitive-graph

Use as an MCP server

Add to your ~/.claude.json (Claude Code) or claude_desktop_config.json (Claude Desktop):

json
{  "mcpServers": {    "neurodock-cognitive-graph": {      "command": "uv",      "args": ["run", "neurodock-mcp-cognitive-graph"]    }  }}

Quickstart

bash
# From the workspace root.uv sync --all-packages
# Start the server on stdio (Claude Desktop / Claude Code MCP config).uv run neurodock-mcp-cognitive-graph

The server stores its graph at ~/.neurodock/cognitive-graph.sqlite by default. Override with the NEURODOCK_GRAPH_DB_PATH environment variable.

Tools (v0.0.3)

ToolPurpose
recall_entity(name_or_alias)Look up a person/project/decision/concept. Returns the entity, its facts (capped at 500), first-degree neighbours (capped at 20), and a resolution diagnostic.
record_fact(subject, predicate, object, source?, confidence?)Persist a typed-edge fact. Auto-creates entities by (type, name). Enforces the v0.1.0 eight-predicate vocabulary.
recall_decisions(project, since?)Return decisions for a project, ordered by date desc, capped at 200.
weekly_rollup(project?)Server-templated activity summary for the trailing seven UTC days. No LLM call (vendor boundary).

The full input/output contract is in schemas/. The Pydantic v2 models in src/neurodock_mcp_cognitive_graph/types.py mirror those schemas.

Predicate vocabulary

The eight predicates in v0.1.0 are: mentioned_in, decided_in, reports_to, depends_on, resolved_by, blocked_by, tagged, belongs_to. Unknown predicates raise PREDICATE_NOT_IN_VOCABULARY. Extension predicates land via the v0.2 type_extensions mechanism — see ADR 0002 — cognitive-graph tool design.

Privacy

  • Local-first. No network access. No telemetry.
  • source strings are stored verbatim and never fetched by the server.
  • User content (entity names, decision titles, fact text) is never logged. Error logs include only the structured error code.

Storage

SQLite. One file. Migrations live as numbered .sql files in src/neurodock_mcp_cognitive_graph/migrations/ and are applied on first connect. The schema is described in migrations/0001_init.sql.

Architecture

src/neurodock_mcp_cognitive_graph/├── server.py            FastMCP wiring + CLI entrypoint├── types.py             Pydantic v2 models (mirror of the JSON Schemas)├── config.py            Resolves the SQLite path├── clock.py             SystemClock / FixedClock├── errors.py            ToolError envelope├── resolution.py        Entity name/alias cascade (exact, alias only in v0.0.3)├── rollup.py            Heuristic decision/blocker/next-action assembly├── storage/│   ├── base.py          Storage Protocol + row dataclasses│   ├── memory.py        InMemoryStorage (used by tests)│   └── sqlite.py        SQLiteStorage (production backing)├── tools/│   ├── recall_entity.py│   ├── record_fact.py│   ├── recall_decisions.py│   └── weekly_rollup.py└── migrations/    └── 0001_init.sql

ADR pointers

Tests

bash
uv run pytest packages/mcp-cognitive-graph/tests/ -v

25 tests covering: per-tool unit tests, a FastMCP protocol-conformance suite that exercises every tool and validates the response against the JSON Schema using jsonschema, and an end-to-end test that runs against a real file-backed SQLite store.

来源:packages/mcp-cognitive-graph/README.md,提交 2d9cac6

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.0.6最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分