How to fix 'MCP error -32000: Connection closed' when configuring mcp-searxng with npx?
How should I configure mcp-searxng with npx on a Mac when my SearXNG runs on a remote server? The example config uses
npx -y <full path to mcp-searxng repo>/plus aSEARXNG_URLenv variable. Following that pattern givesMcpError: MCP error -32000: Connection closedin Claude Code and other MCP clients. What is the correct way to set this up?Originally asked on GitHub: https://github.com/ihor-sokoliuk/mcp-searxng/issues/6
6 answers
Status: fixed. The maintainer closed this issue as COMPLETED after reworking the project: you no longer need to clone the
mcp-searxngrepository. Use themcp-searxngNPM package and check the project README for the current invocation (the thread doesn't show the exact new config string).The config example from the issue body was:
json{ "mcpServers": { "searxng": { "command": "npx", "args": ["-y", "<full path to mcp-searxng repo>/"], "env": { "SEARXNG_URL": "YOUR_SEARXNG_INSTANCE_URL" } } } }The reporter asked what
<full path to mcp-searxng repo>/should be when SearXNG runs on a remote server. The maintainer first said to clone the repo on the Mac, use its full path, and setSEARXNG_URLto the remote instance. Follow-up comments reported the sameMcpError: MCP error -32000: Connection closedin Claude Code (started withuv run claude --mcp-debug) and in another MCP client. The maintainer explained the error means the server did not respond, and asked which client and SearXNG instance were being used, and whether public instances from https://searx.space (opens external site) behaved differently.Resolution: use the published NPM package instead of a local repo path; the maintainer validated it locally before closing. General advice if the error persists: confirm your client can reach the SearXNG URL, and test the same setup against a public instance to narrow down whether your own instance is the problem.
Did this work for you?What @ihor-sokoliuk tried on GitHub (Worked)
The maintainer changed the setup to use the
mcp-searxngNPM package instead of a local clone, tested and validated it locally, then closed the issue as COMPLETED.Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/6#issuecomment-2800450008 (opens external site)
Did this work for you?What @Abbie7737 tried on GitHub (Didn't work)
A Mac user ran Claude Code with
uv run claude --mcp-debug; the searxng MCP server was found but the connection failed withMCP error -32000: Connection closed.Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/6#issuecomment-2763911166 (opens external site)
Did this work for you?What @Twilight-9 tried on GitHub (Didn't work)
A user reported still being unable to use it, with
McpError: MCP error -32000: Connection closedin an MCP client other than Claude Desktop. They shared the error but no config details.Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/6#issuecomment-2746063576 (opens external site)
Did this work for you?What @ihor-sokoliuk tried on GitHub (Outcome unclear)
The maintainer asked which MCP client and SearXNG server were used, whether public instances from https://searx.space (opens external site) were tried, and explained that
Connection closedmeans the server did not respond.Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/6#issuecomment-2772802270 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Outcome unclear)
The reporter posted the config example and asked what
<full path to mcp-searxng repo>/should be on a Mac with a remote SearXNG instance.Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/6 (opens external site)
Did this work for you?
Related questions
- mcp-searxng in Claude Desktop: Unable to load package.json from AnthropicClaude app dir
- mcp-searxng: time_range fails zod validation because default '' is not in the enum
- mcp-searxng shows raw searxng_web_search tag in Roo Code instead of tool result
- Does mcp-searxng support PROXY_URL for proxy configuration?
- mcp-searxng 0.6.2 exits immediately with no error — fixed in 0.6.4?