Merge pull request #1679 from ousamabenyounes/fix/issue-1297

fix: set cwd to homedir when spawning chroma-mcp to prevent pydantic .env.local crash (#1297)
This commit is contained in:
Alex Newman
2026-04-14 18:41:48 -07:00
committed by GitHub
2 changed files with 59 additions and 0 deletions
+6
View File
@@ -120,10 +120,16 @@ export class ChromaMcpManager {
args: uvxSpawnArgs.join(' ')
});
// Run chroma-mcp from the home directory so that pydantic-settings (used
// by chroma-mcp internally) does not pick up .env / .env.local files from
// the project directory. Those files often contain project-specific vars
// that pydantic rejects with "Extra inputs are not permitted", crashing the
// subprocess immediately. Fixes #1297.
this.transport = new StdioClientTransport({
command: uvxSpawnCommand,
args: uvxSpawnArgs,
env: spawnEnvironment,
cwd: os.homedir(),
stderr: 'pipe'
});