tavily-search MCP server

tavily-search MCP server

A search server that integrates Tavily API with Model Context Protocol tools.

44
Stars
11
Forks
44
Watchers
1
Issues
tavily-search MCP server provides an MCP-compliant server to perform search queries using the Tavily API. It returns search results in text format, including AI responses, URLs, and result titles. The server is designed for easy integration with clients like Claude Desktop or Cursor and supports both local and Docker-based deployment. It facilitates AI workflows by offering search functionality as part of a standardized protocol interface.

Key Features

MCP protocol compliance
Performs contextual searches using Tavily API
Returns AI-processed search results with links and titles
Supports Claude Desktop integration
Docker Compose deployment option
Log storage for auditability
Configurable arguments including search depth
Shell script execution for custom environments
Environment variable-based API key management
Support for both Windows and MacOS clients

Use Cases

Enabling AI assistants to retrieve contextual information via search
Integrating search functionality within Claude Desktop workflows
Automated search tool in custom AI pipelines
Leveraging Tavily API for enhanced knowledge retrieval
Facilitating research by providing up-to-date event and topic summaries
Running AI-powered search agents in Docker-based environments
Command-line based search integration for developers
Providing search context to AI models in desktop clients
Centralized logging of search activities for monitoring
Customizing search behavior with configurable query options

README

tavily-search MCP server

A MCP server project

Trust Score

Components

This server uses the Tavily API to perform searches based on specified queries.

  • Search results are returned in text format.
  • Search results include AI responses, URIs, and titles of the search results.

Tools

This server implements the following tools:

  • search: Performs searches based on specified queries
    • Required argument: "query"
    • Optional argument: "search_depth" (basic or advanced)

Installing via Smithery

To install Tavily Search for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install tavily-search --client claude

Install

  1. Download the repository.
bash
git clone https://github.com/Tomatio13/mcp-server-tavily.git
  1. Open the Claude Desktop configuration file.
On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
On Windows: `C:\Users\[username]\AppData\Roaming\Claude\claude_desktop_config.json`
  1. Edit the configuration file as follows:
yaml
"mcpServers": {
  "tavily-search": {
    "command": "uv",
    "args": [
      "--directory",
      "C:\\your_path\\mcp-server-tavily",
      "run",
      "tavily-search"
    ],
    "env": {
      "TAVILY_API_KEY": "YOUR_TAVILY_API_KEY",
      "PYTHONIOENCODING": "utf-8"
    }
  }
}
  1. Restart Claude Desktop.

Usage

In Claude Desktop, when you ask "Please search for something", you will receive search results.

Search example:

Please search in detail for today's events in Kamakura

Response example:

According to the search results, the following events start today, December 1st:
"Kamakura Promotion Photo Contest 2025"
Period: December 1, 2024 - January 31, 2025
A photo contest for those who love Kamakura
Applications start accepting from today
Also, as a related upcoming event:
On December 7th, an exhibition by 12 Kamakura artists will be held at the Seibu Press Inn Kamakura Ofuna Station East Exit Lounge.

Log Storage Location

Logs are stored in the following location:

For Windows:

C:\Users\[username]\AppData\Roaming\Claude\logs\mcp-server-tavily-search

Execution with Cursor

  1. Create a shell script (e.g., script.sh) as shown below:
bash
#!/bin/bash
TARGET_DIR=/path/to/mcp-server-tavily
cd "${TARGET_DIR}"
export TAVILY_API_KEY="your-api-key"
export PYTHONIOENCODING=utf-8
uv --directory $PWD run tavily-search
  1. Configure Cursor's MCP Server settings as follows:
Name: tavily-search
Type: command
Command: /path/to/your/script.sh
  1. Save the settings.

  2. Once the settings are saved, you can ask Cursor's Composer-Agent to "search for something," and it will return the search results.

Running in Local Environment Using Docker Compose

Purpose

For operating systems other than Windows/MacOS where Claude Desktop cannot be used, this section explains how to set up and run an MCP server and client in a local environment using Docker compose.

Steps

  1. Install Docker.
  2. Download the repository.
bash
git clone https://github.com/Tomatio13/mcp-server-tavily.git
  1. Run Docker compose.
bash
docker compose up -d
  1. Execute the client.
bash
docker exec mcp_server uv --directory /usr/src/app/mcp-server-tavily/src run client.py
  1. Execution Results
  2. After searching for available tools as shown below, a query will be issued to Tavily and a response will be returned:
