Frontmatter
| id | 9670 |
| title | Fix MCP server path resolution dependencies on process.cwd() |
| state | Closed |
| labels | bugai |
| assignees | tobiu |
| createdAt | Apr 4, 2026, 1:29 AM |
| updatedAt | Apr 4, 2026, 1:32 AM |
| githubUrl | https://github.com/neomjs/neo/issues/9670 |
| author | tobiu |
| commentsCount | 0 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Apr 4, 2026, 1:32 AM |
Fix MCP server path resolution dependencies on process.cwd()
Closedbugai
When spawning MCP node servers (like
knowledge-baseandmemory-core) from external tools,process.cwd()evaluates to the runner's working directory rather than the Neo.mjs repository root.This causes silent failures, specifically causing the knowledge-base synchronization to extract 0 chunks because it incorrectly looks for the
srcfolder inside the runner's working directory.Resolution: Replace all instances of
process.cwd()inside the MCP servers with a deterministic absolute path computed relative to the running module's location (neoRootDir), ensuring consistent file resolution regardless of how the script is executed.