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
2 toolscheck_stock_priceC
Get the current price of a stock symbol
| Name | Required | Description | Default |
|---|---|---|---|
| stock_symbol | 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 states the tool retrieves current stock prices, implying a read-only operation, but doesn't mention any behavioral traits like rate limits, data freshness, error handling, or authentication needs. This leaves significant gaps in understanding how the tool behaves in practice.
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, clear sentence that efficiently conveys the core functionality without any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.
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 lack of annotations, 0% schema description coverage, and no output schema, the description is incomplete. It doesn't address behavioral aspects, parameter details, or what the tool returns (e.g., price format, timestamp, error responses). For a tool with one parameter but no structured documentation, more context is needed to ensure reliable use.
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 the lack of parameter documentation. It mentions 'stock symbol' as the input, which aligns with the single parameter in the schema, but doesn't add any semantic details beyond what's implied by the parameter name (e.g., format examples like 'AAPL' or 'GOOGL', validation rules, or what constitutes a valid symbol).
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 ('Get') and resource ('current price of a stock symbol'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from its sibling tool 'get_comprehensive_stock_data', which might offer more detailed information beyond just the current price.
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 its sibling 'get_comprehensive_stock_data'. It lacks any context about alternatives, prerequisites, or exclusions, leaving the agent to infer usage based solely on the tool name and description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_comprehensive_stock_dataC
Get comprehensive stock data including price, financial metrics, and recent news.
| Name | Required | Description | Default |
|---|---|---|---|
| stock_symbol | Yes |
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 what data is returned but doesn't cover critical aspects like rate limits, authentication needs, data freshness, error handling, or whether it's a read-only operation. For a data-fetching tool with zero annotation coverage, this is a significant gap.
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 front-loads the core purpose. Every word earns its place by specifying the action, resource, and included data types without redundancy or fluff.
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 fetching comprehensive stock data, the lack of annotations, no output schema, and minimal parameter guidance, the description is incomplete. It doesn't address how data is returned, error cases, or operational constraints, making it inadequate for reliable tool invocation.
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, and the description doesn't mention parameters at all. However, since there's only one parameter ('stock_symbol'), the baseline is 4, but it's reduced to 3 because the description doesn't add any semantic context (e.g., format examples like 'AAPL' or 'MSFT', or validation rules) beyond what's implied by the schema's title.
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 verb 'Get' and the resource 'comprehensive stock data', specifying it includes price, financial metrics, and recent news. This distinguishes it from the sibling tool 'check_stock_price', which likely focuses only on price. However, it doesn't explicitly state how it differs from the sibling beyond listing data types.
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 the sibling 'check_stock_price'. It doesn't mention alternatives, prerequisites, or specific contexts for use, leaving the agent to infer based on the tool name and data scope 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.
2 tool updates
v1.0.0- First observed
check_stock_price - First observed
get_comprehensive_stock_data
TDQS
The two tools have overlapping purposes, as both retrieve stock price data, with 'get_comprehensive_stock_data' including additional metrics and news. An agent could easily confuse them or misselect 'check_stock_price' when more comprehensive data is needed, leading to inefficiency or incomplete results.
The tool names follow a mixed convention: 'check_stock_price' uses a verb_noun pattern, while 'get_comprehensive_stock_data' uses a verb_adjective_noun pattern. This inconsistency in naming styles (e.g., 'check' vs. 'get', and structure) reduces predictability, though the names are still readable and descriptive.
With only 2 tools, the server feels under-scoped for a 'Tavily Web Search MCP Server', which suggests broader web search capabilities. The tools are narrowly focused on stock data, lacking general search or other domain-specific functions, making the count too low for the implied purpose.
The server has significant gaps in its tool surface. As a web search server, it lacks tools for general web searches, news retrieval, or other common search functions beyond stocks. The stock-related tools themselves are incomplete, missing operations like historical data, company info, or portfolio management, limiting agent effectiveness.
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
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Enable AI assistants to perform web searches using Perplexity's Sonar Pro.
Real-time web search, reasoning, and research through Perplexity's API
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables web search capabilities through the Tavily API. Allows users to search the web for information using natural language queries via the MCP protocol.41-
- FlicenseCqualityDmaintenanceEnables 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-
- 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/terellcodes/yfinance-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server