# tavily-mcp

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 2454
- Author: tavily-ai
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/tavily-ai/tavily-mcp
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/tavily-mcp

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `TAVILY_API_KEY`, `DEFAULT_PARAMETERS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env TAVILY_API_KEY=<TAVILY_API_KEY> --env DEFAULT_PARAMETERS=<DEFAULT_PARAMETERS> --transport stdio tavily-mcp -- npx -y tavily-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add tavily-mcp --env TAVILY_API_KEY=<TAVILY_API_KEY> --env DEFAULT_PARAMETERS=<DEFAULT_PARAMETERS> -- npx -y tavily-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e TAVILY_API_KEY=<TAVILY_API_KEY> -e DEFAULT_PARAMETERS=<DEFAULT_PARAMETERS> tavily-mcp npx -y tavily-mcp
```
Replace <…> with your own values

## When to use it
- 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
- 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.

## Similar
- [tavily-dynamic-search](https://affpapa.org/en/nevibecode/skills/tavily-dynamic-search.md) — skill · 13500 installs
- [tavily-usage](https://affpapa.org/en/nevibecode/skills/tavily-usage.md) — skill · 758 installs
- [tavily-search](https://affpapa.org/en/nevibecode/skills/tavily-search.md) — skill · 36100 installs
- [web-search-tavily](https://affpapa.org/en/nevibecode/skills/web-search-tavily.md) — skill · 1100 installs
- [tavily](https://affpapa.org/en/nevibecode/skills/tavily.md) — skill · 627 installs
- [web-search](https://affpapa.org/en/nevibecode/skills/web-search.md) — skill · 110000 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
