Skip to main content
Connect to Tavily using MCP in one click.
MCP server URL
Paste the server URL into any MCP client, and sign in to Tavily when your client prompts you. Or pick your client below:
Claude Code
Claude (claude.ai, Claude Desktop, and Cowork): click Add to Claude, then Connect, and sign in to Tavily. Claude Code: run the command above, then start a new session to sign in. See Connect to Claude Code and the Claude guide for more options.
No account yet? Keyless access lets you call Search and Extract with no API key.

What you get

The Tavily MCP server gives your agent these tools:

Client setup details

Connect to Claude Code

Claude Code natively supports remote MCP servers with OAuth authentication. Add Tavily to your Claude Code configuration by running:
When you start a new conversation, Claude Code will open a browser window for you to complete the OAuth flow and authorize access to your Tavily account. No API key needed in the URL — authentication is handled automatically via OAuth. You can also manually add the following to your .claude/settings.json:
Alternatively, you can also connect using mcp-remote:

Connect to Claude Desktop

Click Add to Claude at the top of this page, or open the Tavily connector in Claude’s directory, click Connect, and sign in to Tavily. See the Claude guide for organization-wide access and the Tavily plugin.

Connect to Cursor

For the recommended Tavily plugin, standalone setup options, and examples, see the Cursor guide. The Add to Cursor button above installs the server with OAuth. To use an API key instead, add this to your mcp.json and replace <your-api-key> with your Tavily API key:

OpenAI Responses API

Allow OpenAI models to use the remote Tavily MCP server to perform tasks.
  • Export your OPENAI_API_KEY.
  • Replace <your-api-key> with your Tavily API key.

Clients that don’t support remote MCPs

mcp-remote is a lightweight bridge that lets MCP clients that can only talk to local (stdio) servers securely connect to remote MCP servers over HTTP + SSE with OAuth-based auth, so you can host and update your server in the cloud while existing clients keep working. It serves as an experimental stop-gap until popular MCP clients natively support remote, authorized servers.

OAuth Authentication

The Tavily Remote MCP server supports secure OAuth authentication, allowing you to connect and authorize seamlessly with compatible clients.
Open the MCP Inspector and click “Open Auth Settings”. Select the OAuth flow and complete these steps:
  1. Metadata discovery
  2. Client registration
  3. Preparing authorization
  4. Request authorization and obtain the authorization code
  5. Token request
  6. Authentication complete
Once finished, you will receive an access token that lets you securely make authenticated requests to the Tavily Remote MCP server.
You can configure your MCP client to use OAuth without including your Tavily API key in the URL. For example, in Cursor’s mcp.json:
If you need to clear stored OAuth credentials and reauthenticate, run:
API Key Selection for OAuthWhen using OAuth authentication, you can control which API key is used by naming a key mcp_auth_default in your Tavily dashboard:
  • Personal account: If you have a key named mcp_auth_default in your personal account, it will be used for all OAuth-authenticated requests.
  • Team account: If your team has a key named mcp_auth_default, it will be used for all OAuth-authenticated requests.
  • Both set: If both your personal account and your team have a key named mcp_auth_default, the personal key takes priority.
  • Neither set: If no mcp_auth_default key exists, the default key in your personal account will be used. If no default key is set, the first available key will be used.
OAuth authentication is optional—you can still use API key authentication at any time by including your Tavily API key in the URL query parameter (?tavilyApiKey=...) or by setting it in the Authorization header.

Default Parameters

When using the remote MCP, you can specify default parameters for all requests by including a DEFAULT_PARAMETERS header containing a JSON object with your desired defaults. Example:

Session & User Attribution

The remote MCP server automatically attaches identifiers to every Tavily API call so requests can be attributed back to a session. It generates X-Session-Id on its own, while X-Human-Id is forwarded only when supplied by the client.
  • X-Session-Id — generated per MCP session (the mcp-session-id returned during the MCP initialize handshake). All tool calls within the same MCP session share the same value.
  • X-Human-Id — if your client provides an X-Human-Id header (or humanId query parameter on the MCP URL), it is forwarded through to the Tavily API, helping Tavily better understand multi-step interactions and improve response quality. For security, Tavily hashes human IDs before processing or storing them.
See Session Tracking for the underlying API contract.

Local Installation

You can also run the Tavily MCP server on your own machine instead of using the remote server.

Prerequisites

  • Tavily API key
    • If you don’t have a Tavily API key, you can sign up for a free account here
  • An MCP client, such as Claude Desktop or Cursor
  • Node.js (v20 or higher)
    • You can verify your Node.js installation by running:
Only needed if using Git installation method:
  • On macOS: brew install git
  • On Linux:
    • Debian/Ubuntu: sudo apt install git
    • RedHat/CentOS: sudo yum install git
  • On Windows: Download Git for Windows
Although you can launch a server on its own, it’s not particularly helpful in isolation. Instead, you should integrate it into an MCP client.

Configuring MCP Clients

Follow the local MCP setup in the Cursor guide to configure the server in mcp.json, add your Tavily API key, and enable its tools in Customize.

Default parameters for local servers

For local MCP setups, you can set default parameter values using the DEFAULT_PARAMETERS environment variable. This allows you to configure default search behavior without specifying these parameters in every request.

Session attribution for local servers

The local MCP server automatically attaches identifiers to every Tavily API call so requests can be attributed back to a session:
  • X-Session-Id — auto-generated once per MCP process and reused for every tool call.
  • X-Human-Id — if you set the HUMAN_ID environment variable, that value is forwarded through to the Tavily API on every request, helping Tavily better understand multi-step interactions and improve response quality. For security, Tavily hashes human IDs before processing or storing them.
See Session Tracking for the underlying API contract.

Usage Examples

  1. General Web Search:
  1. News Search:
  1. Domain-Specific Search:
Extract Article Content:

Troubleshooting

If you encounter server connection issues, run these commands to verify your environment:
Make sure to also check your configuration syntax for any errors.
If experiencing problems with npx, locate your executable:
Once you have the path, update your configuration to use the full path to the npx executable.
When troubleshooting API key problems, verify that your key is:
  • Properly formatted with the tvly- prefix
  • Valid and active in your Tavily dashboard
  • Correctly configured in your environment variables
You can test your API key validity by making a simple test request through the Tavily Playground

Resources

GitHub

tavily-ai/tavily-mcpGitHub Repo stars

npm

tavily-mcpnpm

Tutorial: Tavily MCP with Neo4j

Build a knowledge graph assistant by combining the Tavily and Neo4j MCP servers with Claude.

Model Context Protocol

Read the MCP specification.