Skip to main content
Glama
inesaranab

Tavily Web Search MCP Server

by inesaranab

AI Makerspace: MCP Session Repo for Session 13

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: Tavily 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://AI-Maker-Space/AIE8-MCP-Session.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.

Activities:

There are a few activities for this assignment!

🏗️ Activity #1:

Choose an API that you enjoy using - and build an MCP server for it!

🏗️ Activity #2:

Build a simple LangGraph application that interacts with your MCP Server.

You can find details here!

Available Tools

3 tools
roll_diceC

Roll the dice with the given notation

ParametersJSON Schema
NameRequiredDescriptionDefault
notationYes
num_rollsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.7/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. It states the action ('roll the dice') but doesn't disclose behavioral traits like whether this is deterministic or random, what the output format is, or any limitations. The description is minimal and lacks essential context for a tool that likely involves randomness.

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

Conciseness5/5

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

The description is a single, efficient sentence with no wasted words. It's appropriately sized for a simple tool and front-loaded with the core action. Every word earns its place, making it highly concise.

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

Completeness3/5

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

Given the tool's low complexity and the presence of an output schema, the description is somewhat complete but inadequate. It covers the basic action but lacks details on notation format and behavioral aspects. With no annotations and minimal parameter explanation, it doesn't fully compensate for the gaps, though the output schema might help.

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?

Schema description coverage is 0%, so the description must compensate. It mentions 'given notation' which hints at the 'notation' parameter, but doesn't explain what the notation entails. It doesn't address the 'num_rolls' parameter at all. The description adds minimal meaning beyond the schema, failing to clarify parameter usage.

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 'Roll the dice with the given notation' states a clear action (roll) and resource (dice), but it's vague about what 'given notation' means. It doesn't distinguish from sibling tools like text_to_speech or web_search, but those are unrelated, so differentiation isn't critical here. The purpose is understandable but lacks specificity about the dice notation format.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention any context, prerequisites, or exclusions. Given the unrelated sibling tools, explicit alternatives aren't needed, but there's no indication of typical use cases or constraints.

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

text_to_speechC

Convert the given text into speech and save as MP3 file

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes
voice_idNoJBFqnCBsd6RMkjVDRZzb

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

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 converting text to speech and saving as MP3, implying a write operation, but lacks details on permissions, rate limits, file storage location, or error handling. This is a significant gap for a tool that likely involves file creation and external processing.

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

Conciseness5/5

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

The description is a single, efficient sentence with zero waste, front-loading the core functionality. It's appropriately sized for the tool's complexity, making it easy to parse without unnecessary elaboration.

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

Completeness3/5

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

Given the tool has an output schema (which likely describes the MP3 file or result), the description doesn't need to explain return values. However, with no annotations, 0% schema coverage, and two parameters, it's incomplete—missing behavioral context and parameter details. It's minimally adequate but has clear gaps in guiding usage and transparency.

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?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'given text' and 'save as MP3 file', which loosely relates to the 'text' parameter but doesn't explain the 'voice_id' parameter or its default value. The description adds minimal meaning beyond the schema, failing to fully address the coverage gap.

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 with specific verbs ('convert', 'save') and resources ('text', 'MP3 file'), making it easy to understand what it does. However, it doesn't differentiate from sibling tools (roll_dice, web_search), which are unrelated, so it doesn't need sibling differentiation but could mention uniqueness in a broader context.

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 alternatives or in what contexts. It states what it does but offers no usage instructions, prerequisites, or exclusions, leaving the agent to infer appropriate scenarios without explicit help.

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

TDQS

C2.8/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: rolling dice, converting text to speech, and searching the web. The descriptions are straightforward, making it impossible to confuse one tool for another.

Naming Consistency2/5

The naming is inconsistent with mixed conventions: 'roll_dice' and 'web_search' use snake_case, while 'text_to_speech' also uses snake_case but has a different verb style ('text_to' vs. 'roll'/'web'). There is no predictable pattern across the set.

Tool Count2/5

With only 3 tools, the set feels thin for a web search server, as the domain suggests a focus on search-related operations. The inclusion of dice-rolling and text-to-speech tools seems out of scope, making the count inappropriate for the apparent purpose.

Completeness2/5

For a web search server, there are significant gaps in the tool surface: it lacks core operations like filtering search results, getting detailed page content, or managing search history. The unrelated tools (dice, text-to-speech) do not contribute to domain coverage, leaving the search functionality incomplete.

Maintenance

ActivityInactive
ResponsivenessNo issues

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
    F
    maintenance
    Provides AI-powered web search capabilities using Tavily's search API, enabling LLMs to perform sophisticated web searches, get direct answers to questions, and search recent news articles.
    72
    MIT
  • F
    license
    C
    quality
    D
    maintenance
    Enables web search capabilities through the Tavily API via the Model Context Protocol. Allows users to perform web searches and retrieve information from the internet through natural language queries.
    5
  • F
    license
    C
    quality
    D
    maintenance
    Enables web search capabilities through the Tavily API. Allows users to search the web for information using natural language queries through the MCP protocol.
    3

Appeared in Searches

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/inesaranab/MCP'

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