web-search-mcp
Provides a WebSearch tool that queries a self-hosted SearXNG instance's JSON API and returns formatted markdown search results.
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., "@web-search-mcpWhat's the latest news on AI regulation?"
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.
web-search-mcp
A Python MCP server that exposes a WebSearch tool backed by a self-hosted SearXNG instance — a free, private web search engine.
Replace Claude's default web search with your own private instance. No API keys, no rate limits, no third-party tracking.
Quick Start
1. Clone and start SearXNG
git clone https://github.com/<username>/web-search-mcp.git
cd web-search-mcp2. I recommend using the SearXNG docker container method as this is a quick easy set up if you already have docker installed.
#Pull the image
docker pull searxng/searxng
# Start SearXNG in the background
docker compose -f infra/docker-compose.yml up -dSearXNG will be available at http://localhost:8080. This can be configured in /infra/docker-compose.yml.
3. Add the MCP server to Claude Code
You may need to replace the mcp_server.py path with a complete path rather than project relative path for claude to find it properly.
uv sync
claude mcp add web-search -- uv run --with "mcp[cli]" mcp run "src/web_search_mcp/mcp_server.py"That's it. Restart Claude Code and you'll have a WebSearch tool available in your conversations.
4. Use it
Ask Claude to perform WebSearch and return formatted results:
"What are the latest developments in quantum computing?"
Related MCP server: SearXNG MCP Server
Configuration
SearXNG URL
By default the tool connects to http://localhost:8080. If your SearXNG instance runs on a different port or host configured in docker-compose.yml:
You may need to replace the mcp_server.py path with a complete path rather than project relative path for claude to find it properly.
claude mcp add web-search \
--env SEARXNG_BASE_URL="http://localhost:8080" \
-- uv run --with "mcp[cli]" mcp run "src/web_search_mcp/mcp_server.py"Search Engines
Edit infra/data/searxng/settings.yml to add or disable search engines:
engines:
- name: google
engine: google
- name: wikipedia
engine: wikipedia
- name: duckduckgo
engine: duckduckgo
- name: bing
engine: bingRestart SearXNG after changes:
Note that occasional you may be timed out from certain search engines if you make very frequent requests, typically restarting your container resets these timers.
docker compose -f infra/docker-compose.yml restartStopping
docker compose -f infra/docker-compose.yml downClaude Code (via MCP protocol) └── web-search-mcp (Python MCP server) └── SearXNG (self-hosted search frontend)
The MCP server registers a single `WebSearch` tool that calls SearXNG's JSON API and returns results as a markdown-formatted string. Claude Code reads the markdown and presents it to you as a normal response.
## Requirements
- [Docker](https://www.docker.com/) (for SearXNG)
- Python 3.14+ (for the MCP server)
- [uv](https://github.com/astral-sh/uv) (for dependency management)
## License
SearXNG is licensed under the GNU Affero General Public License v3. See [searxng/searxng](https://github.com/searxng/searxng) for details.Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to perform privacy-respecting web searches through SearXNG, with support for multiple search engines, categories, and advanced filtering options.24
- AlicenseAqualityDmaintenanceEnables web search, image search, and news search through a self-hosted SearXNG instance. Provides privacy-focused meta-search capabilities aggregating results from multiple search engines.31MIT
- FlicenseAqualityDmaintenanceEnables privacy-respecting web, image, video, and news searches through SearxNG metasearch engine, with options for URL fetching and time filtering.5
- AlicenseAqualityDmaintenanceEnables private web search and webpage content extraction using a local SearxNG instance, prioritizing user privacy and autonomy.22MIT
Related MCP Connectors
Serper MCP — wraps the Serper Google Search API (serper.dev)
The best web search for your AI Agent
Multi-engine search for AI agents. Trust scoring, local corpus, MCP-native. Self-hostable, BYOK.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/LMilazzo/FreeSearch-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server