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.
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
- Go to app.tavily.com and create a free account
- Navigate to Settings - API Keys
- 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 -