Tavily MCP Server: Setup Guide for AI Agent Search
Every agent needs to search the web eventually. Whether it's researching competitors, fact-checking claims, or gathering context for a report, search is the capability that turns a capable reasoner into something that can work with current information.
Tavily built their entire product around this observation. Rather than adapting a consumer search engine for AI, they designed a search API specifically for how LLMs consume information — and the MCP server makes it available to any compatible agent framework with a few lines of config.
This guide covers everything from first install to production workflows.
What Is the Tavily MCP Server
The tavily mcp server is an MCP-compatible wrapper around Tavily's search API that gives AI agents the ability to search the web and receive structured, LLM-optimized results. When your agent connects to it, three tools become available:
tavily_search— General web search with structured results. Returns clean text, source URLs, and relevance scores — not raw HTML.tavily_extract— Extract content from specific URLs. When you already know which page has the information, this pulls structured content without the overhead of a full search.tavily_news_search— News-specific search optimized for recent articles. Filters by recency and source category.
The key difference from wrapping Google or Bing: Tavily's results are designed for machines, not humans. No ads, no SEO-optimized snippets, no HTML to parse. The agent gets text it can reason about immediately, with source attribution for verification.
The server runs locally via stdio transport — it spawns as a subprocess, communicates over stdin/stdout, and adds negligible latency to your agent's workflow. No network configuration, no server management, no ports to open.
How to Install and Configure Tavily MCP
Get your API key
Sign up at tavily.com and grab an API key from the dashboard. The free tier gives you 1,000 searches per month — generous enough for daily development and light production use.
Claude Code configuration
Add the server to your Claude Code settings file (~/.claude/settings.json or project-level .claude/settings.json):
{
"mcpServers": {
"tavily": {
"command": "npx",
"args": ["-y", "tavily-mcp@latest"],
"env": {
"TAVILY_API_KEY": "tvly-your-key-here"
}
}
}
}
That's the complete setup for tavily claude code integration. Next time you start a Claude Code session, it discovers the Tavily tools automatically and can use them whenever search is relevant. For a deeper walkthrough including troubleshooting and multi-server pairing, see our dedicated Tavily + Claude Code setup guide.
OpenClaw configuration
For OpenClaw, add the equivalent YAML to your config:
mcp_servers:
tavily:
command: npx
args: ["-y", "tavily-mcp@latest"]
env:
TAVILY_API_KEY: "${TAVILY_API_KEY}"
Note the ${TAVILY_API_KEY} syntax — OpenClaw resolves environment variables from your shell, so you can keep the key out of config files:
export TAVILY_API_KEY="tvly-your-key-here"
Verify the connection
After configuring, test with a simple query. In Claude Code, just ask something that requires current information:
What are the latest developments in the A2A protocol?
If Tavily is connected properly, you'll see a tool call to tavily_search in the output. The results come back structured — title, URL, content snippet, relevance score — and the agent synthesizes them into a response.
If nothing happens, check three things: the API key is valid, npx is in your PATH, and the config file is in the right location for your framework.
Using Tavily with Claude Code and OpenClaw
The tavily mcp setup is the same across frameworks, but how agents use it differs based on context.
Claude Code patterns
Claude Code's parallel task execution makes Tavily particularly powerful. When you ask a complex research question, Claude Code can spin up multiple sub-agents that each run different Tavily searches simultaneously:
Research the competitive landscape for AI agent marketplaces.
Include pricing, features, and market positioning for the top 5 players.
Claude Code will typically:
- Run parallel searches for each competitor
- Use
tavily_extractto pull detailed content from specific pages - Synthesize across all results in a single response
This parallel pattern completes in seconds what would take minutes with sequential searches.
OpenClaw patterns
With OpenClaw's skill system, Tavily works especially well when wrapped in a skill that includes search strategies. A bare MCP connection gives the agent the ability to search. A skill wrapper teaches it how to search effectively — when to use deep search versus quick search, how to refine queries based on initial results, how to cross-reference multiple sources.
See our OpenClaw skills guide for more on how skill wrappers improve tool usage.
Search modes
Tavily exposes several search configurations worth knowing:
- Basic search — Fast, returns top results. Good for factual queries and quick lookups.
- Advanced search — Deeper crawling, more sources, better synthesis. Costs more API credits but returns significantly richer results.
- News search — Filters for recent articles from news sources. Use when recency matters more than depth.
- Extract — Pull content from a known URL. Skip this for discovery; use it when you already know where the information lives.
Most agents default to basic search and upgrade to advanced when the initial results are thin. You can guide this behavior through your prompt or skill instructions.
Workflows That Pair Well with Tavily
Tavily excels as the discovery layer in multi-tool pipelines. Here are three patterns that work well:
Research + data grounding
Tavily search → FRED API or Census Bureau for data verification. The agent finds claims via web search, then validates them against authoritative data sources. This pattern produces research that's both current (Tavily) and accurate (government data).
Search + deep extraction
Tavily search → Apify for structured scraping. When Tavily finds relevant pages but you need more data than search snippets provide — pricing tables, product specs, full articles — hand the URLs to Apify for complete extraction.
Search + news monitoring
Tavily general search → NewsAPI for current events. Use Tavily for background research and competitive context, NewsAPI for what happened in the last 24-48 hours. The two cover different time horizons with minimal overlap.
For more on composing tools into pipelines, see our agent workflows guide.
Tavily vs Other Search MCP Servers
Tavily isn't the only search MCP server available. Here's how it compares to the alternatives:
| Feature | Tavily | Serper | Brave Search API | Perplexity API |
|---|---|---|---|---|
| Built for agents | Yes (core design) | No (Google wrapper) | No (general API) | Partially |
| Result format | Structured, LLM-ready | Raw Google results | Standard JSON | Pre-synthesized |
| Extract capability | Yes | No | No | No |
| News-specific mode | Yes | Via Google News | Yes | No |
| Free tier | 1,000/month | 2,500/month | 2,000/month | Limited |
| MCP server | Official | Community | Community | Community |
Tavily's advantage: Results are purpose-built for LLM consumption. You skip the entire parsing-and-extraction step that other search APIs require. The agent gets clean text, not HTML-heavy snippets designed for human eyeballs.
When others win: Serper offers more free searches per month if volume matters and you're willing to handle Google's raw output. Brave's search API is a strong privacy-focused alternative. Perplexity's API returns pre-synthesized answers, which is useful if you want the search engine to do the reasoning rather than your agent.
For most agent workflows, Tavily's structured output and agent-first design make it the default choice. The time savings from not parsing search results adds up fast across hundreds of queries.
Frequently Asked Questions
How do I set up the Tavily MCP server?
Sign up for an API key at tavily.com (free tier includes 1,000 searches/month), then add a configuration entry to your agent framework. For Claude Code, add a JSON block to ~/.claude/settings.json with the npx tavily-mcp@latest command and your API key as an environment variable. For OpenClaw, add the equivalent YAML to your config file. The server runs locally via stdio — no network setup or server management required. Test by asking your agent a question that requires current information.
Is the Tavily MCP server free?
The Tavily MCP server package itself is free and open-source. The underlying Tavily API has a free tier with 1,000 searches per month, which is sufficient for daily development and light production use. Paid plans are available for higher volumes. Advanced search mode consumes more API credits per query than basic search, so monitor your usage if you're on the free tier. The Tavily listing on ClawsMarket has current pricing details.
Does Tavily work with Claude Code?
Yes, Tavily has first-class support in Claude Code. Add the MCP server configuration to your Claude Code settings file and the Tavily tools become available automatically. Claude Code's parallel task execution makes Tavily particularly effective — the agent can run multiple searches simultaneously for complex research queries. The integration requires no additional dependencies beyond npx and a valid API key.
How does Tavily compare to regular search APIs for AI agents?
Tavily is purpose-built for AI agents, while regular search APIs (Google via Serper, Bing, Brave) are designed for human-facing search results. The practical difference: Tavily returns structured, clean text that an LLM can reason about immediately. Regular search APIs return HTML-heavy snippets, ads, and formatting designed for browsers — your agent needs a parsing step to extract useful content. Tavily also includes an extract capability for pulling full content from specific URLs and a dedicated news search mode. The tradeoff is a smaller free tier compared to some alternatives.
Can I use Tavily with other MCP servers simultaneously?
Yes, and this is where it works best. Tavily handles discovery (finding relevant information), while other MCP servers handle different capabilities. Common pairings: Tavily + NewsAPI for combining general research with current events, Tavily + Apify for search followed by deep extraction, and Tavily + FRED/Census for search with data verification. Most agent frameworks support connecting to multiple MCP servers simultaneously — each operates independently and the agent decides which tool to use for each step.