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
# Update MCP server config paths to use process.cwd()
24
+
25
+
Updates the default configuration for the `knowledge-base` and `memory-core` MCP servers to resolve database and backup paths relative to `process.cwd()` instead of `__dirname`.
26
+
27
+
**Why:**
28
+
Previously, paths were resolved relative to `__dirname` (the location of the config file inside the package).
29
+
- In the Neo.mjs repo, this worked because the relative path `../../../../` pointed to the repo root.
30
+
- In scaffolded apps (where Neo.mjs is a dependency in `node_modules`), this relative path resolved to the `neo.mjs` package root inside `node_modules`, causing databases and backups to be stored inside `node_modules` instead of the application workspace.
31
+
32
+
**What:**
33
+
By using `process.cwd()`, we align with standard Node.js tooling behavior:
34
+
-**Dev Mode:** Running from the Neo.mjs repo root places artifacts in the repo root.
35
+
-**App Mode:** Running from a scaffolded app's root places artifacts in the app's root.
36
+
37
+
**Changes:**
38
+
-`ai/mcp/server/memory-core/config.mjs`: Update `memoryDb.path`, `memoryDb.backupPath`, and `sessionDb.backupPath`.
39
+
-`ai/mcp/server/knowledge-base/config.mjs`: Update `path` and `dataPath`.
40
+
41
+
## Comments
42
+
43
+
### @tobiu - 2025-12-02 14:59
44
+
45
+
**Input from Gemini:**
46
+
47
+
> ✦ I have implemented the path resolution changes.
48
+
>
49
+
> **Summary of Changes:**
50
+
> - Updated `ai/mcp/server/memory-core/config.mjs` and `ai/mcp/server/knowledge-base/config.mjs`.
51
+
> - Replaced `__dirname`-based relative paths with `process.cwd()`-based absolute paths.
52
+
> - This ensures that databases and backups are correctly located in the workspace root (e.g., `chroma-neo-memory-core`) regardless of whether the server is run from the repo root or as a dependency in a scaffolded app.
53
+
> - Applied code formatting improvements (block alignment) to align with project standards.
0 commit comments