Skip to main content
Glama
tsmndev

tavily-mcp-python

by tsmndev

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 | sh

Environment 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-sse

Running 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-mcp

Or 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-mcp

Available Tools

4 tools
tavily-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
allow_externalNoWhether to allow following links that go to external domains
categoriesNoFilter URLs using predefined categories like documentation, blog, api, etc
extract_depthNoAdvanced extraction retrieves more data, including tables and embedded content, with higher success but may increase latencybasic
formatNoThe format of the extracted web page content. markdown returns content in markdown format. text returns plain text and may increase latency.markdown
instructionsYesNatural language instructions for the crawler
limitNoTotal number of links the crawler will process before stopping
max_breadthNoMax number of links to follow per level of the tree (i.e., per page)
max_depthNoMax depth of the crawl. Defines how far from the base URL the crawler can explore.
select_domainsNoRegex patterns to select crawling to specific domains or subdomains (e.g., ^docs\.example\.com$)
select_pathsNoRegex patterns to select only URLs with specific path patterns (e.g., /docs/.*, /api/v1.*)
urlYesRoot URL to begin the crawl

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
extract_depthNoDepth of extraction - 'basic' or 'advanced', if urls are linkedin use 'advanced' or if explicitly told to use advancedbasic
formatNoThe format of the extracted web page content. markdown returns content in markdown format. text returns plain text and may increase latency.markdown
include_imagesNoInclude a list of images extracted from the urls in the response
urlsYesList of URLs to extract content from

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
allow_externalNoWhether to allow following links that go to external domains
categoriesNoFilter URLs using predefined categories like documentation, blog, api, etc
instructionsYesNatural language instructions for the crawler
limitNoTotal number of links the crawler will process before stopping
max_breadthNoMax number of links to follow per level of the tree (i.e., per page)
max_depthNoMax depth of the mapping. Defines how far from the base URL the crawler can explore
select_domainsNoRegex patterns to select crawling to specific domains or subdomains (e.g., ^docs\.example\.com$)
select_pathsNoRegex patterns to select only URLs with specific path patterns (e.g., /docs/.*, /api/v1.*)
urlYesRoot URL to begin the mapping

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.0
    • First observedtavily-crawl
    • First observedtavily-extract
    • First observedtavily-map
    • First observedtavily-search

TDQS

A3.6/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness5/5

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

ActivityInactive
ResponsivenessSyncing

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

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    MCP server using Tavily API for web search, enabling web search queries via stdio transport.
    5
    -
  • F
    license
    B
    quality
    D
    maintenance
    MCP 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
    -

Latest Blog Posts

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