Get the FREE Ultimate OpenClaw Setup Guide →

tavily -sse

Basic remote SSE MCP server for Tavily Search.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio noesamaille-tavily-mcp-sse python -m uvicorn server:app --host 0.0.0.0 --port 8000 --reload \
  --env API_KEY="<YOUR_API_KEY>" \
  --env TAVILY_API_KEY="<YOUR_TAVILY_API_KEY>"

How to use

This MCP server exposes a FastAPI-based interface that acts as a remote SSE MCP server for interacting with the Tavily API. It requires two API keys: API_KEY for accessing the server's endpoints and TAVILY_API_KEY for authenticating with the Tavily API itself. Once running, you can use the provided endpoints to perform Tavily searches and content extraction. The server is wrapped with the fastapi-mcp framework to enable remote SSE streaming capabilities, so you can integrate it into an MCP workflow and receive updates as events. To query, send a POST request to /tavily-search with a TavilySearchRequest payload to perform a search, or to /tavily-extract with a TavilyExtractRequest to extract content from URLs. Be sure to set the required environment variables before starting the server.

How to install

Prerequisites:

  • Python 3.8+ installed on your system
  • Access to install Python packages (pip)

Installation steps:

  1. Create a virtual environment (optional but recommended): python -m venv venv source venv/bin/activate # On Windows use: venv\Scripts\activate

  2. Install dependencies from requirements.txt: pip install -r requirements.txt

  3. Set up environment variables (before running the server): export API_KEY=your_api_key # Linux/macOS set API_KEY=your_api_key # Windows export TAVILY_API_KEY=your_tavily_api_key set TAVILY_API_KEY=your_tavily_api_key

  4. Run the server (the command used by MCP config): python -m uvicorn server:app --host 0.0.0.0 --port 8000 --reload

  5. Verify the server is running by visiting http://127.0.0.1:8000

Additional notes

Tips and considerations:

  • Ensure API_KEY and TAVILY_API_KEY are kept secure and not committed to version control.
  • The server runs on port 8000 by default; adjust your deployment configuration if needed.
  • If you modify code, the --reload flag helps reflect changes automatically during development.
  • The endpoints exposed are:
    • POST /tavily-search with TavilySearchRequest payload to perform searches via Tavily API.
    • POST /tavily-extract with TavilyExtractRequest payload to extract content from URLs via Tavily API.
  • When using MCP, ensure your client supplies the required authentication headers or parameters as expected by the server implementation.
  • If you run behind a reverse proxy, configure TLS/HTTPS and appropriate headers for API key security.

Related MCP Servers

Sponsor this space

Reach thousands of developers