tavily-mcp-python
Supports containerization of the SSE server for isolated and portable deployment of the Tavily MCP server.
Enables configuration through environment variables stored in .env files for API keys and server settings.
Required for source code management and downloading the server implementation.
Supported operating system for installing and running the Tavily MCP server.
Supported operating system for installing and running the Tavily MCP server.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tavily-mcp-pythonsearch for latest AI developments in healthcare"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tavily MCP Server
Tavily MCP Server implementation that uses fastmcp and supports both sse and stdio transports. To use this server, you need a Tavily account and a Tavily API key, which must be loaded into the TAVILY_API_KEY environment variable.
The Tavily MCP server provides:
search, extract, map, crawl tools
Real-time web search capabilities through the tavily-search tool
Intelligent data extraction from web pages via the tavily-extract tool
Powerful web mapping tool that creates a structured map of website
Web crawler that systematically explores websites
Prerequisites
git installed. (To clone the repo)
uv installed.
docker installed (Optional: If you are planning to use the SSE server inside a docker container).
To install uv in Linux and MacOS type this in your terminal:
curl -LsSf https://astral.sh/uv/install.sh | shEnvironment Variables
Copy the .env.example file and rename that to .env. Then paste your TAVILY_API_KEY inside there
TAVILY_API_KEY=<YOUR-API-KEY>Optional: You can also configure the port if you are planning to use SSE.
TAVILY_MCP_PORT=<PORT>Running the SSE server
While inside the repo run:
uv run --env-file .env tavily-mcp-sseRunning on STDIO
{
"mcpServers": {
"tavily-mcp-server": {
"command": "uv",
"args": [
"run",
"--directory",
"<LOCATION-TO-THE-REPO>",
"tavily-mcp-stdio"
],
"env": {
"TAVILY_API_KEY": "<YOUR-API-KEY>"
}
}
}
}Docker SSE Server
First you need to build the image using the Dockerfile inside this repository. Run this to build the image:
docker build -t tavily-mcp .Then you can run the container using the environment variables inside the env file
docker run --name tavily-mcp \
-p 127.0.0.1:8000:8000 \
--env-file .env \
tavily-mcpOr you can specify the environment variables yourself.
docker run --name tavily-mcp \
-p 127.0.0.1:8000:8000 \
-e TAVILY_API_KEY=<YOUR-API-KEY>
tavily-mcpAvailable Tools
4 toolstavily-crawlC
A powerful web crawler that initiates a structured web crawl starting from a specified base URL. The crawler expands from that point like a tree, following internal links across pages. You can control how deep and wide it goes, and guide it to focus on specific sections of the site.
| Name | Required | Description | Default |
|---|---|---|---|
| allow_external | No | Whether to allow following links that go to external domains | |
| categories | No | Filter URLs using predefined categories like documentation, blog, api, etc | |
| extract_depth | No | Advanced extraction retrieves more data, including tables and embedded content, with higher success but may increase latency | basic |
| format | No | The format of the extracted web page content. markdown returns content in markdown format. text returns plain text and may increase latency. | markdown |
| instructions | Yes | Natural language instructions for the crawler | |
| limit | No | Total number of links the crawler will process before stopping | |
| max_breadth | No | Max number of links to follow per level of the tree (i.e., per page) | |
| max_depth | No | Max depth of the crawl. Defines how far from the base URL the crawler can explore. | |
| select_domains | No | Regex patterns to select crawling to specific domains or subdomains (e.g., ^docs\.example\.com$) | |
| select_paths | No | Regex patterns to select only URLs with specific path patterns (e.g., /docs/.*, /api/v1.*) | |
| url | Yes | Root URL to begin the crawl |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the crawling mechanism (tree-like expansion) and some controls, but lacks critical details like rate limits, authentication needs, error handling, or what the output looks like (e.g., format, structure). For a complex tool with 11 parameters, this is insufficient.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded, stating the core purpose in the first sentence. Each subsequent sentence adds relevant context about crawling behavior and controls without unnecessary fluff. However, it could be slightly more structured by explicitly mentioning key parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (11 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain the output format, potential side effects (e.g., network usage), or error scenarios. For a web crawler with many controls, more behavioral and output context is needed to guide effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value by mentioning depth, breadth, and focusing on site sections, which loosely relates to max_depth, max_breadth, and categories/select_paths, but doesn't provide additional syntax or usage context beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as initiating a structured web crawl from a base URL, following internal links like a tree, with control over depth and breadth. It specifies the verb 'crawl' and resource 'web pages' but doesn't explicitly distinguish it from sibling tools like tavily-extract or tavily-map, which likely have different functions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings (tavily-extract, tavily-map, tavily-search). It mentions controlling depth and width and focusing on site sections, but this is more about parameter usage rather than contextual application or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tavily-extractC
A powerful web content extraction tool that retrieves and processes raw content from specified URLs, ideal for data collection, content analysis, and research tasks.
| Name | Required | Description | Default |
|---|---|---|---|
| extract_depth | No | Depth of extraction - 'basic' or 'advanced', if urls are linkedin use 'advanced' or if explicitly told to use advanced | basic |
| format | No | The format of the extracted web page content. markdown returns content in markdown format. text returns plain text and may increase latency. | markdown |
| include_images | No | Include a list of images extracted from the urls in the response | |
| urls | Yes | List of URLs to extract content from |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'powerful web content extraction' and 'retrieves and processes raw content' but lacks critical details like rate limits, authentication requirements, error handling, or what 'processes' entails beyond what the parameters specify.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the core purpose in the first clause. The second clause adds use cases without redundancy. However, the phrase 'ideal for data collection, content analysis, and research tasks' is somewhat generic and could be more specific.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks behavioral context (e.g., performance, limitations), doesn't explain the output format or structure, and provides no sibling differentiation, leaving gaps for an AI agent to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional parameter semantics beyond what's in the schema, such as explaining interactions between parameters or edge cases. Baseline 3 is appropriate when the schema handles parameter documentation.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'retrieves and processes raw content from specified URLs' with specific verbs and resources. It distinguishes from siblings by focusing on extraction rather than crawling, mapping, or searching, though it doesn't explicitly name the alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings (tavily-crawl, tavily-map, tavily-search). It mentions general use cases like 'data collection, content analysis, and research tasks' but offers no explicit when/when-not instructions or alternative selection criteria.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tavily-mapC
A powerful web mapping tool that creates a structured map of website URLs, allowing you to discover and analyze site structure, content organization, and navigation paths. Perfect for site audits, content discovery, and understanding website architecture.
| Name | Required | Description | Default |
|---|---|---|---|
| allow_external | No | Whether to allow following links that go to external domains | |
| categories | No | Filter URLs using predefined categories like documentation, blog, api, etc | |
| instructions | Yes | Natural language instructions for the crawler | |
| limit | No | Total number of links the crawler will process before stopping | |
| max_breadth | No | Max number of links to follow per level of the tree (i.e., per page) | |
| max_depth | No | Max depth of the mapping. Defines how far from the base URL the crawler can explore | |
| select_domains | No | Regex patterns to select crawling to specific domains or subdomains (e.g., ^docs\.example\.com$) | |
| select_paths | No | Regex patterns to select only URLs with specific path patterns (e.g., /docs/.*, /api/v1.*) | |
| url | Yes | Root URL to begin the mapping |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. While it mentions the tool 'creates a structured map' and is 'perfect for site audits,' it lacks critical behavioral details: what format the output takes (structured how?), whether it's a read-only operation (implied but not stated), performance characteristics, error handling, or any limitations beyond what parameters suggest. For a complex 9-parameter web crawling tool with no annotations, this is inadequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately concise with two sentences that efficiently communicate core functionality and use cases. The first sentence defines the tool's purpose, and the second provides application contexts. There's no wasted language, though it could be slightly more front-loaded with explicit differentiation from siblings.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex web mapping tool with 9 parameters, no annotations, and no output schema, the description is incomplete. It doesn't address what the output looks like (critical since there's no output schema), doesn't explain behavioral constraints or performance implications, and offers minimal guidance on parameter usage beyond what the schema provides. The agent would struggle to use this tool effectively without trial and error.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 9 parameters thoroughly. The description adds no specific parameter semantics beyond implying general mapping behavior. It doesn't explain how parameters like 'categories' or 'instructions' integrate with the mapping process, nor does it provide context for parameter interactions. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as creating structured maps of website URLs for analysis of site structure, content organization, and navigation paths. It specifies the verb 'creates' and resource 'structured map of website URLs' with clear use cases (site audits, content discovery, website architecture). However, it doesn't explicitly differentiate from sibling tools like tavily-crawl or tavily-extract, which likely have overlapping functionality.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings (tavily-crawl, tavily-extract, tavily-search). It mentions general use cases like 'site audits, content discovery, and understanding website architecture' but offers no explicit when/when-not criteria or alternative selection guidance. The agent must infer usage from the tool name and description alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tavily-searchA
A powerful web search tool that provides comprehensive, real-time results using Tavily's AI search engine. Returns relevant web content with customizable parameters for result count, content type, and domain filtering. Ideal for gathering current information, news, and detailed web content analysis.
| Name | Required | Description | Default |
|---|---|---|---|
| auto_parameters | No | Let Tavily automatically configure search parameter based on the querry. The explicit parameters will override the automatic ones. | |
| country | No | Boost search results from a specific country. This will prioritize content from the selected country in the search results. Available only if topic is general. | |
| days | No | The number of days back from the current date to include in the search results. This specifies the time frame of data to be retrieved. Please note that this feature is only available when using the 'news' search topic | |
| exclude_domains | No | List of domains to specifically exclude, if the user asks to exclude a domain set this to the domain of the site | |
| include_answer | No | Include an LLM-generated answer to the provided query | |
| include_domains | No | A list of domains to specifically include in the search results, if the user asks to search on specific sites set this to the domain of the site | |
| include_image_descriptions | No | Include a list of query-related images and their descriptions in the response | |
| include_images | No | Include a list of query-related images in the response | |
| include_raw_content | No | Include the cleaned and parsed HTML content of each search result | |
| max_results | No | The maximum number of search results to return | |
| query | Yes | The search query to execute with Tavily. | |
| search_depth | No | The depth of the search. It can be 'basic' or 'advanced' | basic |
| time_range | No | The time range back from the current date to include in the search results. This feature is available for both 'general' and 'news' search topics | |
| topic | No | The category of the search. This will determine which of our agents will be used for the search | general |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden of behavioral disclosure. While it mentions 'real-time results' and 'customizable parameters,' it doesn't address important behavioral aspects like rate limits, authentication requirements, error conditions, or what format the results come in. For a complex 14-parameter search tool, this is insufficient behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured in two sentences that convey core functionality and ideal use cases. It's appropriately sized and front-loaded with the main purpose, though could be slightly more concise by combining related concepts.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex search tool with 14 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what the output looks like, doesn't mention rate limits or authentication, and provides minimal behavioral context. The description should do more to compensate for the lack of structured metadata.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all 14 parameters thoroughly. The description mentions 'customizable parameters for result count, content type, and domain filtering' which aligns with some parameters but doesn't add significant meaning beyond what's in the schema. Baseline 3 is appropriate when schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose as 'web search' with specific details: it uses Tavily's AI search engine, provides real-time results, and returns relevant web content. It distinguishes from siblings by focusing on search rather than crawling, extraction, or mapping.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool ('gathering current information, news, and detailed web content analysis'), but doesn't explicitly mention when NOT to use it or directly compare to sibling tools like tavily-crawl or tavily-extract. The guidance is helpful but lacks explicit alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v1.0.0- First observed
tavily-crawl - First observed
tavily-extract - First observed
tavily-map - First observed
tavily-search
TDQS
Each tool has a clearly distinct purpose: crawling, extracting, mapping, and searching. The descriptions emphasize unique functions—structured crawling, content extraction, site mapping, and AI-powered search—with no overlap that could cause confusion.
All tool names follow a consistent 'tavily-' prefix with a descriptive action suffix (crawl, extract, map, search). This uniform pattern makes the set predictable and easy to navigate for an agent.
Four tools are well-scoped for a web-focused server, covering key operations like crawling, extraction, mapping, and search. Each tool earns its place without feeling excessive or insufficient for the domain.
The tool set provides complete coverage for web content tasks: initiating crawls, extracting content, mapping site structures, and searching the web. There are no obvious gaps, enabling agents to handle end-to-end workflows in this domain.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
A simple MCP server built with FastMCP and python
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server implementation that integrates the Tavily Search API, providing optimized search capabilities for LLMs.15MIT
- FlicenseBqualityDmaintenanceMCP server using Tavily API for web search, enabling web search queries via stdio transport.5-
- FlicenseAqualityDmaintenanceMCP server that provides web search capabilities using the Tavily API.3-
- FlicenseBqualityDmaintenanceMCP server that provides web search functionality using the Tavily API. It runs in stdio transport mode and can be integrated with Cursor or other MCP clients.3-
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tsmndev/tavily-mcp-sse'
If you have feedback or need assistance with the MCP directory API, please join our Discord server