This MCP Server allows AI assistants to access websites and search the web safely, with clear feedback and helpful error messages. It provides a secure way for AI systems to interact with online resources while maintaining transparency about actions taken.
The easiest way to run the MCP Server is using Docker:
docker-compose.yml
with the following content:services:
mcp-server:
environment:
# Required: URL for your SearXNG instance's Search API
- SEARXNG_QUERY_URL=http://searxng:8080
# Optional: Configure network mode (SSE) for LibreChat etc.
- SSE_HOST=0.0.0.0
- SSE_PORT=8080
# Optional: Set a custom User-Agent for web requests
- USER_AGENT=MCP-Server/1.0 (github.com/tcpipuk/mcp-server)
image: ghcr.io/tcpipuk/mcp-server/server:latest
ports: # Only needed if using SSE_HOST/SSE_PORT
- "8080:8080" # Expose port 8080 on host
restart: unless-stopped
stop_grace_period: 1s
# Example SearXNG service (optional, adapt as needed)
# searxng:
# environment:
# - SEARXNG_BASE_URL=http://searxng:8080 # Ensure SearXNG knows its own URL
# image: searxng/searxng:latest
# restart: unless-stopped
# volumes:
# - ./searxng:/etc/searxng:rw
docker compose up -d
Important: You must provide the SEARXNG_QUERY_URL
environment variable pointing to your SearXNG instance's Search API endpoint.
For those who prefer running directly on their system:
uv
(requires Python 3.13+):curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv
source .venv/bin/activate # Linux/macOS
# or
.venv\Scripts\activate # Windows
uv sync
# Required: URL for your SearXNG instance's Search API
export SEARXNG_QUERY_URL="http://your-searxng-instance.local:8080"
# Optional: Custom User-Agent
export USER_AGENT="CustomAgent/1.0"
# For network (SSE) mode (e.g., for LibreChat)
mcp-server --sse-host 0.0.0.0 --sse-port 3001
# For direct stdio mode (e.g., for Claude Desktop)
mcp-server
The MCP Server supports two connection modes:
Use this mode when connecting from LibreChat or other networked clients. The server listens on a network port for connections.
For LibreChat integration, add this to your librechat.yaml
(assuming SSE_PORT=8080
):
mcpServers:
mcp-server:
iconPath: "/path/to/icon.png" # Optional: Custom icon
label: "MCP Web/Search" # Optional: Custom label shown in UI
type: sse
url: http://mcp-server:8080/sse # Adjust host/port if needed
This mode is useful for local testing or with Claude Desktop. The server communicates directly via standard input/output.
The MCP Server provides two powerful tools:
Allows AI assistants to search the web via SearXNG for current information, specific resources, or to perform calculations.
Enables AI assistants to access websites and process their content. It can:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "mcp-server" '{"command":"docker","args":["run","--rm","-i","-e","SEARXNG_QUERY_URL=http://your-searxng-instance:8080","ghcr.io/tcpipuk/mcp-server/server:latest"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"SEARXNG_QUERY_URL=http://your-searxng-instance:8080",
"ghcr.io/tcpipuk/mcp-server/server:latest"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"mcp-server": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e",
"SEARXNG_QUERY_URL=http://your-searxng-instance:8080",
"ghcr.io/tcpipuk/mcp-server/server:latest"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect