You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docs: two MCPs, Kuzu lock, LSP path; resolve LSP from repo root
- Add docs/MCP-AND-KUZU.md (sysmledgraph vs sysml-v2, no conflict; Kuzu lock; LSP path)
- LSP resolver: walk up from cwd to find node_modules/sysml-v2-lsp (e.g. repo root)
- README: env note, link to MCP-AND-KUZU.md
- chore: release v0.3.0
Made-with: Cursor
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ npx sysmledgraph clean
69
69
**Options and environment:**
70
70
71
71
-**`--storage <path>`** — Override the storage root (default: `~/.sysmledgraph`). Same as env **`SYSMEDGRAPH_STORAGE_ROOT`**.
72
-
-**`SYSMLLSP_SERVER_PATH`** — Optional. Path to the sysml-v2-lsp server JS (e.g. `dist/server/server.js`). If unset, the CLI uses `node_modules/sysml-v2-lsp/dist/server/server.js` (must be built).
72
+
-**`SYSMLLSP_SERVER_PATH`** — Optional. Path to the sysml-v2-lsp server JS (e.g. `dist/server/server.js`). If unset, the CLI looks in local `node_modules` and then walks up from the current working directory (e.g. repo root when run from a subfolder like `tools/sysmledgraph`).
73
73
74
74
**Storage layout:** Under the storage root: `registry.json` (list of indexed paths), and `db/<sanitized-path>.kuzu` (one Kuzu database per indexed path). On failure, the CLI writes errors to stderr and exits non-zero.
75
75
@@ -154,7 +154,7 @@ For ad-hoc Cypher or exporting the graph without MCP:
154
154
-`bin/cli.ts` — CLI entrypoint.
155
155
-`mcp/index.ts` — MCP server entrypoint (stdio).
156
156
-`test/` — Unit and integration tests.
157
-
-`docs/` — [INSTALL_NOTES.md](docs/INSTALL_NOTES.md) (slow install, Windows workarounds), [grammar-and-mapping.md](docs/grammar-and-mapping.md).
|**Uses LSP**| Spawns `server.js` (stdio) only when indexing | Runs `mcpServer.js` as the MCP server |
9
+
|**Uses Kuzu**| Yes (one DB per indexed path) | No |
10
+
|**Same package**| Same sysml-v2-lsp package, different entry points (`server.js` vs `mcpServer.js`) | Same |
11
+
12
+
So there is **no MCP-vs-MCP conflict**. The sysml-v2 MCP does not use Kuzu, so the two MCPs don’t contend over the database.
13
+
14
+
---
15
+
16
+
## Kuzu lock
17
+
18
+
**Only sysmledgraph uses Kuzu.** The “Could not set lock on file” (or similar) error happens when the **same DB file is opened more than once**:
19
+
20
+
- MCP has the DB open and you run the sysmledgraph **CLI** (e.g. `npx sysmledgraph analyze`), or
21
+
- Two connections to the same DB in one process (we fixed that with a connection cache in the MCP).
22
+
23
+
**Fixes:**
24
+
25
+
-**Within one process:** The MCP uses a single cached connection per DB path (v0.2.0+), so repeated/concurrent tool calls don’t open the same file twice.
26
+
-**Across processes:** Only one writer at a time. If you do a full re-index from the CLI, close Cursor (or stop the sysmledgraph MCP) first, or run the CLI when the MCP isn’t using that DB.
27
+
28
+
---
29
+
30
+
## “sysml-v2-lsp not found” / LSP path
31
+
32
+
That was **path resolution**: the sysmledgraph CLI (or MCP) was only looking in its own `node_modules` (e.g. `tools/sysmledgraph/node_modules/...`) and didn’t see the LSP at **repo root**.
33
+
34
+
**Fixes:**
35
+
36
+
- Resolver now also checks **repo root** (and parent directories) for `node_modules/sysml-v2-lsp/dist/server/server.js`, so when sysmledgraph runs from a subfolder (e.g. `tools/sysmledgraph`), it can find the LSP at the repo root.
37
+
- You can always set **SYSMLLSP_SERVER_PATH** to the absolute path of your built `dist/server/server.js` if you want to point at a specific LSP install.
38
+
39
+
The sysml-v2 MCP runs from repo root and uses `mcpServer.js`; it doesn’t depend on this resolver and doesn’t block it.
-**Docs: Two MCPs, Kuzu lock, LSP path** — New [docs/MCP-AND-KUZU.md](docs/MCP-AND-KUZU.md) explains how sysmledgraph and the sysml-v2 MCP relate (no conflict; only sysmledgraph uses Kuzu), when Kuzu lock happens (same DB opened twice), and how to avoid it. Also documents the "sysml-v2-lsp not found" path-resolution fix.
4
+
-**LSP path resolution** — Resolver now walks up from the current working directory to find `node_modules/sysml-v2-lsp/dist/server/server.js`. When sysmledgraph runs from a subfolder (e.g. `tools/sysmledgraph`), it can use the LSP at repo root without setting `SYSMLLSP_SERVER_PATH`.
5
+
-**README** — CLI env note and project layout link to MCP-AND-KUZU.md.
0 commit comments