This SearXNG server provides web search and content retrieval capabilities with multiple customization options:
Web Search: Perform general queries, news, and article searches
Content Retrieval: Read and convert URL content into markdown
Filtering Options:
Pagination control to manage result sets
Time filtering (day, month, year)
Language filtering
Safe search content filtering
Integrates the SearXNG API to provide web search capabilities with pagination support, allowing for general queries, news, and article searches.
SearXNG MCP Server
An MCP server implementation that integrates the SearXNG API, providing web search capabilities.
Features
- Web Search: General queries, news, articles, with pagination.
- Pagination: Control which page of results to retrieve.
- Time Filtering: Filter results by time range (day, month, year).
- Language Selection: Filter results by preferred language.
- Safe Search: Control content filtering level for search results.
Tools
- searxng_web_search
- Execute web searches with pagination
- Inputs:
query
(string): The search query. This string is passed to external search services.pageno
(number, optional): Search page number, starts at 1 (default 1)time_range
(string, optional): Filter results by time range - one of: "day", "month", "year" (default: none)language
(string, optional): Language code for results (e.g., "en", "fr", "de") or "all" (default: "all")safesearch
(number, optional): Safe search filter level (0: None, 1: Moderate, 2: Strict) (default: instance setting)
- web_url_read
- Read and convert the content from a URL to markdown
- Inputs:
url
(string): The URL to fetch and process
Configuration
Setting the SEARXNG_URL
- Choose a SearxNG instance from the list of public instances or use your local environment.
- Set the
SEARXNG_URL
environment variable to the instance URL. - The default
SEARXNG_URL
value ishttp://localhost:8080
.
Using Authentication
If you are using a password protected SearxNG instance you can set a username and password for HTTP Basic Auth:
- Set the
AUTH_USERNAME
environmental variable to your username - Set the
AUTH_PASSWORD
environmental variable to your password
Proxy Support
The server supports HTTP and HTTPS proxies through environment variables. This is useful when running behind corporate firewalls or when you need to route traffic through a specific proxy server.
Proxy Environment Variables
Set one or more of these environment variables to configure proxy support:
HTTP_PROXY
: Proxy URL for HTTP requestsHTTPS_PROXY
: Proxy URL for HTTPS requestshttp_proxy
: Alternative lowercase version for HTTP requestshttps_proxy
: Alternative lowercase version for HTTPS requests
Proxy URL Formats
The proxy URL can be in any of these formats:
Usage Examples
With NPX:
With Docker:
Note: If no proxy environment variables are set, the server will make direct connections as normal.
HTTP Transport (Optional)
The server supports both STDIO (default) and HTTP transports:
STDIO Transport (Default)
- Best for: Claude Desktop and most MCP clients
- Usage: Automatic - no additional configuration needed
HTTP Transport
- Best for: Web-based applications and remote MCP clients
- Usage: Set the
MCP_HTTP_PORT
environment variable
HTTP Server Configuration:
HTTP Endpoints:
- MCP Protocol:
POST/GET/DELETE /mcp
- Health Check:
GET /health
- CORS: Enabled for web clients
Testing HTTP Server:
Usage with Claude Desktop
Installing via Smithery
To install SearxNG Server for Claude Desktop automatically via Smithery:
NPX
NPM
And then in your MCP config file:
Docker
Using Pre-built Image from Docker Hub
Add this to your claude_desktop_config.json
:
Build Locally
Use
Add this to your claude_desktop_config.json
:
Running evals
The evals package loads an mcp client that then runs the src/index.ts file, so there is no need to rebuild between tests. You can see the full documentation here.
For Developers
Contributing to the Project
We welcome contributions! Here's how to get started:
1. Fork and Clone
2. Development Setup
3. Development Workflow
- Create a feature branch:
- Make your changes in
src/
directory- Main server logic:
src/index.ts
- Error handling:
src/error-handler.ts
- Main server logic:
- Build and test:
- Run evals to ensure functionality:
4. Submitting Changes
Version Management & Releases
For Maintainers: Bumping Versions
The project uses semantic versioning. Use npm's version command to bump versions properly:
The postversion
script automatically:
- Updates the version in
src/index.ts
- Stages the changes
- Amends the version commit
Creating Release Tags
After bumping the version:
Publishing to NPM
Docker Release
Project Structure
Coding Guidelines
- Use TypeScript for type safety
- Follow existing error handling patterns
- Keep error messages concise but informative
- Add appropriate emoji indicators for error categories
- Test changes with the MCP inspector
- Run evals before submitting PRs
License
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
An MCP server implementation that integrates the SearXNG API, providing web search capabilities.
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server for connecting agentic systems to search systems via searXNG.Last updated -196MIT License
- -securityFlicense-qualityAn MCP server that integrates with SerpApi to retrieve search results from multiple search engines including Google, Bing, Yahoo, and others, enabling fast access to both live and archived search data.Last updated -14
- -securityAlicense-qualityAn MCP server that enables web searches using a SearxNG instance, allowing MCP-compatible applications like Goose to perform internet searches.Last updated -GPL 3.0
- AsecurityAlicenseAqualityAn MCP server that allows searching through public SearXNG instances by parsing HTML content into JSON results, enabling metasearch capabilities without requiring JSON API access.Last updated -115017MIT License