MCP Tavily Search Server

by spences10
Verified

mcp-tavily-search

A Model Context Protocol (MCP) server for integrating Tavily's search API with LLMs. This server provides intelligent web search capabilities optimized for high-quality, factual results.

<a href="https://glama.ai/mcp/servers/1jcttrux58"><img width="380" height="200" src="https://glama.ai/mcp/servers/1jcttrux58/badge" alt="Tavily Search Server MCP server" /></a>

Features

  • 🔍 Advanced web search capabilities through Tavily API
  • 🤖 AI-generated summaries of search results
  • 🎯 Domain filtering for higher quality results
  • 📊 Configurable search depth
  • 🔄 Structured result formatting optimized for LLMs
  • 🏗️ Built on the Model Context Protocol

Configuration

This server requires configuration through your MCP client. Here are examples for different environments:

Cline Configuration

Add this to your Cline MCP settings:

{ "mcpServers": { "mcp-tavily-search": { "command": "npx", "args": ["-y", "mcp-tavily-search"], "env": { "TAVILY_API_KEY": "your-tavily-api-key" } } } }

Claude Desktop with WSL Configuration

For WSL environments, add this to your Claude Desktop configuration:

{ "mcpServers": { "mcp-tavily-search": { "command": "wsl.exe", "args": [ "bash", "-c", "source ~/.nvm/nvm.sh && TAVILY_API_KEY=your-tavily-api-key /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-tavily-search" ] } } }

Environment Variables

The server requires the following environment variable:

  • TAVILY_API_KEY: Your Tavily API key (required)

API

The server implements a single MCP tool with configurable parameters:

Search the web using Tavily Search API, optimized for high-quality, factual results.

Parameters:

  • query (string, required): Search query
  • search_depth (string, optional): "basic" (faster) or "advanced" (more thorough). Defaults to "basic"
  • include_answer (boolean, optional): Include AI-generated summary. Defaults to true
  • include_domains (string[], optional): List of trusted domains to include
  • exclude_domains (string[], optional): List of domains to exclude

Default included domains:

  • arxiv.org
  • scholar.google.com
  • science.gov
  • wikipedia.org
  • github.com
  • stackoverflow.com
  • developer.mozilla.org

Default excluded domains:

  • facebook.com
  • twitter.com
  • instagram.com
  • tiktok.com

Development

Setup

  1. Clone the repository
  2. Install dependencies:
pnpm install
  1. Build the project:
pnpm build
  1. Run in development mode:
pnpm dev

Publishing

The project uses changesets for version management. To publish:

  1. Create a changeset:
pnpm changeset
  1. Version the package:
pnpm changeset version
  1. Publish to npm:
pnpm release

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.

Acknowledgments

A
security – no known vulnerabilities (report Issue)
A
license - permissive license
A
quality - confirmed to work

Integrates Tavily's search API with LLMs to provide advanced web search capabilities, including intelligent result summaries, domain filtering for quality control, and configurable search parameters.

  1. Features
    1. Configuration
      1. Cline Configuration
        1. Claude Desktop with WSL Configuration
          1. Environment Variables
          2. API
            1. tavily_search
            2. Development
              1. Setup
                1. Publishing
                2. Contributing
                  1. License
                    1. Acknowledgments