mcp-searxng: 403 "Authentication required or IP blocked" against local SearXNG in Docker
I'm running mcp-searxng via
npx -y mcp-searxngin Claude Code (also tried in Crush) against a local SearXNG instance started from the searxng-docker repo. Searches work in the browser at http://localhost:8080, but the MCP server returnsSearXNG server Error (403): Authentication required or IP blocked. The MCP config uses"SEARXNG_URL": "http://localhost:8080". How do I resolve this 403?Originally asked on GitHub: https://github.com/ihor-sokoliuk/mcp-searxng/issues/27
5 answers
Status: explained. The maintainer's assumption was that the SearXNG instance does not have JSON output enabled, and a commenter with the exact same error confirmed that adding
jsonto thesearch.formatslist fixed it. The original reporter never confirmed the fix (they hadn't tested in weeks), so treat the answer below as the confirmed workaround, not as verified by the reporter.- Edit the SearXNG settings file (
core-config/settings.ymlin the searxng-docker layout; see the SearXNG admin settings docs: https://docs.searxng.org/admin/settings/settings.html (opens external site)) and add:
yamlsearch: formats: - html - json- Restart the SearXNG server.
- Retry the MCP client.
The SearXNG instance only produces the JSON response when
jsonis in the formats list; without it, mcp-searxng gets the generic 403. As another commenter noted, the error message is misleading: no authentication or IP block is actually involved, the missing piece is just the JSON search format.If you rely on a public SearXNG instance, the maintainer warned that most do not enable JSON. He suggested testing candidates with this command (requires
jq):curl -s https://searx.space/data/instances.json | jq -r '.instances | keys[]' | while read url; do echo -n "Testing $url... "; curl -s --max-time 5 "${url}search?q=test&format=json" | jq -e '.results' >/dev/null 2>&1 && echo "✓ WORKS" || echo "✗ FAILED"; doneDid this work for you?- Edit the SearXNG settings file (
What @0x00cl tried on GitHub (Worked)
A commenter hit the same 403 and fixed it by adding
jsonto thesearch.formatslist in the SearXNG settings file and reported it then worked.Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/27#issuecomment-3448414712 (opens external site)
Did this work for you?What @ihor-sokoliuk tried on GitHub (Outcome unclear)
The maintainer assumed JSON output was not enabled on the SearXNG instance and pointed to SearXNG docs for updating the settings; no confirmation from the reporter.
Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/27#issuecomment-3340789268 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
The reporter configured mcp-searxng in Claude Code and Crush with
npx -y mcp-searxngandSEARXNG_URL: http://localhost:8080against a Docker SearXNG; browser searches worked but the MCP call returned the 403.Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/27 (opens external site)
Did this work for you?What @ihor-sokoliuk tried on GitHub (Outcome unclear)
The maintainer suggested checking public SearXNG instances for JSON support with a curl/jq loop over searx.space data, noting almost all public instances fail it except a couple like https://searxng.canine.tools/ (opens external site)
Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/27#issuecomment-3459298865 (opens external site)
Did this work for you?
Related questions
- How to fix 'MCP error -32000: Connection closed' when configuring mcp-searxng with npx?
- 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?