MCP servers / Tavily

Tavily MCP server: setup for Claude Code, Claude Desktop and Cursor

Tavily is a search service built for AI assistants, and this server connects your AI to it. It has five tools: search, extract the content of URLs, crawl a website, map a site's structure, and a research tool for broader questions.

It overlaps with Brave Search for finding pages and with Firecrawl for reading them, in a smaller package.

Runs with
npx (Node.js)
Package
tavily-mcp on npm
Needs
Node.js (for npx) and a Tavily API key from tavily.com.
Tools
5 (not declared as read-only or not)
Source
tavily-ai/tavily-mcp
Last checked
2026-09-20 (server reported version 0.2.22)

Config for Tavily

Generated by the same code as the free builder, so it matches what you get there. Pick your client, then copy.

Needs a Tavily API key from tavily.com.

Claude Code

Save as .mcp.json in your project root. Claude Code asks you to approve it the first time.

Claude Code config
{
  "mcpServers": {
    "tavily": {
      "command": "npx",
      "args": [
        "-y",
        "tavily-mcp@latest"
      ],
      "env": {
        "TAVILY_API_KEY": "${TAVILY_API_KEY}"
      }
    }
  }
}

Set TAVILY_API_KEY in your environment before starting Claude Code. The config only references the variable, so it is safe to commit.

Or add it from a terminal instead (single quotes work in bash, zsh and PowerShell; more on this command):

Terminal command
claude mcp add tavily -e 'TAVILY_API_KEY=${TAVILY_API_KEY}' -- npx -y tavily-mcp@latest

Claude Desktop

Merge into claude_desktop_config.json (Settings → Developer → Edit Config), then fully quit and restart Claude Desktop.

Claude Desktop config
{
  "mcpServers": {
    "tavily": {
      "command": "npx",
      "args": [
        "-y",
        "tavily-mcp@latest"
      ],
      "env": {
        "TAVILY_API_KEY": "paste-your-key-here"
      }
    }
  }
}

Claude Desktop keeps TAVILY_API_KEY in this file as plain text. Keep the file private and never share or commit it.

Cursor

Save as .cursor/mcp.json in your project, or ~/.cursor/mcp.json for all projects.

Cursor config
{
  "mcpServers": {
    "tavily": {
      "command": "npx",
      "args": [
        "-y",
        "tavily-mcp@latest"
      ],
      "env": {
        "TAVILY_API_KEY": "${env:TAVILY_API_KEY}"
      }
    }
  }
}

Set TAVILY_API_KEY in your environment before launching Cursor. The config only references the variable, so it is safe to commit.

What it can do

These are all 5 tools the server reported when we started it and asked on 2026-09-20. This server does not say which tools are read-only, so we sorted them by what each name and description says.

Watch out for

Variations

Set default search options

A JSON object of defaults for the search tool, as in the README's example. Here it caps results at five. The value is not a secret, so it is written directly in the config.

Variation: Set default search options
{
  "mcpServers": {
    "tavily": {
      "command": "npx",
      "args": [
        "-y",
        "tavily-mcp@latest"
      ],
      "env": {
        "TAVILY_API_KEY": "${TAVILY_API_KEY}",
        "DEFAULT_PARAMETERS": "{\"max_results\": 5}"
      }
    }
  }
}

Shown in Claude Code format. Cursor uses ${env:NAME} for keys, and Claude Desktop takes the key itself, exactly as in the configs above.

Try asking

Related servers

Building a full setup? Combine this with other servers in the config builder. Trouble connecting? See fixing connection errors.

Open the config builder Get early access to Pro