Tavily Search MCP Server
Loads environment variables from a .env file to securely configure the server with API keys.
Used for version control and repository management, enabling users to clone the project code.
Hosts the repository and provides access to the project code through cloning.
The runtime environment required to execute the MCP server, version 3.13 or higher is needed.
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 Search MCP Serversearch 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.
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.uvwinget 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.gitAfter that, you can follow from Step 2. below!
Installation
Clone the repository:
git clone <repository-url> cd <repository-directory>Configure environment variables: Copy the
.env.sampleto.envand add your Tavily API key:TAVILY_API_KEY=your_api_key_here🏗️ 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 toolsroll_diceC
Roll the dice with the given notation
| Name | Required | Description | Default |
|---|---|---|---|
| notation | Yes | ||
| num_rolls | No |
TDQS
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.
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.
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.
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.
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.
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.
web_searchC
Search the web for information about the given query
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
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 'Search the web' but doesn't specify aspects like rate limits, authentication needs, result format, or potential side effects (e.g., whether it accesses external APIs or has usage constraints). This leaves significant gaps in understanding how the tool behaves beyond its basic function.
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 a single, efficient sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core action ('Search the web'), making it easy to parse. Every part of the sentence contributes essential information, achieving optimal conciseness for such a straightforward tool.
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 moderate complexity (web search with external dependencies), no annotations, no output schema, and low schema coverage, the description is insufficiently complete. It lacks details on behavioral traits, result handling, error conditions, or usage constraints, which are critical for an AI agent to invoke this tool effectively in varied contexts.
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?
The input schema has 1 parameter with 0% description coverage, so the description must compensate. It adds meaning by explaining that the 'query' parameter is used to search for information on the web, which clarifies its purpose beyond the schema's basic type definition. However, it doesn't provide details on query formatting, length limits, or examples, resulting in only partial compensation.
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 action ('Search the web') and the resource ('information about the given query'), making the purpose immediately understandable. It doesn't distinguish from sibling tools like 'roll_dice' or 'YOUR_TOOL_NAME', but those are unrelated, so differentiation isn't critical here. The description avoids tautology by specifying what kind of search it performs.
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 alternatives or in what context it's appropriate. It simply states what it does without indicating any prerequisites, limitations, or scenarios where it might be preferred over other tools. This lack of usage context leaves the agent with minimal direction.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
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, 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.
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.
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.
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.
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.
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
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 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.
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.
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
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
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Docs: https://docs.keenable.ai/mcp-server Keenable is a free, remote MCP server that gives agents access to the web index. Search the web with ranked results and date/site filters, then fetch any indexed page as clean markdown. Works out of the box with no account or API key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server enabling advanced search and content extraction using the Tavily API, with rich customization and integration options.13712MIT
- AlicenseAqualityAmaintenanceA Model Context Protocol server that enables web search, scraping, crawling, and content extraction through multiple engines including SearXNG, Firecrawl, and Tavily.4190139MIT
- AlicenseBqualityCmaintenanceA 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.16240ISC
- AlicenseAqualityBmaintenanceA Model Context Protocol server that provides real-time web search capabilities to AI assistants through pluggable search providers, currently integrated with the Brave Search API.516MIT
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/mwalker-tmd/MCP-Session-Code'
If you have feedback or need assistance with the MCP directory API, please join our Discord server