Here’s how to quickly test the Tavily MCP server and tools in a Room on the Meshagent cloud platform. When the Room closes, the MCP server and chatbot are automatically shut down as well.

Prerequisites

Environment Variables Required:
  • TAVILY_API_KEY: your-tavily-apikey-here

Steps

  1. Install Meshagent CLI and dependencies:
    pip install "meshagent[all]"
    
  2. Sign up and authenticate at Meshagent:
    meshagent login
    
    See details: Meshagent CLI Getting Started
  3. Start the Tavily MCP Server tool as an agent in a Room:
    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-test
    
    • This starts a Meshagent Room with the Tavily MCP server as a callable service. Rooms auto-close after inactivity.
  4. Join the Room with a chatbot that uses the Tavily toolkit:
    meshagent chatbot join --room=test --agent-name=mcp-tavily --name=mcp-tavily --toolkit=mcp-tavily
    
    • This launches a chatbot in the Room that can use Tavily tools.
    • A Room link is printed in the output.
  5. Try It Out:
    • Visit the Room link in your browser.
    • Send a message to the chatbot (mcp-tavily) to interact with the Tavily MCP server tools.

Project Level Deployment

For production use, deploy persistent MCP and chatbot services at the Meshagent project level. This ensures the Tavily tools and chatbot are automatically present in all new Rooms in your Meshagent project—no need for local hosting or manual joins.

Deploy Persistent MCP and Chatbot Services

  1. Create the Tavily MCP Server as a persistent agent service:
    meshagent service create --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
    
  2. Create a persistent chatbot service using the Tavily toolkit:
    meshagent service create --image="meshagent/cli:latest" \
      --port="num=9001 path=/agent liveness=/ type=meshagent.callable participant_name=mcp-tavily-chatbot" \
      --env="MESHAGENT_PORT=9001" \
      --name="mcp-tavily-chatbot-service" \
      --command="meshagent chatbot service --agent-name=mcp-tavily-chatbot --toolkit=mcp-tavily"
    
When new Rooms are created in your Meshagent project, both the Tavily MCP server and chatbot will automatically spin up and join, offering instant access to the full suite of Tavily web tools.

Tools Available

The Tavily MCP server provides seamless interaction with four powerful web tools:
Tool NameShort Description
tavily-crawlA powerful web crawler that initiates a structured web crawl starting from a specified base URL.
tavily-extractRetrieves and processes raw content from URLs, perfect for data collection, content analysis, and research tasks.
tavily-mapCreates a structured map of website URLs for analyzing site structure, organization, and navigation paths.
tavily-searchOffers comprehensive, real-time web search results using Tavily’s AI search engine, with rich filtering and content options.

Tool Details

tavily-crawl

Initiate a structured crawl from a base URL, following internal links, supporting depth/breadth control, and filtering by categories or regex.
ParameterTypeDescription
urlstringThe root URL to begin the crawl
allow_externalboolean (opt)Whether to follow links to external domains
categoriesarray (opt)Filter URLs by categories such as documentation, blog, api, etc.
extract_depthstring (opt)If ‘advanced’, retrieves more detailed data, including tables and embedded content (higher latency possible)
formatstring (opt)Extracted content format: ‘markdown’ or ‘text’
instructionsstring (opt)Natural language instructions for the crawl
limitinteger (opt)Max number of links to process
max_breadthinteger (opt)Max number of links per level (per page)
max_depthinteger (opt)Max crawl depth from base URL
select_domainsarray (opt)Regex patterns to restrict crawl to specified domains/subdomains
select_pathsarray (opt)Regex patterns to restrict to specific URL paths

tavily-extract

Extracts and processes raw web content from one or more URLs—including support for advanced extraction and content formatting.
ParameterTypeDescription
urlsarrayList of URLs to extract content from
extract_depthstring (opt)Depth of extraction: ‘basic’ or ‘advanced’
formatstring (opt)Format of content: ‘markdown’ or ‘text’
include_imagesboolean (opt)Include a list of images from the URLs in the response

tavily-map

Maps a website’s structure by crawling URLs, helping visualize site organization for audits, navigation checks, or discovery.
ParameterTypeDescription
urlstringThe root URL to begin mapping
allow_externalboolean (opt)Whether to allow links to external domains
categoriesarray (opt)Filter using URL categories
instructionsstring (opt)Instructions for the crawler
limitinteger (opt)Max number of links to process
max_breadthinteger (opt)Max number of links per level
max_depthinteger (opt)Max crawl depth
select_domainsarray (opt)Regex to restrict by domain
select_pathsarray (opt)Regex to restrict by path

Real-time, AI-powered web search, returning detailed and filtered web results.
ParameterTypeDescription
querystringThe search query
countrystring (opt)Prioritize results from a specific country (for ‘general’ topic)
daysnumber (opt)Limit search results to the previous N days (‘news’ topic only)
exclude_domainsarray (opt)Domains to exclude
include_domainsarray (opt)Domains to include
include_image_descriptionsboolean (opt)Include images and descriptions in results
include_imagesboolean (opt)Include related images
include_raw_contentboolean (opt)Include cleaned HTML content
max_resultsnumber (opt)Maximum number of results
search_depthstring (opt)‘basic’ or ‘advanced’ search
time_rangestring (opt)Specify time range for results (‘general’ and ‘news’ topics)
topicstring (opt)Search category (determines which agent is used)