SearXNG MCP Server
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
SearXNG MCP Server
A Model Context Protocol (MCP) server that enables AI assistants to perform web searches using SearXNG, a privacy-respecting metasearch engine.
Features
- Perform web searches with customizable parameters
- Support for multiple search engines
- Privacy-focused search results
- Optional basic authentication for SearXNG instances
- Markdown-formatted search results
- Sensible default values for all parameters
Installation
Prerequisites
- Node.js (v16 or higher)
- npm (v7 or higher)
- Access to a SearXNG instance (self-hosted or public)
Install from source
Configuration
The SearXNG MCP server can be configured with the following environment variables:
SEARXNG_URL
(optional): The URL of your SearXNG instance (e.g.,https://searx.example.com
). If not provided, a random public instance will be selected.USE_RANDOM_INSTANCE
(optional): Set to "false" to disable random instance selection when no URL is provided. Default is "true".SEARXNG_USERNAME
(optional): Username for basic authenticationSEARXNG_PASSWORD
(optional): Password for basic authentication
You can set these environment variables in a .env
file in the root directory of the project:
Usage
Running the server
Integrating with Claude Desktop
- Open Claude Desktop
- Go to Settings > MCP Servers
- Add a new MCP server with the following configuration:Copy
Integrating with Claude in VSCode
- Open VSCode
- Go to Settings > Extensions > Claude > MCP Settings
- Add a new MCP server with the following configuration:Copy
Usage with Smolagents
SearXNG MCP can be easily integrated with Smolagents, a lightweight framework for building AI agents. This allows you to create powerful research agents that can search the web and process the results:
Available Tools
searxngsearch
Perform web searches using SearXNG, a privacy-respecting metasearch engine. Returns relevant web content with customizable parameters.
Parameters
Parameter | Type | Description | Default | Required |
---|---|---|---|---|
query | string | Search query | - | Yes |
language | string | Language code for search results (e.g., 'en', 'de', 'fr') | 'en' | No |
time_range | string | Time range for search results. Options: 'day', 'week', 'month', 'year' | null | No |
categories | array of strings | Categories to search in (e.g., 'general', 'images', 'news') | null | No |
engines | array of strings | Specific search engines to use | null | No |
safesearch | number | Safe search level: 0 (off), 1 (moderate), 2 (strict) | 1 | No |
pageno | number | Page number for results. Must be minimum 1 | 1 | No |
max_results | number | Maximum number of search results to return. Range: 1-50 | 10 | No |
Example
Development
Setup
Build
Watch mode (for development)
Testing with MCP Inspector
License
MIT
This server cannot be installed
A Model Context Protocol server that enables AI assistants to perform web searches using SearXNG, a privacy-respecting metasearch engine.