Prepare the server locally
Run this once before adding it to Claude Code.
git clone https://github.com/Pascalrjt/SearXNG-Websearch-MCP.git
cd SearXNG-Websearch-MCP
npm install
npm run buildRegister it in Claude Code
claude mcp add searxng-websearch -- node /path/to/SearXNG-Websearch-MCP/dist/index.jsReplace any placeholder paths in the command with the real path on your machine.
Make your agent remember this setup
searxng-websearch's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- Privacy-focused web search via local SearXNG instance
- Concurrent search execution for multiple queries
- Automatic result caching with configurable TTL
- Advanced filtering including domain exclusion and time-range limits
- Deduplication of search results by domain
Tools 3
web_searchPerform a single web search with advanced filtering options.multi_searchPerform multiple searches concurrently for efficient information gathering.clear_cacheClear the search results cache to free memory or force fresh results.Try it
Original README from Pascalrjt/SearXNG-Websearch-MCP
SearXNG MCP Server for LM Studio
A Model Context Protocol (MCP) server that provides web search capabilities to local LLMs running in LM Studio using a privacy-focused local SearXNG instance.
Features
- Web Search: Search the web using your local SearXNG instance
- Concurrent Searches: Execute multiple searches simultaneously
- Result Caching: Automatic caching with configurable TTL to reduce API calls
- Advanced Filtering: Filter results by domain, deduplicate, and limit results
- Privacy-First: All searches run through your local SearXNG instance
- High Performance: Built with TypeScript and async/await for optimal performance
Quick Start
1. Install and Build
# Clone the repository
git clone https://github.com/Pascalrjt/SearXNG-Websearch-MCP.git
cd SearXNG-Websearch-MCP
# Install dependencies and build
npm install
npm run build
2. Start SearXNG
npm run docker:up
Verify SearXNG is running by visiting http://localhost:8080 in your browser.
3. Configure LM Studio
Add to your LM Studio MCP configuration file:
{
"mcpServers": {
"websearch-searxng": {
"command": "node",
"args": ["/path/to/SearXNG-Websearch-MCP/dist/index.js"],
"env": {}
}
}
}
Config file location:
- macOS:
~/Library/Application Support/LM Studio/mcp_config.json - Windows:
%APPDATA%\LM Studio\mcp_config.json - Linux:
~/.config/lm-studio/mcp_config.json
Note: Replace /path/to/SearXNG-Websearch-MCP with your actual installation path.
4. Restart LM Studio
Close and reopen LM Studio for the MCP server to be recognized.
5. Test It Out
Try asking your LLM:
Search for "quantum computing breakthroughs 2024" and summarize the top findings
Prerequisites
- Node.js 18 or higher
- Docker and Docker Compose
- LM Studio
System Prompt
The repository includes prompt.md, a comprehensive system prompt that guides your LLM to effectively use the web search tools. This prompt teaches the LLM to:
- Always determine current date for time-sensitive queries
- Verify facts across multiple sources
- Use advanced filtering (domains, time ranges, categories)
- Handle concurrent searches for complex research
- Properly manage the search cache
Using the System Prompt in LM Studio
- Open
prompt.mdin the repository - Copy the entire contents
- In LM Studio, go to Settings → System Prompt
- Paste the prompt
The LLM will now automatically use web search tools more effectively, providing better research and verification of facts.
Detailed Installation
1. Clone the Repository
git clone <repository-url>
cd websearch-searXNG
2. Install Dependencies
npm install
3. Start SearXNG Docker Container
npm run docker:up
This will start SearXNG on http://localhost:8080. You can verify it's running by visiting this URL in your browser.
4. Build the MCP Server
npm run build
Available Tools
1. `web_search`
Perform a single web search with advanced filtering options.
Parameters:
query(required): The search query stringmaxResults(optional, default: 10): Maximum number of results to returnlanguage(optional): Language code for results (e.g., "en", "es", "fr")timeRange(optional): Filter by time ("day", "week", "month", "year")categories(optional): Array of categories (e.g., ["general", "news"])includeDomains(optional): Only include results from these domainsexcludeDomains(optional): Exclude results from these domainsdeduplicateByDomain(optional, default: false): Return only one result per domain
2. `multi_search`
Perform multiple searches concurrently for efficient information gathering.
Parameters:
queries(required): Array of search query objects- Each query can have:
query,maxResults,language,timeRange,categories
- Each query can have:
globalFilters(optional): Filters to apply to all resultsincludeDomains,excludeDomains,deduplicateByDomain
3. `clear_cache`
Clear the search results cache to free memory or force fresh results.
Parameters: None
Usage Examples
Basic Search
Search for "climate change solutions" and summarize the findings
Time-Filtered Search
Search for news about "artificial intelligence" from the last week
Domain-Specific Search
Search for "TypeScript best practices" but only show results from
official documentation sites like typescriptlang.org and microsoft.com
Exclude Domains
Search for recent news about "renewable energy" from the last month,
excluding results from social media domains
Multiple Concurrent Searches
I need to compare three topics. Search for:
1. "rust programming language advantages"
2. "golang performance benchmarks"
3. "python async programming"
Summarize the key differences between these languages.