---
source_url: "https://docs.tavily.com/documentation/mcp"
title: Tavily MCP Server - Tavily Docs
mirrored_at: 2026-08-10T15:03:57.691Z
host: docs.tavily.com
cited_in_42a: true
mirror_canonical: "https://index.42a.ai/docs.tavily.com/documentation/mcp"
---

> **Original source:** https://docs.tavily.com/documentation/mcp

-   Overview
    
-   Features
    

The Model Context Protocol (MCP) is an open standard that enables AI systems to interact seamlessly with various data sources and tools, facilitating secure, two-way connections.Developed by Anthropic, the Model Context Protocol (MCP) enables AI assistants like Claude to seamlessly integrate with Tavily’s advanced search and data extraction capabilities. This integration provides AI models with real-time access to web information, complete with sophisticated filtering options and domain-specific search features.

The Tavily MCP server provides:

-   Seamless interaction with the tavily-search and tavily-extract tools
-   Real-time web search capabilities through the tavily-search tool
-   Intelligent data extraction from web pages via the tavily-extract tool

## Remote MCP Server

The easiest way to take advantage of Tavily MCP is by using the remote URL. This provides a seamless experience without requiring local installation or configuration. Simply use the remote MCP server URL with your Tavily API key:

Get your Tavily API key from [tavily.com](https://www.tavily.com/).

### Connect to Cursor

 Click the ⬆️ Add to Cursor ⬆️ button, this will do most of the work for you but you will still need to edit the configuration to add your API-KEY. You can get a Tavily API key [here](https://www.tavily.com/). once you click the button you should be redirect to Cursor … You will then be redirected to your `mcp.json` file where you have to add `your-api-key`.

### Connect to Claude Desktop

Claude desktop now supports adding `integrations` which is currently in beta. An integration in this case is the Tavily Remote MCP, below I will explain how to add the MCP as an `integration` in Claude desktop. Open claude desktop, click the button with the two sliders and then navigate to add integrations. Name the integration and insert the Tavily remote MCP url with your API key. You can get a Tavily API key [here](https://www.tavily.com/). Click `Add` to confirm.

### OpenAI

Allow models to use remote MCP servers to perform tasks.

-   You first need to export your OPENAI\_API\_KEY
-   You must also add your Tavily API-key to `<your-api-key>`, you can get a Tavily API key [here](https://www.tavily.com/)

### Connect to Claude Code

[Claude Code](https://docs.anthropic.com/en/docs/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`:

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

Alternatively, you can also run the MCP server locally.

### 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](https://docs.tavily.com/documentation/api-reference/introduction#session--user-tracking) for the underlying API contract.

## Local Installation

### Prerequisites

### Configuring MCP Clients

-   Cursor
    
-   Claude Desktop
    

> **Note**: Requires Cursor version 0.45.6 or higher

To set up the Tavily MCP server in Cursor:

1.  Open Cursor Settings
2.  Navigate to Features > MCP Servers
3.  Click on the ”+ Add New MCP Server” button
4.  Fill out the following information:
    -   **Name**: Enter a nickname for the server (e.g., “tavily-mcp”)
    -   **Type**: Select “command” as the type
    -   **Command**: Enter the command to run the server:

Add this configuration (replace `tvly-YOUR_API_KEY-here` with your [Tavily API key](https://tavily.com/api-keys)):

Configuration

### Default Parameters

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 & User Attribution

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](https://docs.tavily.com/documentation/api-reference/introduction#session--user-tracking) for the underlying API contract.

## Usage Examples

## Troubleshooting

Server Not Found

If you encounter server connection issues, run these commands to verify your environment:

Make sure to also check your configuration syntax for any errors.

NPX Issues

If experiencing problems with npx, locate your executable:

API Key Issues

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

## Acknowledgments