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

@anfeng087/search-web-mcp

v0.1.1

Published

Unified web search MCP server for AI agents with provider fallback and key rotation.

Readme

@anfeng087/search-web-mcp

一个面向 agent 的统一 Web 搜索 MCP。默认输出结构化候选和证据片段,不返回给人看的长说明。

Tools

| Tool | Purpose | |---|---| | web_search | 返回候选 URL、标题、域名、短摘要、来源和分数 | | web_fetch | 抓取单个 URL,返回与 query 相关的证据片段 | | web_status | 查看 provider/key 状态,不输出真实 key |

Run

npx -y @anfeng087/search-web-mcp --env-file /path/to/.env

.env 或无 API key 时仍可启动:搜索走 DuckDuckGo/SearXNG,抓取走本地 HTML 抽取。

Claude Code

claude mcp add search-web -- npx -y @anfeng087/search-web-mcp --env-file /Users/anfeng/AI/mcp/active/search-web/.env

建议在 Claude Code 本地权限里禁用原生 WebSearch / WebFetch,让搜索统一经过本 MCP。

Config

复制 .env.example.env 后按需填 key。每家 provider 可填多个 key,逗号分隔。

BRAVE_SEARCH_API_KEYS=brv_key_1,brv_key_2
EXA_API_KEYS=exa_key_1,exa_key_2
TAVILY_API_KEYS=tvly_key_1,tvly_key_2
FIRECRAWL_API_KEYS=fc_key_1,fc_key_2

SEARCH_PROVIDERS=brave,exa,tavily,searxng,duckduckgo
FETCH_PROVIDERS=local,firecrawl,exa,tavily

EXA_MODE=auto
EXA_TRIAL_ENABLED=false
EXA_TRIAL_MCP_URL=https://mcp.exa.ai/mcp?tools=web_search_exa,web_fetch_exa,web_search_advanced_exa

SEARCH_SEARXNG_URL=
SEARCH_TIMEOUT_SECONDS=12
SEARCH_CACHE_TTL_SECONDS=1800

EXA_MODE:

  • auto: 有 EXA_API_KEYS 用 REST API;无 key 且 EXA_TRIAL_ENABLED=true 用 Exa remote MCP;否则跳过 Exa。
  • api: 只用 Exa REST API。
  • trial: 只用 Exa remote MCP。
  • off: 禁用 Exa。

Provider Behavior

  • 每个 provider 独立维护 key 池,多个 key 按 round-robin 使用。
  • 普通 429Retry-After 冷却当前 key;没有 Retry-After 且不是额度耗尽文案时短冷却后再试。
  • 401 / 403402、以及明确写着 quota/monthly/credits exhausted 的 429 会禁用当前 key 到下个自然月月初,并立即尝试同 provider 的下一个 key;进入下个月后自动恢复参与轮询。
  • web_status 只展示 keyCountcooldownCountdisabledCount 和错误类型,不打印真实 key。

Development

npm install
npm run build
npm test
node dist/cli.js --status --env-file .env.example
npm pack --dry-run

发布 scoped public 包:

npm publish --access public