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

freesearch-mcp

v1.0.9

Published

Free search MCP server using SearXNG — multi-instance fan-out, deduplication, content extraction

Readme

freesearch-mcp

Free web search for AI agents — no API key required.

An MCP server that routes search queries through public SearXNG instances. Instead of paying per query to SerpAPI, Exa, or Brave Search, this server fans out to multiple public SearXNG instances simultaneously, merges the results, and returns the best ones.

Claude Code / any MCP client
         ↓
  freesearch-mcp
         ↓
  Best SearXNG instances (auto-discovered)
         ↓
  Merged, deduplicated search results

Tools

| Tool | Description | |---|---| | web_search | General web search with multi-instance fan-out and Reciprocal Rank Fusion ranking | | news_search | Recent news articles with publication dates | | image_search | Image search returning image URL, thumbnail URL, title, and source page | | extract_page | Fetch any URL and return its main content as clean markdown | | best_instance | Returns the top-ranked SearXNG instance with its score, latency, uptime, engine count, and JSON support status |


Quick start

Claude Code

claude mcp add freesearch -s user -- npx -y freesearch-mcp

Or add manually to ~/.claude/claude.json:

{
  "mcpServers": {
    "freesearch": {
      "command": "npx",
      "args": ["-y", "freesearch-mcp"]
    }
  }
}

Then ask Claude: "search for 'typescript generics' and summarize the top results"

Other MCP clients

{
  "mcpServers": {
    "freesearch": {
      "command": "npx",
      "args": ["-y", "freesearch-mcp"]
    }
  }
}

Test interactively

npx -y @modelcontextprotocol/inspector npx -y freesearch-mcp

Opens a browser UI at http://localhost:6274 where you can call each tool manually.


How it works

Multi-instance fan-out

Every search fans out to all available SearXNG instances simultaneously. Failures (rate limits, blocks) resolve in milliseconds and don't slow things down. web_search resolves as soon as MIN_SUCCESS (default 2) instances return results; news_search and image_search resolve as soon as 1 instance responds.

Self-learning instance selection

The first search discovers which public instances accept requests from your IP and saves them to ~/.freesearch-mcp-cache.json. All subsequent searches go straight to the proven instances — no re-discovery needed.

Instance ranking uses data from searx.space: latency (50%) + uptime (30%) + engine count (20%).

Reciprocal Rank Fusion

web_search merges results from multiple instances: each result earns 1 / (position + 1) points per instance, scores are summed, and URLs are normalized and deduplicated before returning. Results that appear across multiple instances and rank near the top of each naturally score highest.

Content extraction

extract_page uses Mozilla's Readability to strip navigation, ads, and boilerplate from any page, then converts the article content to clean markdown via Turndown. Extracted pages are cached in-process for 30 minutes.


Configuration

All settings are optional environment variables:

| Variable | Default | Description | |---|---|---| | SEARXNG_URL | — | Pin a specific SearXNG instance. Bypasses all auto-discovery. Ideal for self-hosted setups. | | MAX_INSTANCES | 999 | Maximum number of instances tried per search | | MIN_SUCCESS | 2 | Instances that must return results before web_search resolves | | MAX_WAIT_MS | 5000 | Maximum time (ms) to wait for instances per search | | SEARCH_TIMEOUT_MS | 4000 | Per-instance HTTP timeout | | CACHE_TTL_MS | 300000 | How long to cache search results in memory (5 min). Does not affect extract_page, which uses a fixed 30-minute cache. | | INSTANCE_CACHE_TTL_MS | 3600000 | How long to cache the ranked instance list in memory (1 h) |

Self-hosted SearXNG

For reliable use from servers or CI environments (where public instances may rate-limit), run your own SearXNG:

docker run -d -p 8080:8080 searxng/searxng

Then pin it:

{
  "mcpServers": {
    "freesearch": {
      "command": "npx",
      "args": ["-y", "freesearch-mcp"],
      "env": { "SEARXNG_URL": "http://localhost:8080" }
    }
  }
}

Performance

| Scenario | Speed | |---|---| | First search (cold) | 2–5 s (discovers working instances) | | Subsequent searches | 1–3 s | | Cached result (repeat query) | < 50 ms | | After restart | Fast (instance list persisted to disk for 24 h) |


License

MIT