Get the FREE Ultimate OpenClaw Setup Guide →

searxng

A Model Context Protocol (MCP) server that enables AI assistants to perform web searches using SearXNG, a privacy-respecting metasearch engine.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tisddm-searxng-mcp node build/index.js \
  --env SEARXNG_URL="https://searx.example.com" \
  --env SEARXNG_PASSWORD="" \
  --env SEARXNG_USERNAME=""

How to use

This MCP server exposes a tool named searxngsearch that lets AI assistants perform web searches via SearXNG. By default it will use a random public SearXNG instance unless you provide a private instance with credentials through environment variables. The server returns structured results suitable for downstream processing and can be integrated into tools frameworks like Claude Desktop, VSCode integrations, or Smolagents. You can customize the search with language, time range, category filters, engines, and safe-search settings to tailor results to your needs.

How to install

Prerequisites: Node.js v16 or higher, npm v7 or higher, and access to a SearXNG instance (public or private).

Step 1: Clone the repository

Step 2: Install dependencies

  • npm install

Step 3: Build the project

  • npm run build

Step 4: Run the MCP server locally

  • node build/index.js

If you prefer using the MCP via a package manager, ensure the package is installed (see npm_package) and follow the corresponding startup command for your environment.

Additional notes

Environment variables:

  • SEARXNG_URL: URL of your SearXNG instance. If omitted, the server will pick a random public SearXNG instance at startup.
  • SEARXNG_USERNAME / SEARXNG_PASSWORD: Optional credentials for private SearXNG instances requiring basic auth. Notes:
  • Public SearXNG instances may be rate-limited or return 429 errors; consider using a private instance for reliability.
  • If you change SEARXNG_URL, ensure network access from your host to that endpoint.
  • The searxngsearch tool supports parameters such as query, language, time_range, categories, engines, safesearch, pageno, and max_results. Adjust these to control result sets and privacy concerns.
  • For Claude/VSC integrations, pass the appropriate command, arguments, and environment in your MCP configuration; the README provides example JSON blocks.

Troubleshooting:

  • If startup fails, verify Node.js version and ensure npm install completed without errors.
  • Check that the SEARXNG_URL is correct and reachable from the host running the MCP.
  • Review logs for any authentication or network-related errors and adjust SEARXNG_USERNAME/SEARXNG_PASSWORD as needed.

Related MCP Servers

Sponsor this space

Reach thousands of developers