mcp-searxng-local
Provides access to arXiv search results via a self-hosted SearXNG instance.
Provides access to Brave search results via a self-hosted SearXNG instance.
Provides access to DuckDuckGo search results via a self-hosted SearXNG instance.
Provides access to Google search results via a self-hosted SearXNG instance.
Integrates with SearXNG to perform web searches across multiple engines with automatic fallback and rate limit handling.
Provides access to Wikipedia search results via a self-hosted SearXNG instance.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-searxng-localsearch for latest AI news"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-searxng-local
MCP server for web search via SearXNG — zero API keys, zero cost, 100% local.
Why not Exa? Costs money. Why not Brave? Requires API key. This: self-hosted, unlimited queries, your data never leaves your machine.
Rate Limit Handling & Fallback
Search engines (Google, DuckDuckGo, Brave) frequently block server IPs with CAPTCHAs or rate limits. mcp-searxng-local handles this automatically:
Local query — queries your self-hosted SearXNG with configured engines
Detection — if all engines return 0 results and are marked unresponsive, triggers fallback
Fallback — automatically retries against public SearXNG instances in order
Transparent — response always includes
## Unresponsive Enginessection showing what failed and why
# Configure fallback instances (comma-separated, tried in order)
export SEARXNG_FALLBACK_URLS="https://search.rhscz.eu,https://searx.tiekoetter.com,https://searxng.website"Pre-configured in opencode.json with 3 public instances. Works out of the box — no setup needed.
Related MCP server: searxng-mcp
Prerequisites
Quick Start
git clone https://github.com/dduartee/mcp-searxng-local
cd mcp-searxng-local
npm install && npm run build
docker compose up -d
# Verify SearXNG is responding
curl -s "http://localhost:4000/search?q=test&format=json" | python3 -c "import sys,json; print(len(json.load(sys.stdin).get('results',[])), 'results')"
# Verify MCP server works
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.js
# Expected: {"jsonrpc":"2.0","id":1,"result":{"tools":[...]}}Then add to your MCP client config below. Restart your client for the tools to appear.
Path note: replace
/home/user/mcp-searxng-localin examples below with your actual clone path.
Why mcp-searxng-local?
Exa MCP | Brave MCP | mcp-searxng-local | |
API key | Required | Required | None |
Cost | Paid (limited free) | 2k/mo free | Unlimited |
Privacy | Cloud (USA) | Cloud | 100% local |
Engines | Proprietary index | Brave only | Google, DDG, Brave, Wikipedia, arXiv |
Highlights | AI (paid) | No | Keyword matching (free) |
Cache | Server-side | No | LRU local (5min TTL) |
Tools
web_search / web_search_advanced
Parameter | Type | Default | Description |
| string | (required) | Search query |
| number |
| Results (1-50) |
| number |
| Page number |
| enum | — |
|
| enum | — |
|
| string | — |
|
| string[] | — | Only results from these domains |
| string[] | — | Exclude these domains |
| string | — |
|
| number | — |
|
| string | — | ISO date: |
| string | — | ISO date: |
Response includes: results + direct answers, infoboxes, spelling suggestions, search suggestions, and unresponsive engine diagnostics.
web_fetch
Parameter | Type | Default | Description |
| string | (required) | Full URL |
| number |
| Character limit (100-50000) |
| enum |
|
|
| string | — | Required for |
Highlights tip: Results are typically ~98% smaller than full page text. Use mode=highlights with the same query that led you to the URL.
Setup
After adding the config, restart your MCP client for the tools to appear.
OpenCode
# CLI (adds to global config)
opencode mcp add mcp-searxng-local -- node /home/user/mcp-searxng-local/dist/index.js// Project config: ./opencode.json (relative path)
{ "mcp": { "mcp-searxng-local": { "type": "local", "command": ["node", "dist/index.js"] } } }
// Global config: ~/.config/opencode/opencode.json (absolute path)
{ "mcp": { "mcp-searxng-local": { "type": "local", "command": ["node", "/home/user/mcp-searxng-local/dist/index.js"] } } }Claude Code
{
"mcpServers": {
"mcp-searxng-local": {
"command": "node",
"args": ["/home/user/mcp-searxng-local/dist/index.js"],
"env": { "SEARXNG_HOST": "localhost", "SEARXNG_PORT": "4000" }
}
}
}Cursor
// .cursor/mcp.json
{ "mcpServers": { "mcp-searxng-local": { "command": "node", "args": ["/home/user/mcp-searxng-local/dist/index.js"] } } }VS Code · Windsurf · Zed · Codex · Antigravity
See Install Guide for all client configs.
Configuration
Env var | Default | Description |
|
| SearXNG host |
|
| SearXNG port |
|
| HTTP timeout (ms) |
| — | Comma-separated public SearXNG URLs (auto-retry when local engines are rate-limited or blocked) |
|
| Enable verbose logging |
Also accepts MCP_SEARCH_LOCAL_ prefix: MCP_SEARCH_LOCAL_SEARXNG_HOST, MCP_SEARCH_LOCAL_SEARXNG_PORT, MCP_SEARCH_LOCAL_TIMEOUT, MCP_SEARCH_LOCAL_DEBUG.
Troubleshooting
Symptom | Cause | Fix |
Tools don't appear | Path wrong or build missing | Run |
| SearXNG not running |
|
| Engine blocked/rate-limited | Auto-fallback handles this — no action needed. Add |
All engines return 0 results + all unresponsive | Server IP blocked by search providers | Set |
Fallback returns 0 results too | Public instances also blocked or down | Try different instances in |
Highlights returns full page | Page has no paragraph breaks or all text matches query | Use |
| Page is slow or .js-heavy SPA | Reduce |
Testing
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | node dist/index.js
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"web_search","arguments":{"query":"test"}}}' | node dist/index.js
npm test # 28 unit tests
npm run inspector # MCP Inspector UIArchitecture
MCP Client (OpenCode, Claude Code, Cursor...)
│ stdio or Streamable HTTP
▼
mcp-searxng-local (Node.js + TypeScript)
│ HTTP + LRU cache + exponential backoff retry
▼
SearXNG (Docker) ← Google, DuckDuckGo, Brave, Wikipedia, arXiv
│ if all engines unresponsive → auto-fallback
▼
Public SearXNG instances (search.rhscz.eu, searx.tiekoetter.com, ...)Documentation
Doc | Description |
Project, global, and plugin-based setup | |
Real agent workflows and CLI usage | |
Internal design, data flow, decisions | |
What AI agents actually need from search | |
vs Exa, Brave, SearXNG raw, Chrome DevTools |
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dduartee/mcp-searxng-local'
If you have feedback or need assistance with the MCP directory API, please join our Discord server