tavily-mcp — Claude Code MCP server: web search, extract, map, crawl
Gives your coding agent four Tavily tools: web search, page extraction, site mapping and crawling. Useful when you need fresh web context inside the editor.
claude mcp add --env TAVILY_API_KEY=<TAVILY_API_KEY> --env DEFAULT_PARAMETERS=<DEFAULT_PARAMETERS> --transport stdio tavily-mcp -- npx -y tavily-mcpWhat tavily-mcp does
tavily-mcp wires four tools into your assistant. tavily-search queries the web, tavily-extract pulls data off pages, map builds a structured view of a site, and crawl walks it link by link. You can run it locally with npx -y tavily-mcp or point the client at the remote server at https://mcp.tavily.com/mcp/?tavilyApiKey=<your-api-key>. The remote route skips local installation entirely.
Local runs need Node.js v20 or higher and a Tavily API key. The key goes into TAVILY_API_KEY, and DEFAULT_PARAMETERS accepts a JSON object of defaults for every request, such as {"include_images":true, "search_depth": "basic", "max_results": 10}. The remote server also supports OAuth: add it without a key in the URL, run claude, type /mcp and finish the auth flow. No key and no OAuth means no tools.
When your account holds several keys, OAuth picks the one named mcp_auth_default, and a personal key wins over a team key. To wipe stored credentials and start over, run rm -rf ~/.mcp-auth — handy when auth is stuck on an old key.
What it helps with
- find current docs for a library the model was never trained on
- pull text and tables off a page without copy-paste
- map a site's sections before scraping it
- crawl a site and collect the pages you need
- add web search to an agent in Cursor or Claude
Example prompts for the agent
- Search the web with tavily-search for how middleware works in the latest Next.js.
- Use tavily-extract to pull the pricing table from this page.
- Map docs.example.com and list the sections about authentication.
How to install tavily-mcp
Platform CLI
claude mcp add --env TAVILY_API_KEY=<TAVILY_API_KEY> --env DEFAULT_PARAMETERS=<DEFAULT_PARAMETERS> --transport stdio tavily-mcp -- npx -y tavily-mcpReplace <…> with your own values
Platform CLI
codex mcp add tavily-mcp --env TAVILY_API_KEY=<TAVILY_API_KEY> --env DEFAULT_PARAMETERS=<DEFAULT_PARAMETERS> -- npx -y tavily-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"tavily-mcp": {
"command": "npx",
"args": [
"-y",
"tavily-mcp"
],
"env": {
"TAVILY_API_KEY": "<TAVILY_API_KEY>",
"DEFAULT_PARAMETERS": "<DEFAULT_PARAMETERS>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"tavily-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"tavily-mcp"
],
"env": {
"TAVILY_API_KEY": "<TAVILY_API_KEY>",
"DEFAULT_PARAMETERS": "<DEFAULT_PARAMETERS>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e TAVILY_API_KEY=<TAVILY_API_KEY> -e DEFAULT_PARAMETERS=<DEFAULT_PARAMETERS> tavily-mcp npx -y tavily-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about tavily-mcp
How do I install tavily-mcp in Claude Code?
Run claude mcp add tavily-mcp -e TAVILY_API_KEY=<TAVILY_API_KEY> -- npx -y tavily-mcp. For default parameters, use the variant with --env DEFAULT_PARAMETERS=<DEFAULT_PARAMETERS> and --transport stdio.
What does tavily-mcp do?
It gives the assistant four tools: web search, data extraction from pages, site mapping and crawling.
Can I use it without installing anything locally?
Yes — connect to the remote server at https://mcp.tavily.com/mcp/?tavilyApiKey=<your-api-key>. Pass the key in the URL or in an Authorization: Bearer <your-api-key> header, or use OAuth if your client supports it.