MCP Setup Guide - 2026

How to Connect Tavily MCP to Claude Code

Tavily MCP gives Claude Code live web search - enabling grounded, cited answers to technical questions without switching to a browser. Here is the complete setup in under 10 minutes.

5 Minute Setup Free Tier Available Claude - Cursor - Windsurf

Prerequisites

  • Node.js 18+ - MCP SDK requires Node.js. Check with node -v.
  • Tavily API key - Free at app.tavily.com (no credit card required)
  • Claude Code - npm install -g @anthropic-ai/claude-code, or Cursor/Windsurf

Step 1: Install the MCP SDK

Open your terminal and install the Model Context Protocol SDK:

npm install -g @modelcontextprotocol/server-tavily

This installs the Tavily MCP server globally. You only need to do this once.

Step 2: Get Your Tavily API Key

  1. Go to app.tavily.com and create a free account
  2. Navigate to Settings - API Keys
  3. Copy your API key - it starts with tvly-

The free tier gives 1,000 searches per month. For regular development use, this is typically enough - searches are only consumed when Claude actively queries the web.

Step 3: Configure MCP for Claude Code

Create or edit your Claude Code MCP configuration file:

# ~/.claude/mcp.json (on Mac/Linux)
# or %USERPROFILE%\.claude\mcp.json (on Windows)

{
  "mcpServers": {
    "tavily": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-tavily"],
      "env": {
        "TAVILY_API_KEY": "tvly-your-api-key-here"
      }
    }
  }
}

Save the file, then restart Claude Code. The MCP server will connect automatically.

Step 4: Verify the Connection

Start a new Claude Code session and try a search query:

Search for recent best practices for handling React useEffect cleanup functions

Claude will execute the search and return structured results with citations.

What You Can Do Once Connected

With Tavily MCP active, your Claude sessions gain real-time research capability:

  • Debug with live search - Paste an error message, ask Claude to search for solutions, receive cited alternatives
  • Library research - Find the current best approach to auth in Next.js 14 App Router
  • Documentation lookup - Search for the latest Cloudflare Workers TypeScript documentation
  • GitHub issue research - Find if others have reported this Prisma error and what fixed it

The key difference from Perplexity: you never leave the terminal. Claude handles the search, synthesizes the results, and applies them directly in your codebase.

Using Tavily MCP with Cursor

The configuration for Cursor is nearly identical. Edit ~/.cursor/mcp.json with the same structure, restart Cursor, and Tavily search will be available in Cursor chat panel. The same MCP server configuration works across Claude Code, Cursor, Windsurf, and any other MCP-compatible AI tool.

Browse the full Tavily MCP page on AIasdf for more details on features and API limits.

Explore more MCP servers for your workflow

From search grounding to database context - find the MCP servers that fit your development workflow.

Browse All MCP Servers - Search MCP Servers -

Frequently Asked Questions

Do I need an API key for Tavily MCP?
Yes. Tavily requires an API key. The free tier gives 1000 searches per month which is enough for regular development use - a search is only consumed when Claude actively queries the web. Sign up at app.tavily.com to get your API key - no credit card required.
Can I use Tavily MCP with Cursor or other editors?
Yes. Tavily MCP uses the standard Model Context Protocol. It works with Claude Code, Cursor, Windsurf, Sourcegraph Cody, and any other editor or tool that supports MCP. The configuration file location differs by editor but the structure is identical.
What can I search with Tavily MCP in Claude?
Once connected, you can ask Claude to search the web mid-conversation. Examples: Search for how to handle CORS in Cloudflare Workers, Find recent GitHub issues about this error, Research best practices for React Server Components. Claude will search, retrieve structured results, and use them to inform its response with citations.
How is Tavily MCP different from using Perplexity?
Perplexity is a standalone search tool - you switch context to a browser or app to search. Tavily MCP integrates search directly into your coding workflow - Claude searches without you leaving the terminal. For debugging and coding tasks specifically, the in-editor workflow is significantly faster because you never break focus on your code.