Tavily-Anet-MCP Server

Tavily-Anet-MCP Server

By marekkucak GitHub

A Rust implementation of the Model Control Protocol (MCP) server that integrates Tavily's powerful search and web content extraction capabilities. This server enables AI agents and LLM systems to perform real-time web searches and extract content from URLs via a standardized JSON-RPC interface, making it ideal for building AI tools.

tavily mcp
Overview

What is Tavily-Anet-MCP?

Tavily-Anet-MCP is a Rust implementation of the Model Control Protocol (MCP) server that integrates Tavily's powerful search and web content extraction capabilities, enabling AI agents and LLM systems to perform real-time web searches and extract content from URLs via a standardized JSON-RPC interface.

How to use Tavily-Anet-MCP?

To use Tavily-Anet-MCP, clone the repository, set up your environment with the required API key and NATS server, and run the server using Cargo. You can then test the server with the included test client.

Key features of Tavily-Anet-MCP?

  • Integration with Tavily Search for comprehensive web search results.
  • Content extraction from URLs using Tavily Extract.
  • NATS transport layer for efficient message passing.
  • JSON-RPC 2.0 compatible API for standardized communication.
  • Asynchronous request handling for improved performance.
  • Advanced search capabilities including domain filtering and time ranges.

Use cases of Tavily-Anet-MCP?

  1. Building AI agent systems that require real-time web information.
  2. Developing LLM-based tools for enhanced content retrieval.
  3. Automating research tasks that involve web content extraction.

FAQ from Tavily-Anet-MCP?

  • What are the requirements to run Tavily-Anet-MCP?
    You need Rust 1.70+, a running NATS server, and a Tavily API key.

  • Is Tavily-Anet-MCP free to use?
    Yes, Tavily-Anet-MCP is open-source and free to use.

  • How can I extend the functionality of Tavily-Anet-MCP?
    You can add new features by defining response structures, implementing tools, and registering them in the server.

Content

Tavily-Anet-MCP Server

A Rust implementation of the Model Control Protocol (MCP) server that provides Tavily search and content extraction capabilities via a standardized protocol.

This server integrates the powerful Tavily API with the Anet MCP framework, enabling AI agents to perform web searches and extract content from URLs. It is designed for developers building AI agent systems, LLM-based tools, or research automation that requires up-to-date web information.


Features

  • ✅ Tavily Search integration with comprehensive parameters
  • 📄 Tavily Extract for content retrieval from URLs
  • 🔄 NATS transport layer for message passing
  • 🛠️ JSON-RPC 2.0 compatible API
  • ⚡ Asynchronous request handling with Tokio
  • 🔍 Advanced search capabilities including domain filtering, time ranges, and topic selection

Requirements

  • Rust 1.70+
  • NATS server running locally or accessible via network
  • Tavily API Key (get one from Tavily's website)

Installation

Clone the repository and build the server:

git clone https://github.com/yourusername/tavily-anet-mcp.git
cd tavily-anet-mcp

Add your Tavily API key to a .env file:

TAVILY_API_KEY=your_api_key_here
NATS_URL=nats://localhost:4222
MCP_SUBJECT=mcp.requests

Getting Started

Running the Server

# Start a NATS server in another terminal or ensure one is already running
# Example:
nats-server

# Run the Tavily MCP server
cargo run

Testing the Server

You can test the server using the included test client:

cargo run --example test_client

This will send various requests to the server (initialize, listTools, search, extract) and print the responses.


Available Tools

A powerful web search tool that provides comprehensive, real-time results using Tavily's AI search engine.

Parameters:

  • query (required): Search query string
  • search_depth: "basic" or "advanced" (default: "basic")
  • topic: "general" or "news" (default: "general")
  • days: Number of days back for results (for news topic)
  • time_range: "day", "week", "month", "year"
  • max_results: 5-20 (default: 10)
  • include_images: Boolean
  • include_raw_content: Boolean
  • include_domains: Array of domains to include
  • exclude_domains: Array of domains to exclude

Example:

{
  "name": "tavily-search",
  "arguments": {
    "query": "Latest developments in AI",
    "max_results": 5,
    "topic": "news",
    "days": 7
  }
}

2. Tavily Extract

A tool for extracting raw content from web pages.

Parameters:

  • urls (required): Array of URLs to extract content from
  • extract_depth: "basic" or "advanced" (default: "basic")
  • include_images: Boolean (default: false)

Example:

{
  "name": "tavily-extract",
  "arguments": {
    "urls": ["https://www.rust-lang.org/"],
    "extract_depth": "advanced",
    "include_images": true
  }
}

Architecture

The server follows a modular design:

  • tools – Tavily Search and Extract implementations
  • models – Tavily API response structures
  • utils – Formatting and helper functions
  • transport – NATS message transport layer

Development

Adding New Features

To extend the server with additional Tavily capabilities:

  1. Define response structures in src/models/tavily.rs
  2. Implement the tool in src/tools/ following the Tool trait
  3. Add formatting functions in src/utils/formatter.rs
  4. Register the tool in src/main.rs

Troubleshooting

  • Ensure your Tavily API key is valid and correctly set in the environment variables
  • Check that the NATS server is running and accessible
  • Verify the request format matches the expected input schema for each tool

License

MIT License


Acknowledgements

This project is built on top of the Anet MCP Server framework and integrates with the Tavily API.

No tools information available.
School MCP
School MCP by 54yyyu

A Model Context Protocol (MCP) server for academic tools, integrating with Canvas and Gradescope platforms.

canvas mcp
View Details
repo-template
repo-template by loonghao

A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions.

-

google-calendar mcp
View Details
strava-mcp
strava-mcp by jeremysilva1098

MCP server for strava

strava mcp
View Details

Model Context Protocol (MCP) server implementation for Rhinoceros/Grasshopper integration, enabling AI models to interact with parametric design tools

grasshopper mcp
View Details

MCP configuration to connect AI agent to a Linux machine.

security mcp
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details