bash
2024-12-01 11:21:56,930 - tavily-search-server - INFO - Starting Tavily search server
2024-12-01 11:21:56,932 - tavily-search-server - INFO - Server initialized, starting main loop
2024-12-01 11:21:56,936 - mcp.server - INFO - Processing request of type ListToolsRequest
2024-12-01 11:21:56,936 - tavily-search-server - INFO - Listing available tools
利用可能なツール: nextCursor=None tools=[Tool(name='search', description='Search the web using Tavily API', inputSchema={'type': 'object', 'properties': {'query': {'type': 'string', 'description': 'Search query'}, 'search_depth': {'type': 'string', 'description': 'Search depth (basic or advanced)', 'enum': ['basic', 'advanced']}}, 'required': ['query']})]
2024-12-01 11:21:56,937 - mcp.server - INFO - Processing request of type CallToolRequest
2024-12-01 11:21:56,937 - tavily-search-server - INFO - TOOL_CALL_DEBUG: Tool called - name: search, arguments: {'query': '今日の東京タワーのイベントを教えて下さい'}
2024-12-01 11:21:56,937 - tavily-search-server - INFO - Executing search with query: '今日の東京タワーのイベントを教えて下さい'
2024-12-01 11:22:00,243 - httpx - INFO - HTTP Request: POST https://api.tavily.com/search "HTTP/1.1 200 OK"
2024-12-01 11:22:00,243 - tavily-search-server - INFO - Search successful - Answer generated
2024-12-01 11:22:00,243 - tavily-search-server - INFO - Search successful - Results available
ツール実行結果: content=[TextContent(type='text', text='AI Answer:\n今日の東京タワーのイベントは以下の通りです:\n1. Candlelight: エド・シーランとコールドプレイのヒットメドレー - 12月01日\n2. チームラボプラネッツ TOKYO - 12月01日から1月21日\n\n他にもイベントがある可能性がありますので、公式ウェブサイト等で最新情報をご確認ください。\n\n\n\nSearch Results:\n\n1. 東京タワー (東京): 現在のイベントとチケット | Fever\nURL: https://feverup.com/ja/tokyo/venue/tokyo-tower\nSummary: Summary not found\n\n\n2. 東京タワー(東京都)の施設で開催するイベント一覧|ウォーカープラス\nURL: https://www.walkerplus.com/spot/ar0313s03867/e_list.html\nSummary: Summary not found\n\n\n3. 東京タワー - Tokyo Tower\nURL: https://www.tokyotower.co.jp/event/\nSummary: Summary not found\n')] isError=False

Star History

Star History Chart

Repository Owner

Tomatio13
Tomatio13

User

Repository Details

Language Python
Default Branch main
Size 43 KB
Contributors 4
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Python
91.49%
Dockerfile
8.51%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • NCBI Literature Search MCP Server

    NCBI Literature Search MCP Server

    Seamless PubMed literature search via Model Context Protocol server.

    NCBI Literature Search MCP Server provides a Model Context Protocol (MCP) interface to search the vast PubMed database using natural language queries. It enables AI assistants to conduct comprehensive and advanced literature searches across biological and biomedical disciplines, returning metadata such as abstracts, author lists, MeSH terms, and DOIs. Designed for integration with AI tools, it supports advanced query capabilities and streamlines literature review and research discovery processes.

    • 6
    • MCP
    • vitorpavinato/ncbi-mcp-server
  • MCP ChatGPT Server

    MCP ChatGPT Server

    Enables direct access to OpenAI's ChatGPT API from Claude Desktop via the Model Context Protocol.

    MCP ChatGPT Server runs as an MCP-compliant server, allowing users to access OpenAI's ChatGPT API seamlessly within Claude Desktop. It supports customizable model parameters, automated conversation state management, integrated web search for up-to-date information, and facilitates interactive discussions between Claude and ChatGPT. Users can configure model selection, temperature, token limits, and use their own OpenAI API keys.

    • 14
    • MCP
    • billster45/mcp-chatgpt-responses
  • Maigret MCP Server

    Maigret MCP Server

    OSINT username and URL search server for the Model Context Protocol.

    Maigret MCP Server provides Model Context Protocol (MCP) integration for the Maigret OSINT tool, enabling AI and context-aware applications to search for usernames across hundreds of social networks and analyze URLs. Designed for seamless operation with MCP-compatible clients like Claude Desktop, it supports multiple output formats and advanced filtering options. The server can be installed via Docker or npm, offers Docker-based deployment for consistent performance, and facilitates responsible OSINT research.

    • 205
    • MCP
    • BurtTheCoder/mcp-maigret
  • CipherTrust Manager MCP Server

    CipherTrust Manager MCP Server

    Enables AI assistants to access CipherTrust Manager securely via the Model Context Protocol.

    CipherTrust Manager MCP Server provides an implementation of the Model Context Protocol (MCP), offering AI assistants such as Claude and Cursor a unified interface to interact with CipherTrust Manager resources. Communication is facilitated through JSON-RPC over stdin/stdout, enabling key management, CTE client management, user management, and connection management functionalities. The tool is configurable via environment variables and integrates with existing CipherTrust Manager instances using the ksctl CLI for secure resource access.

    • 7
    • MCP
    • sanyambassi/ciphertrust-manager-mcp-server
  • Confluence Communication Server MCP Server

    Confluence Communication Server MCP Server

    Seamlessly interact with Confluence using standardized MCP tools.

    Confluence Communication Server MCP Server is a TypeScript-based implementation that enables seamless interaction with Confluence through the Model Context Protocol. It provides tools for running CQL queries, retrieving, and updating Confluence page content, thus showcasing and adhering to core MCP concepts. The server is compatible with Claude Desktop and supports installation via Smithery, emphasizing ease of integration and automation for Confluence management tasks.

    • 13
    • MCP
    • KS-GEN-AI/confluence-mcp-server
  • Campertunity MCP Server

    Campertunity MCP Server

    Model Context Protocol server for AI-driven camping and outdoor recreation data

    Implements the Model Context Protocol (MCP) to provide AI models with structured access to camping and outdoor recreation data. Offers tools for searching, filtering, and booking campgrounds and sites based on a wide range of criteria. Enhances data accuracy with AI and aggregates information from multiple sources, enabling dynamic, real-time queries and bookings. Ideal for integrating intelligent camping experiences into AI-driven applications.

    • 11
    • MCP
    • campertunity/mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results