Follow these instructions to quickly run the Tavily MCP server and enable its tools inside a Meshagent Room:

Required Environment Variables

  • TAVILY_API_KEY: Your Tavily API key.

Steps

  1. Install the Meshagent CLI and Agents

    pip install "meshagent[all]"
    
  2. Sign up and authenticate

  3. Launch the Tavily MCP Agent as a Service

    meshagent service test --room=test --role=agent --image=meshagent/mcp-tavily:latest --env MESHAGENT_PORT=8001 --env TAVILY_API_KEY=your-tavily-apikey-here --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" --name=mcp-tavily-service
    
    • This command creates a Meshagent room called test with the Tavily MCP server available as a callable service in the room.
    • Note: Meshagent rooms will close automatically if they go inactive.
  4. Join the Room with a Chatbot and Tools

    meshagent chatbot join --room=test --agent-name=sample --name=sample --toolkit=mcp-tavily
    
    • This will start a chatbot in the Meshagent room, able to use the Tavily toolkit.
      • Multiple toolkits can operate in the same room by repeating this command with different configurations.
      • After launching, you’ll receive a link in the command output to access the room, chat, and use the tools interactively.

Tools Available

Tools Provided by This Server

Tool NameShort Description
tavily-crawlA web crawler that initiates a structured crawl from a specified base URL.
tavily-extractRetrieves and processes raw content from URLs for data collection and content analysis.
tavily-mapCreates a structured map of site URLs to discover content organization and navigation paths.
tavily-searchReal-time web search with Tavily’s AI search engine for comprehensive, current results.

Tool Details

tavily-crawl

Initiates a structured crawl from a base URL, expanding tree-like across internal links. Supports filters, crawl depth, and custom instructions.

ParameterTypeDescription
urlstringRoot URL to begin crawl
allow_externalbooleanOptional. Follow links to external domains
categoriesarrayOptional. Filter by categories (documentation, blog, api, etc.)
extract_depthstringOptional. Advanced extraction expands data (increases latency)
instructionsstringOptional. Natural language instructions for the crawler
limitintegerOptional. Max links to process
max_breadthintegerOptional. Max links to follow per level
max_depthintegerOptional. Max tree depth
select_domainsarrayOptional. Regex patterns for included domains
select_pathsarrayOptional. Regex patterns for included paths

tavily-extract

Extracts and processes content from given URLs, including deep extraction modes and images.

ParameterTypeDescription
urlsarrayList of URLs to extract content from
extract_depthstringOptional. ‘basic’ or ‘advanced’ extraction
include_imagesbooleanOptional. Return images extracted from the URLs

tavily-map

Builds a map of site URLs, showing structure and navigation.

ParameterTypeDescription
urlstringRoot URL for mapping
allow_externalbooleanOptional. Follow external links
categoriesarrayOptional. Filter URLs by categories
instructionsstringOptional. Natural language crawler instructions
limitintegerOptional. Max links to process
max_breadthintegerOptional. Max links per level
max_depthintegerOptional. Depth limit
select_domainsarrayOptional. Regex for domain inclusion
select_pathsarrayOptional. Regex for path inclusion

Performs real-time web search using Tavily’s AI engine.

ParameterTypeDescription
querystringSearch query
daysnumberOptional. Number of days back (for ‘news’ topic searches)
exclude_domainsarrayOptional. Domains to exclude
include_domainsarrayOptional. Domains to include
include_image_descriptionsbooleanOptional. Include images + their descriptions
include_imagesbooleanOptional. Include related images
include_raw_contentbooleanOptional. Include cleaned HTML content
max_resultsnumberOptional. Maximum number of results
search_depthstringOptional. ‘basic’ or ‘advanced’ depth
time_rangestringOptional. Time window for search
topicstringOptional. Category/topic of search

Meshagent & Tavily Resources