trackmcp
Back to directory
nitish-raj

searxng-mcp-bridge

View on GitHub

Model-Context Protocol server that acts as a bridge to a SearxNG instance

7 stars JavaScriptOthers Updated Aug 30, 2026
mcpstdio-mcpsearxngsearxng-mcp

Documentation

SearXNG MCP Bridge Server

Release
npm version
License: MIT
Node.js

An MCP (Model Context Protocol) server that bridges to a SearXNG metasearch engine instance. It exposes SearXNG search capabilities as MCP tools, allowing any MCP-compatible client (Claude Desktop, Cursor, opencode, etc.) to perform web searches through a self-hosted, privacy-respecting search engine.

Requirements

  • Node.js >=25.0.0 ` | Transport mode (overrides `TRANSPORT` env var) |

HTTP Transport

The HTTP transport implements the MCP Streamable HTTP specification (2025-03-26).

Endpoints:

MethodPathDescription
`POST``/mcp`Send MCP JSON-RPC requests; initialize new sessions
`GET``/mcp`Server-Sent Events stream for notifications
`DELETE``/mcp`Terminate sessions
`OPTIONS``/mcp`CORS preflight requests
`GET``/healthz`Health check (returns `{ "status": "ok", "version": "..." }`)

Initialize and search via HTTP:

bash
# 1. Initialize a session
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}'

# 2. List tools (use mcp-session-id from step 1 response)
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -H "mcp-session-id: " \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'

# 3. Perform a search
curl -X POST http://localhost:3002/mcp \
  -H "Content-Type: application/json" \
  -H "mcp-session-id: " \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search","arguments":{"query":"hello world"}}}'

Docker

The Dockerfile is based on `node:25-alpine` and exposes port `8081`.

bash
# Build
docker build -t searxng-mcp-bridge .

# Run in STDIO mode (default)
docker run -d \
  -e SEARXNG_INSTANCE_URL=http://host.docker.internal:8080 \
  searxng-mcp-bridge

# Run in HTTP mode
docker run -d -p 8081:8081 \
  -e TRANSPORT=http \
  -e PORT=8081 \
  -e HOST=0.0.0.0 \
  -e SEARXNG_INSTANCE_URL=http://host.docker.internal:8080 \
  searxng-mcp-bridge

> Note: Use `HOST=0.0.0.0` when running inside containers to allow external connections.

Development

bash
npm install          # Install dependencies
npm run dev          # Run with tsx (TypeScript execution, no build step)
npm run build        # Compile TypeScript to JavaScript
npm run watch        # Watch for changes and rebuild automatically
npm run start        # Run the compiled server (stdio mode)
npm run start:http   # Run the compiled server (HTTP mode on port 3002)
npm run inspector    # Run MCP inspector for interactive testing

Release scripts:

bash
npm run release:patch   # Bump patch version (0.11.x)
npm run release:minor   # Bump minor version (0.x.0)
npm run release:major   # Bump major version (x.0.0)

Releases are automated via release-please with Renovate for dependency management.

Contributing

1. Fork the repository

2. Create a feature branch: `git checkout -b feat/your-feature`

3. Make your changes following existing code style

4. Ensure `npm run build` passes

5. Open a pull request using the PR template

Bug reports and feature requests are welcome via GitHub Issues.

License

MIT -- Copyright (c) 2025 Nitish Raj

Frequently asked questions

What is searxng-mcp-bridge?

searxng-mcp-bridge is Model-Context Protocol server that acts as a bridge to a SearxNG instance

How do I install searxng-mcp-bridge?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is searxng-mcp-bridge open source?

Yes — it is hosted on GitHub at https://github.com/nitish-raj/searxng-mcp-bridge and has 7 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP