MCP server/search

SearXNG Websearch MCP Server

Web search capabilities for local LLMs using a privacy-focused SearXNG instance

★ 7Pascalrjt/SearXNG-Websearch-MCP ↗by Pascalrjtupdated
Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

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 build
2

Register it in Claude Code

claude mcp add searxng-websearch -- node /path/to/SearXNG-Websearch-MCP/dist/index.js

Replace any placeholder paths in the command with the real path on your machine.

3

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@latest

Free · 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

Search for "quantum computing breakthroughs 2024" and summarize the top findings
Search for news about "artificial intelligence" from the last week
Search for "TypeScript best practices" but only show results from official documentation sites like typescriptlang.org and microsoft.com
Search for recent news about "renewable energy" from the last month, excluding results from social media domains
Compare three topics: search for 'rust programming language advantages', 'golang performance benchmarks', and 'python async programming' and summarize the key differences
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

  1. Open prompt.md in the repository
  2. Copy the entire contents
  3. In LM Studio, go to Settings → System Prompt
  4. 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 string
  • maxResults (optional, default: 10): Maximum number of results to return
  • language (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 domains
  • excludeDomains (optional): Exclude results from these domains
  • deduplicateByDomain (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
  • globalFilters (optional): Filters to apply to all results
    • includeDomains, 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.

Complex

Frequently Asked Questions

What are the key features of SearXNG Websearch?

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.

What can I use SearXNG Websearch for?

Researching complex topics by aggregating information from multiple sources simultaneously. Fact-checking LLM responses using real-time web data. Filtering search results to specific technical documentation sites for coding assistance. Monitoring recent news trends while maintaining local privacy. Reducing API overhead for research tasks through intelligent result caching.

How do I install SearXNG Websearch?

Install SearXNG Websearch by running: git clone https://github.com/Pascalrjt/SearXNG-Websearch-MCP.git && cd SearXNG-Websearch-MCP && npm install && npm run build

What MCP clients work with SearXNG Websearch?

SearXNG Websearch works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep SearXNG Websearch docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest