Skip to main content

Tavily MCP Server with HTTP/HTTPS Proxy Support

Project description

Tavily MCP Server with Proxy Support

A Model Context Protocol server that provides AI-powered web search capabilities using Tavily's search API, with added support for HTTP/HTTPS proxy configurations. This server enables LLMs to perform sophisticated web searches through proxy servers, get direct answers to questions, and search recent news articles with AI-extracted relevant content.

Features

  • All original Tavily MCP Server features
  • HTTP/HTTPS proxy support through environment variables
  • Enhanced logging for proxy configurations
  • Robust error handling for proxy-related issues

Available Tools

  • tavily_web_search - Performs comprehensive web searches with AI-powered content extraction.

    • query (string, required): Search query
    • max_results (integer, optional): Maximum number of results to return (default: 5, max: 20)
    • search_depth (string, optional): Either "basic" or "advanced" search depth (default: "basic")
  • tavily_answer_search - Performs web searches and generates direct answers with supporting evidence.

    • query (string, required): Search query
    • max_results (integer, optional): Maximum number of results to return (default: 5, max: 20)
    • search_depth (string, optional): Either "basic" or "advanced" search depth (default: "advanced")
  • tavily_news_search - Searches recent news articles with publication dates.

    • query (string, required): Search query
    • max_results (integer, optional): Maximum number of results to return (default: 5, max: 20)
    • days (integer, optional): Number of days back to search (default: 3)

Installation

Use pip

pip install mcp-tavily-proxy

or if you have uv installed:

uv pip install mcp-tavily-proxy

Build from Source

Clone this repository and build and install the program:

git clone https://github.com/tulong66/mcp-tavily-proxy.git
cd mcp-tavily-proxy
uv build
uv pip install .

Configuration

API Key and Proxy Settings

The server requires a Tavily API key and supports proxy configuration through environment variables:

  1. Set required environment variables:
# Tavily API Key
export TAVILY_API_KEY=your_api_key_here

# Proxy Settings (if needed)
export HTTP_PROXY=http://your-proxy:port
export HTTPS_PROXY=http://your-proxy:port
  1. Or provide API key as a command-line argument:
python -m mcp_server_tavily --api-key=your_api_key_here

Configure for Claude.app

Add to your Claude settings:

{
  "mcpServers": {
    "tavily": {
      "command": "python",
      "args": ["-m", "mcp_server_tavily"]
    },
    "env": {
      "TAVILY_API_KEY": "your_api_key_here",
      "HTTP_PROXY": "http://your-proxy:port",
      "HTTPS_PROXY": "http://your-proxy:port"
    }
  }
}

Examples

For a regular search:

Tell me about Anthropic's newly released MCP protocol

To generate a report with explicit exclusions:

Tell me about redwood trees. Please use MLA format in markdown syntax and include the URLs in the citations. Exclude Wikipedia sources.

For news search:

Give me the top 10 AI-related news in the last 5 days

Debugging

Enable debug logging to see detailed proxy configuration information:

export TAVILY_LOG_LEVEL=DEBUG
python -m mcp_server_tavily

You can also use the MCP inspector:

npx @modelcontextprotocol/inspector python -m mcp_server_tavily

Contributing

Contributions are welcome! Please feel free to submit pull requests to help improve the proxy support or add new features.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This project is based on the original mcp-tavily with added proxy support functionality.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_mcp_tavily_proxy-0.1.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseep_mcp_tavily_proxy-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file mseep_mcp_tavily_proxy-0.1.0.tar.gz.

File metadata

  • Download URL: mseep_mcp_tavily_proxy-0.1.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_mcp_tavily_proxy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5413e54d2cd5aeb42a8062f09e8217e371591ac4d80361348c7e5e93cea9aa58
MD5 aa8a788ff77a2edf078a812a0441e762
BLAKE2b-256 73ee1e1fd0db6d5d3080b7ff2510aa0b9ab8ce190d54a41af0ea84e4073f155d

See more details on using hashes here.

File details

Details for the file mseep_mcp_tavily_proxy-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_mcp_tavily_proxy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32387116935deb25b99b518b515d06db2e7e52482fe06c67fee8249975b923a8
MD5 c232a9d90ac02b64f40f6bdac8098934
BLAKE2b-256 73b8c6f60397268f8eda1c2ee30e8e8b40c030f42c34b152ee4fe72738671dde

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page