Skip to main content
Glama
mwalker-tmd

Tavily Search MCP Server

by mwalker-tmd

AI Makerspace: MCP Event

This project is a demonstration of the MCP (Model Context Protocol) server, which utilizes the Tavily API for web search capabilities. The server is designed to run in a standard input/output (stdio) transport mode.

Related MCP server: OneSearch MCP Server

Project Overview

The MCP server is set up to handle web search queries using the Tavily API. It is built with the following key components:

  • TavilyClient: A client for interacting with the Tavily API to perform web searches.

Prerequisites

  • Python 3.13 or higher

  • A valid Tavily API key

⚠️NOTE FOR WINDOWS:⚠️

You'll need to install this on the Windows side of your OS.

This will require getting two CLI tool for Powershell, which you can do as follows:

  • winget install astral-sh.uv

  • winget install --id Git.Git -e --source winget

After you have those CLI tools, please open Cursor into Windows.

Then, you can clone the repository using the following command in your Cursor terminal:

git clone https://github.com/AI-Maker-Space/MCP-Session-Code.git

After that, you can follow from Step 2. below!

Installation

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Configure environment variables: Copy the .env.sample to .env and add your Tavily API key:

    TAVILY_API_KEY=your_api_key_here
  3. 🏗️ Add a new tool to your MCP Server 🏗️

Create a new tool in the server.py file, that's it!

Running the MCP Server

To start the MCP server, you will need to add the following to your MCP Profile in Cursor:

NOTE: To get to your MCP config. you can use the Command Pallete (CMD/CTRL+SHIFT+P) and select "View: Open MCP Settings" and replace the contents with the JSON blob below.

{
    "mcpServers":  {
        "mcp-server": {
            "command" : "uv",
            "args" : ["--directory", "/PATH/TO/REPOSITORY", "run", "server.py"]
        }
    }
}

The server will start and listen for commands via standard input/output.

Usage

The server provides a web_search tool that can be used to search the web for information about a given query. This is achieved by calling the web_search function with the desired query string.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any changes.

Available Tools

3 tools
roll_diceC

Roll the dice with the given notation

ParametersJSON Schema
NameRequiredDescriptionDefault
notationYes
num_rollsNo

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('Roll') but doesn't explain key behaviors: whether this is a deterministic or random process, what the output format might be (e.g., individual rolls, totals, or details), or any constraints like rate limits. For a tool with no annotation coverage, this leaves significant gaps in understanding how it operates.

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 a single, efficient sentence that gets straight to the point without unnecessary words. It's front-loaded with the core action ('Roll the dice'), making it easy to scan. However, its brevity contributes to underspecification rather than optimal clarity, as it lacks details needed for full understanding.

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 (involving dice notation and multiple rolls), no annotations, no output schema, and low schema description coverage, the description is incomplete. It doesn't explain what the tool returns (e.g., roll results), how errors are handled, or the semantics of parameters. For a tool that likely produces varied outputs, this leaves the agent with insufficient context to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'notation' but doesn't define what that entails (e.g., standard dice notation like '3d10+2'). It doesn't address 'num_rolls' at all, leaving its purpose unclear. With two parameters and no schema descriptions, the description adds minimal semantic value beyond hinting at one parameter's role.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Roll') and the resource ('dice'), but it's vague about what 'with the given notation' means. It doesn't specify what the dice notation entails (e.g., '2d6' for two six-sided dice) or how it differs from potential siblings like 'web_search' or 'YOUR_TOOL_NAME', which are unrelated. This provides a basic purpose but lacks specificity and differentiation.

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 offers no guidance on when to use this tool versus alternatives. It doesn't mention any context for rolling dice (e.g., for games, simulations, or random generation) or exclusions (e.g., not for mathematical calculations). With sibling tools like 'web_search' that serve different purposes, this lack of comparative guidance leaves the agent to infer usage based on tool names alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

YOUR_TOOL_NAMED

YOUR_TOOL_DESCRIPTION

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

TDQS

D1.1/5.0
Behavior1/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, but 'YOUR_TOOL_DESCRIPTION' offers no information about the tool's behavior, such as whether it performs read/write operations, requires authentication, has side effects, or handles errors. It fails to describe any behavioral traits beyond the placeholder text.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While the description is technically concise with a single word, it is under-specified rather than efficiently informative. The placeholder 'YOUR_TOOL_DESCRIPTION' does not earn its place as it provides no useful content, making it ineffective despite its brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 1 parameter with no schema descriptions, no annotations, no output schema, and sibling tools, the description is completely inadequate. It fails to address any contextual aspects, such as the tool's role among siblings or how it complements other tools, leaving the agent with insufficient information to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 required parameter with 0% description coverage, and the description 'YOUR_TOOL_DESCRIPTION' adds no meaning or context about the 'query' parameter. It does not explain what the query represents, its format, or how it influences the tool's operation, leaving the parameter undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'YOUR_TOOL_DESCRIPTION' is a tautology that merely restates the tool name 'YOUR_TOOL_NAME' without providing any meaningful information about what the tool actually does. There is no verb, resource, or specific functionality mentioned, making it impossible to understand the tool's purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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, when not to use it, or how it relates to sibling tools like 'roll_dice' and 'web_search'. There are no contextual cues, prerequisites, or alternatives mentioned, leaving the agent with no usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

C2.1/5.0
Disambiguation5/5

The three tools have clearly distinct purposes with no overlap: roll_dice handles random number generation, web_search performs internet queries, and YOUR_TOOL_NAME (though placeholder) appears to be a distinct third function. Each tool targets a completely different domain, making misselection unlikely.

Naming Consistency2/5

Naming conventions are inconsistent: roll_dice uses snake_case with a verb_noun pattern, web_search also uses snake_case verb_noun, but YOUR_TOOL_NAME uses a different style (all caps with underscores). While two tools follow a pattern, the third breaks it completely, creating naming chaos.

Tool Count3/5

With only three tools, this feels thin for a 'Tavily Search MCP Server' - the name suggests search-focused functionality, but only one tool (web_search) directly supports this. The inclusion of dice rolling seems out of scope, making the tool count borderline appropriate but poorly aligned with the server's stated purpose.

Completeness2/5

For a search server, there are significant gaps: only basic web_search is provided, with no advanced search options, filtering, result processing, or search history management. The placeholder tool and dice rolling don't address core search functionality, leaving the surface incomplete for search-related workflows.

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

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server enabling advanced search and content extraction using the Tavily API, with rich customization and integration options.
    137
    12
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    A Model Context Protocol server that enables AI assistants to perform real-time web searches, retrieving up-to-date information from the internet via a Crawler API.
    1
    62
    40
    ISC

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/mwalker-tmd/MCP-Session-Code'

If you have feedback or need assistance with the MCP directory API, please join our Discord server