Tavily Web Search 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 Web Search MCP Serverfind recent news about AI advancements 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: Tavily Web Search 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
4 toolsgenerate_qr_codeB
Generate a QR code for the given data.
Args: data: The text or URL to encode in the QR code error_correction: Error correction level - "L" (Low ~7%), "M" (Medium ~15%), "Q" (Quartile ~25%), "H" (High ~30%) border: Size of the border (minimum is 4) box_size: Size of each box in pixels (default 10)
Returns: Base64 encoded PNG image of the QR code that can be displayed or saved
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error_correction | No | M | |
| border | No | ||
| box_size | 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 mentions the return format (Base64 encoded PNG image) but lacks details on performance, rate limits, error handling, or side effects. For a tool with no annotations, this is a significant gap in transparency.
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 well-structured with a clear purpose statement followed by Args and Returns sections. It's appropriately sized with no redundant information, though the parameter explanations could be slightly more concise (e.g., the error correction percentages are detailed but not strictly necessary).
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 no annotations, no output schema, and 4 parameters, the description is moderately complete. It covers parameters well and specifies the return format, but lacks context on behavioral aspects like error conditions or usage limits, making it adequate but with clear gaps for a tool of this complexity.
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 0%, so the description must compensate. It provides detailed semantic explanations for all four parameters: 'data' as text/URL to encode, 'error_correction' with levels and percentages, 'border' with minimum value, and 'box_size' with default. This adds substantial meaning beyond the bare 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 'Generate a QR code for the given data,' which is a specific verb+resource combination. However, it doesn't differentiate from sibling tools (roll_dice, scientific_calculator, web_search) since they serve completely different domains, so sibling differentiation isn't relevant here.
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. It doesn't mention any prerequisites, constraints, or scenarios where this tool is preferred over other methods for generating QR codes or handling the data.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
roll_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?
With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits like output format, error handling, or constraints (e.g., notation syntax limits). It mentions 'notation' but doesn't explain what that entails, leaving gaps in transparency.
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 with zero waste, front-loading the core action. It's appropriately sized for a simple tool, making every word count without unnecessary elaboration.
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 no annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't explain what 'notation' means, how results are returned, or any error cases, making it inadequate for a tool with two parameters and unspecified behavior.
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 0%, so the description must compensate but only vaguely references 'notation' without explaining its meaning or format. It doesn't address the 'num_rolls' parameter at all, failing to add meaningful semantics beyond the bare 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 action ('Roll') and resource ('dice'), specifying it uses 'given notation' which distinguishes it from simple dice rolling. However, it doesn't explicitly differentiate from sibling tools like generate_qr_code or scientific_calculator, which prevents a perfect score.
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 lacks any mention of prerequisites, exclusions, or comparisons with sibling tools, leaving usage entirely implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scientific_calculatorA
Evaluate mathematical expressions using a scientific calculator.
Supports:
Basic arithmetic: +, -, *, /, //, %, **
Scientific functions: sin, cos, tan, asin, acos, atan, sinh, cosh, tanh
Logarithmic functions: log, log10, log2, ln (natural log)
Exponential functions: exp, sqrt, cbrt
Constants: pi, e, tau
Complex numbers: 1+2j, complex operations
Trigonometric functions work with radians by default
Use degrees(x) to convert radians to degrees, radians(x) to convert degrees to radians
Examples:
"sin(pi/2)" -> 1.0
"log10(100)" -> 2.0
"sqrt(16)" -> 4.0
"2**3" -> 8
"exp(1)" -> 2.718281828459045
| Name | Required | Description | Default |
|---|---|---|---|
| expression | 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 does this well by specifying the calculator's capabilities (scientific functions, complex numbers), default behavior (trigonometric functions work with radians), and conversion utilities (degrees, radians). However, it doesn't mention error handling, precision limits, or performance characteristics that would be useful for an agent.
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 well-structured with a clear purpose statement followed by categorized bullet points and examples. Every sentence earns its place by providing specific, actionable information. It could be slightly more concise by combining some bullet points, but overall it's efficiently organized and front-loaded with the core purpose.
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 (mathematical evaluation with many functions), no annotations, no output schema, and low schema coverage, the description does an excellent job of providing context. It covers capabilities, syntax, defaults, and examples. The main gap is the lack of information about return values or error cases, which would be helpful since there's no output schema.
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 0% description coverage with only one parameter 'expression' of type string. The description compensates fully by providing extensive semantic context: it explains what the expression parameter should contain (mathematical notation), lists all supported operations and functions, shows syntax examples, and even provides conversion utilities. This adds significant value beyond the bare 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 'Evaluate mathematical expressions using a scientific calculator' with a specific verb ('evaluate') and resource ('mathematical expressions'), distinguishing it from sibling tools like generate_qr_code, roll_dice, and web_search which have completely different domains.
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 implies usage through the extensive list of supported operations and examples, suggesting this tool is for mathematical evaluation. However, it doesn't explicitly state when to use this versus alternatives or provide any exclusion criteria, leaving the context somewhat implied rather than clearly defined.
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 searching the web but doesn't disclose traits like rate limits, authentication needs, result format, or potential side effects (e.g., network usage). This is a significant gap for a tool that interacts with external resources.
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 with zero waste, front-loaded with the core action. It's appropriately sized for a simple tool, making it easy to parse without unnecessary details.
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 complexity of web searching (external interaction, no annotations, no output schema, and 0% schema coverage), the description is incomplete. It lacks details on behavior, results, error handling, or constraints, making it inadequate for an agent to use the tool effectively without additional context.
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%, and the description adds minimal meaning beyond the schema. It implies the 'query' parameter is used for web searches but doesn't explain its semantics, such as expected format, length constraints, or how it influences results. This fails to compensate for the lack of schema 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 with a specific verb ('Search') and resource ('the web'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'generate_qr_code' or 'roll_dice', which are unrelated, so it doesn't need sibling differentiation but could be more specific about what kind of web 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 simply states what it does without mentioning prerequisites, limitations, or scenarios where other tools might be more appropriate, leaving the agent to infer usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool serves a completely distinct purpose with no overlap: QR code generation, dice rolling, scientific calculation, and web search. An agent can easily differentiate between these unrelated functionalities, eliminating any risk of misselection.
Three tools follow a consistent verb_noun pattern (generate_qr_code, roll_dice, web_search), but 'scientific_calculator' deviates as a noun_noun compound. This minor inconsistency slightly reduces predictability, though the names remain clear and readable.
With only 4 tools, the set feels thin for a server named 'Tavily Web Search MCP Server', as web search is just one component among unrelated utilities. The count is borderline—too few to fully cover a coherent domain, suggesting a miscellaneous toolkit rather than a focused service.
For a web search server, the toolset is severely incomplete, lacking essential operations like filtering results, pagination, or retrieving specific content. The inclusion of unrelated tools (QR code, dice, calculator) further dilutes the domain, creating significant gaps that will hinder agent workflows focused on search.
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
Scrape, crawl and search the web for AI agents via MCP.
Serper MCP — wraps the Serper Google Search API (serper.dev)
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Related MCP Servers
- FlicenseCqualityDmaintenanceEnables web search capabilities through the Tavily API, allowing users to search the internet for information using natural language queries. Demonstrates MCP server implementation with external API integration.3
- FlicenseNot gradedqualityDmaintenanceEnables web search capabilities through the Tavily API, allowing users to search the web for information using natural language queries. Demonstrates MCP server implementation with stdio transport mode for integration with LLM applications.
- FlicenseCqualityDmaintenanceEnables web search capabilities through the Tavily API. Allows users to search the web for information using natural language queries through the MCP protocol.3
- FlicenseCqualityDmaintenanceEnables web search capabilities through the Tavily API, allowing users to perform web searches and retrieve information from the internet through natural language queries.3
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/nilay320/MCP-Session-Code'
If you have feedback or need assistance with the MCP directory API, please join our Discord server