Command Palette

Search for a command to run...

0

Tavily Too Expensive? Build a Free 8-Engine MCP Search Server in 15 Minutes

Tired of Tavily's per-query pricing? agent-search-mcp is a free open-source self-hosted MCP search server with 8 engines, multi-source verification, and zero API keys required.

Tavily Too Expensive? Build a Free 8-Engine MCP Search Server in 15 Minutes

AI agent search bills eating your budget? Here's a free open-source self-hosted alternative.


Let's Talk Numbers

If you're building AI agents for development, research, or automation, you've probably run into this problem: search costs add up fast.

My agents search hundreds of times a day — looking up API docs, researching technical approaches, verifying news, comparing products. I started with Tavily. The quality was solid, but after two months the bill told a different story:

  • Tavily charges $0.008/credit, and each search consumes 1-5 credits
  • 1,000 searches? That's $8
  • Heavy users easily hit $100+/month
  • Exa starts at $50/month
  • Brave Search API: 2,000 free then $3/1,000

Month after month.

For individual developers and small teams, that's real money. And here's the thing — your agent doesn't need an answer engine. It needs raw search results it can evaluate itself. You're paying for "search," not "answers."

So what's the free alternative?


Market Comparison

ServiceFree TierPaidEnginesContent ExtractMCPSelf-HostedToken Opt.API Key
Tavily1K/month$0.01/searchSingleRequired
Exa$10 credit$50/monthSingleRequired
Brave Search2K/month$3/1KSingleRequired
Serper2.5K/month$0.30/1KSingleRequired
FirecrawlLimited$83/100K pagesSingleRequired
Perplexity SonarNone$5/1K+tokensSingle✅(synth)Required
DDG MCPUnlimitedFreeSingleOptional
agent-search-mcpUnlimitedFree8 engines✅ ~40-50%Not required

The picture is clear: agent-search-mcp is the only solution that checks all five boxes — free, multi-engine, MCP-native, self-hostable, and token-optimized.


How agent-search-mcp Stays Free

The core insight is simple: aggregate existing free search interfaces instead of building an expensive middle layer.

8 Free Engines

EnginePurpose
DuckDuckGoGeneral search, privacy-first
BingMicrosoft's index, strong for English
SogouChinese web content
BaiduChina's dominant search engine
Google NewsNews and current events
WikipediaEncyclopedia knowledge
GitHubCode and repository search
Hacker NewsTech community discussions

Zero API keys. Works out of the box.

Multi-Source Verification

Every query hits multiple engines, then results are cross-validated. Each result gets a confidence score (1-3) — a score of 2 or higher means at least two independent engines confirmed it.

Automatic Dedup + Rank Fusion

Different engines return overlapping results. Agent-search-mcp deduplicates by URL and title, then fuses rankings based on source count and domain authority.

Built-in Safety

Prompt injection detection, phishing URL filtering, SSRF protection, output boundary markers — security features you rarely see in free search tools.

MCP + CLI Dual Interface

Connect via MCP protocol to any AI agent (Hermes, Claude Code, Cursor, Windsurf…) or use the CLI directly in your terminal.

Minimal Dependencies

~4MB dependency footprint, just 4 production npm packages. Clean and lean.


15-Minute Deployment

How hard is it to set up? Three steps.

# Step 1: Clone
git clone https://github.com/lennney/agent-search-mcp
cd agent-search-mcp
 
# Step 2: Install dependencies
npm install
pip install ddgs  # Python dependency for DuckDuckGo
 
# Step 3: Build and start
npm run build
npm start

That's it. You'll be up and running in under 15 minutes.

Connect Your Agent

Hermes:

# ~/.hermes/config.yaml
mcp_servers:
  agent-search:
    command: npx
    args: ["agent-search-mcp"]

Claude Code:

{
  "mcpServers": {
    "agent-search": {
      "command": "npx",
      "args": ["agent-search-mcp"]
    }
  }
}

Cursor:

{
  "mcpServers": {
    "agent-search": {
      "command": "npx",
      "args": ["agent-search-mcp"]
    }
  }
}

Once connected, your agent can search the web for free, forever.


Real-World Benchmark

Tested 100 typical agent search queries across all 8 engines:

MetricValue
Average response time~1.2s
95th percentile~3.5s
Results with confidence ≥287%
Token savings~45%
Success rate99%

Compared to single-engine solutions, multi-source verification dramatically improves reliability. The waterfall search engine is the secret sauce — start with 2 engines, stop when confidence is sufficient, add more engines only when needed. This saves 50-75% of engine calls on average.


Who Should Use This

  • AI agent developers — stop worrying about search API bills
  • IDE users — Claude Code, Cursor, Windsurf users plug in directly
  • Chinese-speaking developers — Sogou + Baidu provide native Chinese search
  • Solo devs and small teams — zero cost, self-hosted, data stays with you

If you're currently paying for Tavily or Exa, switching to agent-search-mcp saves you $300-1,200 per year. That's real money you can spend on something more valuable.


Further Reading

Want the full architecture deep-dive? Check out the earlier post: Agent Search MCP Architecture

GitHub repo: github.com/lennney/agent-search-mcp


If you're tired of paying per query for AI agent search, give agent-search-mcp a try. Open source, free, self-hosted — up and running in 15 minutes.