Can't use MPC servers with spawn Unknown system error -8
Status Fixed / completed
Maintainer reply ✓ Yes — ashwin-ant
Activity 7 comments · opened Feb 27, 2025 · closed Feb 28, 2025
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
Hello there,
I can't get rid of this error in the logs
[
{
"error": "Connection failed: spawn Unknown system error -8",
"timestamp": "2025-02-27T06:59:09.346Z",
"sessionId": "0b3dd2be-334f-4e29-9ae3-4eee16b40d53",
"cwd": "/Users/theophile/tests/basalt"
}
]
Using node v22.13.1 through nvm on macOs Sequoia 15.3.1 on M2
Tried zsh & bash with the same output
Any ideas ?
7 Comments
Your MCP server may have some bug. Does it work with the MCP inspector? https://modelcontextprotocol.io/docs/tools/inspector
Seems like it works well. Also it works with claude desktop app but not with claude-code 🤔
!Image
My mcp config
The command i'm running
Inside claude desktop
<img width="1078" alt="Image" src="https://github.com/user-attachments/assets/673431e8-d82f-4d37-83e8-935d7cdbb711" />
Could it be file permissions on the json config ?
We don't support adding a JSON file directly from the command line. Try this:
Wow ok it works now thank you very much !!!
so i found this documentation kind of confusing:
based on what you are saying @ashwin-ant, we create a new mcp server called "postgres". and we do it by pulling in the mcp/postgres docker image + and running it. and then that image takes as it's command the db connection string.
is that right?
@ekeric13 In that command, the server name is
postgres-serverand its command to run is/path/to/postgres-mcp-server. So Claude Code will spawn the MCP server by running/path/to/postgres-mcp-server --connection-string "postgresql://user:pass@localhost:5432/mydb".You may find the MCP wizard easier to use than that command. Just run
claude mcp addand it'll start the wizard. Alternatively you can add a server via a JSON string. In the postgres example, it'd be:This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.