npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@the-bao/searxng-mcp

v1.0.2

Published

MCP server for SearXNG metasearch engine — lets AI tools search the web

Readme

SearXNG MCP Server

An MCP (Model Context Protocol) server that lets AI tools search the web via your SearXNG instance.

Prerequisites

  • Node.js >= 18
  • A running SearXNG instance with JSON format enabled in settings.yml:
search:
  formats:
    - html
    - json   # Required for this MCP server

Quick Start

Install via Claude Code

# Global (recommended, works in all projects)
claude mcp add searxng -s user -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp

# Project-level only
claude mcp add searxng -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp

Manual

SEARXNG_BASE_URL=http://localhost:8080 npx -y @the-bao/searxng-mcp

Configuration

Environment Variable

| Variable | Required | Description | |----------|----------|-------------| | SEARXNG_BASE_URL | Yes | Your SearXNG instance URL (e.g. http://localhost:8080, https://search.example.com) |

MCP Client Setup

Add to your MCP client configuration. Examples for common clients:

Claude Code

# Global (recommended, works in all projects)
claude mcp add searxng -s user -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp

# Project-level only
claude mcp add searxng -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": ["-y", "@the-bao/searxng-mcp"],
      "env": {
        "SEARXNG_BASE_URL": "http://localhost:8080"
      }
    }
  }
}

Cline / Roo Code (.vscode/mcp.json)

{
  "servers": {
    "searxng": {
      "command": "npx",
      "args": ["-y", "@the-bao/searxng-mcp"],
      "env": {
        "SEARXNG_BASE_URL": "http://localhost:8080"
      }
    }
  }
}

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": ["-y", "@the-bao/searxng-mcp"],
      "env": {
        "SEARXNG_BASE_URL": "http://localhost:8080"
      }
    }
  }
}

Tools

searxng_search

Search the web via SearXNG, aggregating results from Google, Bing, DuckDuckGo, Wikipedia, and 70+ other engines.

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | query | string | required | Search query (supports site:, filetype:, etc.) | | categories | string | — | Filter: general, news, images, videos, science, it, files, music, repos, packages | | engines | string | — | Specific engines: google, bing, duckduckgo, wikipedia, github, stackoverflow, arxiv, pubmed, youtube... | | language | string | — | Language code: en, zh, ja, de, fr, es... | | pageno | number | 1 | Page number (1-50) | | time_range | string | — | day, month, or year | | safesearch | number | 0 | 0=off, 1=moderate, 2=strict | | response_format | string | markdown | markdown or json |

Examples:

searxng_search(query="Rust programming tutorial")
searxng_search(query="AI", categories="news", time_range="day")
searxng_search(query="MCP server", engines="github")
searxng_search(query="transformer attention", categories="science")

searxng_autocomplete

Get search query suggestions.

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | query | string | required | Partial search query | | language | string | — | Language code |

Docker Compose (SearXNG)

If you don't have SearXNG running yet:

services:
  searxng:
    image: searxng/searxng:latest
    ports:
      - "8080:8080"
    volumes:
      - ./searxng-settings.yml:/etc/searxng/settings.yml:ro

Make sure searxng-settings.yml has JSON format enabled:

use_default_settings: true

search:
  formats:
    - html
    - json

中文文档

SearXNG MCP 服务器

一个基于 MCP(模型上下文协议)的服务器,让 AI 工具通过你的 SearXNG 实例搜索网页。

前置要求

  • Node.js >= 18
  • 一个运行中的 SearXNG 实例,并在 settings.yml启用 JSON 格式
search:
  formats:
    - html
    - json   # 本 MCP 服务器必须启用此项

快速开始

通过 Claude Code 安装

# 全局安装(推荐,所有项目可用)
claude mcp add searxng -s user -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp

# 仅当前项目
claude mcp add searxng -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp

手动运行

SEARXNG_BASE_URL=http://localhost:8080 npx -y @the-bao/searxng-mcp

配置

环境变量

| 变量 | 必填 | 说明 | |------|------|------| | SEARXNG_BASE_URL | | SearXNG 实例地址(如 http://localhost:8080https://search.example.com) |

MCP 客户端配置

将以下内容添加到你的 MCP 客户端配置中。以下是常见客户端的示例:

Claude Code

# 全局安装(推荐,所有项目可用)
claude mcp add searxng -s user -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp

# 仅当前项目
claude mcp add searxng -e SEARXNG_BASE_URL=http://localhost:8080 -- npx -y @the-bao/searxng-mcp

Claude Desktop(claude_desktop_config.json

{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": ["-y", "@the-bao/searxng-mcp"],
      "env": {
        "SEARXNG_BASE_URL": "http://localhost:8080"
      }
    }
  }
}

Cline / Roo Code(.vscode/mcp.json

{
  "servers": {
    "searxng": {
      "command": "npx",
      "args": ["-y", "@the-bao/searxng-mcp"],
      "env": {
        "SEARXNG_BASE_URL": "http://localhost:8080"
      }
    }
  }
}

Cursor(.cursor/mcp.json

{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": ["-y", "@the-bao/searxng-mcp"],
      "env": {
        "SEARXNG_BASE_URL": "http://localhost:8080"
      }
    }
  }
}

工具

searxng_search

通过 SearXNG 搜索网页,聚合 Google、Bing、DuckDuckGo、Wikipedia 等 70 多个搜索引擎的结果。

| 参数 | 类型 | 默认值 | 说明 | |------|------|--------|------| | query | string | 必填 | 搜索关键词(支持 site:filetype: 等语法) | | categories | string | — | 分类过滤:generalnewsimagesvideosscienceitfilesmusicrepospackages | | engines | string | — | 指定引擎:googlebingduckduckgowikipediagithubstackoverflowarxivpubmedyoutube 等 | | language | string | — | 语言代码:enzhjadefres 等 | | pageno | number | 1 | 页码(1-50) | | time_range | string | — | 时间范围:day(当天)、month(一个月内)、year(一年内) | | safesearch | number | 0 | 安全搜索:0=关闭、1=适中、2=严格 | | response_format | string | markdown | 输出格式:markdownjson |

示例:

searxng_search(query="Rust 编程教程")
searxng_search(query="AI", categories="news", time_range="day")       # 搜索今日 AI 新闻
searxng_search(query="MCP server", engines="github")                  # 只搜索 GitHub
searxng_search(query="transformer attention", categories="science")   # 搜索学术论文

searxng_autocomplete

获取搜索关键词建议。

| 参数 | 类型 | 默认值 | 说明 | |------|------|--------|------| | query | string | 必填 | 部分搜索关键词 | | language | string | — | 语言代码 |

Docker Compose(SearXNG)

如果你还没有部署 SearXNG:

services:
  searxng:
    image: searxng/searxng:latest
    ports:
      - "8080:8080"
    volumes:
      - ./searxng-settings.yml:/etc/searxng/settings.yml:ro

确保 searxng-settings.yml 启用了 JSON 格式:

use_default_settings: true

search:
  formats:
    - html
    - json

许可证

MIT