mindgraph-mcp 0.13.5 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +71 -3
- package/dist/cli.js +2941 -216
- package/dist/index.js +2145 -160
- package/package.json +2 -2
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -47,9 +47,63 @@ Or drop this into your Claude Desktop config by hand (`~/Library/Application Sup
|
|
|
47
47
|
}
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
### Coding agents (Claude Code)
|
|
51
|
+
|
|
52
|
+
The **coding profile** turns MindGraph into a durable work substrate for coding
|
|
53
|
+
agents: identity-stable code anchors (federated live against a local
|
|
54
|
+
[codegraph](https://github.com/colbymchenry/codegraph) index), graph-managed
|
|
55
|
+
tasks/plans/iterations with fenced leases, and a deterministic work brief that
|
|
56
|
+
lets a fresh session resume exactly where the last one stopped — across
|
|
57
|
+
sessions, crashes, and machines.
|
|
58
|
+
|
|
59
|
+
One command:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
npx -y mindgraph-mcp install-code --api-key mg_your_key_here --hooks
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This registers the MCP server with the coding profile AND installs the Claude
|
|
66
|
+
Code hooks (session lifecycle + work-brief injection) with persisted connection
|
|
67
|
+
settings. Prefer separate steps? `install-code` alone registers just the
|
|
68
|
+
server, and `install-hooks --harness claude-code --scope user --api-key …`
|
|
69
|
+
adds the hooks later.
|
|
70
|
+
|
|
71
|
+
**Optional — enable code intelligence**: install
|
|
72
|
+
[codegraph](https://github.com/colbymchenry/codegraph) and run `codegraph init`
|
|
73
|
+
in your repositories. This powers `mindgraph_code`'s anchors and live
|
|
74
|
+
callers/impact federation. Without it, memory and work tools function fully;
|
|
75
|
+
code anchoring degrades to typed unavailable results (the installer tells you
|
|
76
|
+
which state you're in).
|
|
77
|
+
|
|
78
|
+
The hooks open/rebind a Session at start and inject the current work brief,
|
|
79
|
+
stamp every MindGraph tool call with verified session/repo/commit provenance,
|
|
80
|
+
and prompt one reflection checkpoint before a substantial session ends. They
|
|
81
|
+
**fail open** — if MindGraph is unreachable, your coding session is never
|
|
82
|
+
blocked. `--scope project` (with `--project-dir`) installs into a single
|
|
83
|
+
repository's `.claude/settings.json` instead; `uninstall-hooks` reverses either
|
|
84
|
+
cleanly. Connection settings persist to `~/.mindgraph/hooks.json` (mode 600) so
|
|
85
|
+
hooks work regardless of shell environment; the API key is never written into
|
|
86
|
+
project settings.
|
|
87
|
+
|
|
88
|
+
### Coding agents (Codex)
|
|
89
|
+
|
|
90
|
+
The server is harness-neutral — Codex gets the full coding tool surface today:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
codex mcp add mindgraph --env MINDGRAPH_API_KEY=mg_your_key_here \
|
|
94
|
+
--env MINDGRAPH_PROFILE=coding --env MINDGRAPH_HARNESS=codex \
|
|
95
|
+
-- npx -y mindgraph-mcp@latest
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
(or the equivalent `[mcp_servers.mindgraph]` block in Codex's `config.toml`).
|
|
99
|
+
The hooks adapter for Codex — automatic session lifecycle and brief injection —
|
|
100
|
+
is planned; until then, ask the agent to call `mindgraph_plan resume_work` at
|
|
101
|
+
the start of a session.
|
|
102
|
+
|
|
50
103
|
## What You Get
|
|
51
104
|
|
|
52
|
-
**8 tools** covering the full knowledge-graph workflow
|
|
105
|
+
**8 tools** covering the full knowledge-graph workflow (**10** in the coding
|
|
106
|
+
profile):
|
|
53
107
|
|
|
54
108
|
| Tool | Purpose |
|
|
55
109
|
|------|---------|
|
|
@@ -61,6 +115,14 @@ Or drop this into your Claude Desktop config by hand (`~/Library/Application Sup
|
|
|
61
115
|
| `mindgraph_ingest` | Chunk / document / session ingestion with LLM-powered extraction |
|
|
62
116
|
| `mindgraph_synthesize` | Project-scoped cross-document synthesis — mine signals, spawn Article-generation jobs |
|
|
63
117
|
| `mindgraph_ontology` | Operational Ontology (Layer 7) — typed domain objects, NL queries with provenance, extraction proposal review (approve/reject), object linking |
|
|
118
|
+
| `mindgraph_code` *(coding profile)* | Identity-stable code anchors + live structural federation: `anchor`/`recall`/`expand`/`affected` over a local codegraph index — what the graph knows about this code, joined to who calls it |
|
|
119
|
+
| `mindgraph_sync` *(coding profile)* | Idempotent, resumable import of markdown memory files (`.claude/agent-memory/**` etc.) with content-hash drift tracking, conflict surfacing, and a retirement report |
|
|
120
|
+
|
|
121
|
+
The coding profile's `mindgraph_plan` additionally carries the durable-work
|
|
122
|
+
composites: `resume_work` (deterministic bounded brief), `claim_task` /
|
|
123
|
+
`heartbeat` (fenced leases), and `start_iteration` / `checkpoint_iteration` /
|
|
124
|
+
`block_task` / `complete_task` / `abandon_iteration` (idempotent material
|
|
125
|
+
attempts with version conflict detection).
|
|
64
126
|
|
|
65
127
|
Plus **dynamically generated read tools**: when the tenant's active schema declares object types, the server renders per-type `search_<objs>` / `get_<obj>` / `summarize_<obj>` tools (from the cloud's `GET /v1/ontology/tools` manifest) at session start. `summarize_<obj>` returns the object — whether mapped from a connected SQL database or extracted from documents — *plus* its cognitive context (claims, risks, decisions, evidence).
|
|
66
128
|
|
|
@@ -81,13 +143,16 @@ Plus **dynamically generated read tools**: when the tenant's active schema decla
|
|
|
81
143
|
mindgraph-mcp Start the MCP server (stdio transport)
|
|
82
144
|
mindgraph-mcp init Interactive setup
|
|
83
145
|
mindgraph-mcp install Install into Claude Desktop config
|
|
84
|
-
mindgraph-mcp install-code Install into Claude Code
|
|
146
|
+
mindgraph-mcp install-code Install into Claude Code (--hooks: also install session hooks)
|
|
85
147
|
mindgraph-mcp uninstall Remove from Claude Desktop config
|
|
86
148
|
mindgraph-mcp uninstall-code Remove from Claude Code
|
|
149
|
+
mindgraph-mcp install-hooks Install Claude Code hooks (--harness claude-code)
|
|
150
|
+
mindgraph-mcp uninstall-hooks Remove MindGraph-owned hook entries
|
|
87
151
|
mindgraph-mcp status Show installation status
|
|
88
152
|
```
|
|
89
153
|
|
|
90
|
-
Options: `--api-key <key>`, `--base-url <url>`, `--
|
|
154
|
+
Options: `--api-key <key>`, `--base-url <url>`, `--scope user|project`,
|
|
155
|
+
`--project-dir <dir>`, `--harness <name>`, `--help`.
|
|
91
156
|
|
|
92
157
|
## Environment
|
|
93
158
|
|
|
@@ -95,8 +160,11 @@ Options: `--api-key <key>`, `--base-url <url>`, `--help`.
|
|
|
95
160
|
|----------|---------|---------|
|
|
96
161
|
| `MINDGRAPH_API_KEY` | *(required)* | Your MindGraph API key (`mg_…`) |
|
|
97
162
|
| `MINDGRAPH_BASE_URL` | `https://api.mindgraph.cloud` | Override for self-hosted deployments |
|
|
163
|
+
| `MINDGRAPH_PROFILE` | `general` | `coding` exposes `mindgraph_code`/`mindgraph_sync` and the work composites |
|
|
164
|
+
| `MINDGRAPH_HARNESS` | `generic` | `claude-code` / `codex` — adapter selection and provenance |
|
|
98
165
|
| `MINDGRAPH_AGENT_ID` | `mcp` | Stamped onto every node/edge written by the MCP — useful for provenance across multiple agents |
|
|
99
166
|
| `MINDGRAPH_ORG_ID` | *(unset)* | Pin operations to a specific organization when a key has access to more than one |
|
|
167
|
+
| `MINDGRAPH_CODEGRAPH_BIN` | *(auto)* | Explicit path to the codegraph binary (PATH and `~/.local/bin` are probed) |
|
|
100
168
|
|
|
101
169
|
## Usage in Claude
|
|
102
170
|
|