Tavily MCP Server
Real-time AI-optimized web search for grounding agents in current events and factual data
The Tavily MCP server connects AI agents to Tavily's search API, which is designed specifically for AI use rather than human browsing. It returns clean, structured search results with full content extraction, making it the most reliable way to ground agents in current information without dealing with raw HTML or JavaScript rendering. Tavily handles the scraping and deduplication so the agent gets relevant content ready to use.
AI agents have a well-known weakness: their training data has a cutoff. Ask about something that happened last month and you get uncertainty or, worse, confident hallucination. The fix is grounding, giving the agent access to real-time information before it answers. Tavily MCP is the cleanest way to do this.
Tavily is different from standard search APIs in an important way: it was built for AI consumption, not browser display. The results come back structured, with full content extracted, ready for a language model to read and reason about. You do not get back raw HTML that the agent has to parse, or brief snippets that require following links. You get actual content.
What makes Tavily different from other search tools
Most search APIs return a list of results: title, URL, and a 150-character snippet. That is useful for showing a human a list of links. It is less useful for an agent that needs to read and synthesize information from those pages.
Tavily returns the content of the top results. Not summaries, not snippets, the actual text of the pages after rendering and extraction. The agent can read three or five sources in a single search call and synthesize them immediately.
This distinction matters more than it sounds. An agent using snippet-only search has to make follow-up requests to read each page (which means more tool calls, more latency, and often dealing with JavaScript-rendered content that requires a browser). An agent using Tavily gets the content in one call.
Tavily also filters aggressively for relevance. The API is tuned to return substantive results rather than SEO-stuffed pages that rank highly in general search but contain little useful content. For agents doing research, this means fewer rounds of "the results are not useful, search again".
What the server exposes
The server provides two main tools:
tavily_search. The primary tool. Accepts a query string and optional parameters for result count (typically 5-10), search depth (basic or advanced), time range filtering, and domain inclusion or exclusion. Returns an array of results, each with the URL, a relevance score, and the full extracted content.
tavily_extract. Takes one or more URLs directly and returns the extracted content, bypassing search. Useful when you already know which pages you want to read and do not need a search step. This tool positions Tavily as both a search tool and a content extraction tool, with Tavily handling the rendering and cleaning.
The search_depth parameter is worth understanding: basic is faster and cheaper (one credit per search), advanced does more thorough extraction and is better for complex research queries (five credits per search). Use basic as the default and switch to advanced when you notice the results missing important content.
Setup
Create an account at tavily.com and copy your API key from the dashboard. The free tier gives you enough calls to evaluate thoroughly.
Add to Claude Desktop at ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"tavily": {
"command": "npx",
"args": ["-y", "tavily-mcp"],
"env": {
"TAVILY_API_KEY": "tvly-your-api-key-here"
}
}
}
}
For Claude Code, the config lives at ~/.claude/mcp.json with the same structure.
Tavily API keys start with tvly-. Copy the full key including the prefix.
That is the full setup. No local browser, no scraping infrastructure, no configuration beyond the API key.
Real use cases
Grounding agents in current information. The most common pattern: the agent needs a fact it might hallucinate (current price of something, recent news event, today's date on a platform, a company's current funding status). Instead of guessing from training data, the agent searches, reads the result, and answers from the actual content. The hallucination rate on factual questions drops significantly with search access.
Research compilation. Ask the agent to research a topic: "What are the main arguments for and against X?" or "What has been published about Y in the last 30 days?" The agent can run a few searches with different query angles, read the full content of the results, and synthesize a well-grounded summary. This takes significantly longer without content extraction because each source requires a separate scraping step.
Competitive intelligence. With domain filtering, the agent can search for news and announcements about a specific company by including their domain and excluding irrelevant sites. Combined with time range filtering (last 7 days, last 30 days), this gives a concise picture of what a competitor has been doing without manual monitoring.
Technical documentation lookup. Current documentation often lags training data. A version-specific question about a library or API is the kind of thing models often get wrong from training data alone. Tavily with include_domains set to the official docs site returns the current documentation, not the version the model was trained on.
News monitoring. Setting days to 1 or 2 and running searches on relevant topics gives the agent access to recent news coverage. For agents that produce briefings, summaries, or reports, this is the input layer.
Fact-checking. For any claim the agent produces that you want to verify, turning it into a Tavily search and having the agent check its own output against current sources is a lightweight verification pattern. The agent can flag when its answer conflicts with what search returns.
Comparing to other search options
Three search-related MCP servers worth comparing:
Brave Search MCP. Returns result metadata (title, URL, snippet) without full content extraction. Faster, lighter, and the free tier is generous. Right for cases where the agent needs to identify what exists and link to it, not read it.
Firecrawl MCP. Full content extraction with crawling capability, but starts from a URL rather than a query. Firecrawl does not do the search step; it reads a page you tell it to. The two tools are complementary: Tavily finds, Firecrawl reads deeply.
Fetch MCP. Plain HTTP requests, no search, no AI-optimized formatting. Useful for fetching a known URL when the page does not require JavaScript rendering.
Tavily sits in a specific niche: find and read in one call, with AI-optimized output. For agents that need to gather information from the web as part of reasoning, Tavily is usually the most efficient option.
Credit management
Tavily's credit model is worth understanding before you deploy an agent that might run searches automatically:
Basic searches cost one credit each. Advanced searches cost five. Each result in a search response also consumes credits (roughly one per result page extracted). If your agent is in an agentic loop that triggers searches frequently, costs can accumulate faster than they would in an interactive chat workflow.
Practical habits for keeping costs reasonable:
- Default to basic depth and only use advanced when the query is complex
- Set max_results to 3-5 for most searches instead of the maximum
- Cache results in Memory MCP when the agent is likely to need the same information multiple times in a session
- Use tavily_extract (which takes URLs directly) for follow-up reading rather than re-searching for pages you already know exist
The free tier gives you 1000 credits per month. A typical interactive research session with 10-15 searches uses roughly 50-100 credits depending on depth settings.
Security considerations
Tavily's API key model is simple and the risk profile is lower than most tools in this guide because the server only performs read operations (search and page extraction).
The main consideration: your API key is tied to your billing account. Protect it the same way you would any API key: keep it out of version-controlled config files, do not log it, and rotate it if you suspect compromise. Use an environment variable in your MCP config rather than putting the key value directly in the JSON.
There are no write operations, no access to your data, and no way for the server to affect systems beyond reading web content. The risk is primarily key exposure and uncontrolled credit consumption in an agentic loop.
Pairing with other servers
Tavily pairs naturally with any workflow that involves research, writing, or fact-based reasoning.
Combined with Filesystem MCP, the agent can search for information, extract the content, and write it to a local file for reference or as part of a document generation workflow.
Combined with GitHub MCP, a coding agent can look up current library documentation or changelogs before making recommendations about which version of a dependency to use.
For Supabase or database workflows, pairing Tavily with Supabase MCP lets the agent ground answers about industry benchmarks or external standards with search results alongside your actual database data.
Bottom line
If your agents produce factual answers and you care about accuracy on current information, Tavily MCP is probably the most important single addition you can make to your config. The one-call search-plus-extract pattern is meaningfully better than the alternatives for agents that need to read what they find.
The setup takes three minutes. The free tier is enough to test seriously. For any agent doing research, writing, analysis, or anything that requires knowing what is true right now rather than what was true when the model was trained, this belongs in the config.
Features
- Real-time web search with AI-optimized result formatting
- Full content extraction from top results, not just snippets
- Search with configurable result depth (basic or advanced)
- Topic filtering for news, general search, or specific domains
- Domain inclusion and exclusion filters
- Time range filtering for recent content
- Structured JSON output designed for LLM consumption
- Authenticates via Tavily API key
How to set up the Tavily MCP Server MCP server
- Create a Tavily account at tavily.com and copy your API key from the dashboard
- Add the server block to your Claude Desktop or Claude Code MCP config
- Set TAVILY_API_KEY in the env block
- Restart your MCP client and verify the Tavily search tool appears
- Test by asking the agent a question about a recent event