MCP Tavily
MCP塔维利
Tavily API 的模型上下文协议 (MCP) 服务器实现,提供高级搜索和内容提取功能。
特征
多种搜索工具:
search:具有可自定义选项的基本搜索功能searchContext:上下文感知搜索,提高相关性searchQNA:以问题和答案为重点的搜索
内容提取:使用可配置选项从 URL 中提取内容
丰富的配置选项:搜索深度、过滤和内容包含的广泛选项
与 MCP 一起使用
将 Tavily MCP 服务器添加到您的 MCP 配置中:
{
"mcpServers": {
"tavily": {
"command": "npx",
"args": ["-y", "@mcptools/mcp-tavily"],
"env": {
"TAVILY_API_KEY": "your-api-key"
}
}
}
}注意:请确保将
your-api-key替换为你的实际 Tavily API 密钥。你也可以在运行服务器之前将其设置为环境变量TAVILY_API_KEY。
Related MCP server: Deep Research MCP Server
API 参考
搜索工具
服务器提供了三种可以通过MCP调用的搜索工具:
1. 基本搜索
// Tool name: search
{
query: "artificial intelligence",
options: {
searchDepth: "advanced",
topic: "news",
maxResults: 10
}
}2. 上下文搜索
// Tool name: searchContext
{
query: "latest developments in AI",
options: {
topic: "news",
timeRange: "week"
}
}3. 问答搜索
// Tool name: searchQNA
{
query: "What is quantum computing?",
options: {
includeAnswer: true,
maxResults: 5
}
}提取工具
// Tool name: extract
{
urls: ["https://example.com/article1", "https://example.com/article2"],
options: {
extractDepth: "advanced",
includeImages: true
}
}搜索选项
所有搜索工具都具有以下选项:
interface SearchOptions {
searchDepth?: "basic" | "advanced"; // Search depth level
topic?: "general" | "news" | "finance"; // Search topic category
days?: number; // Number of days to search
maxResults?: number; // Maximum number of results
includeImages?: boolean; // Include images in results
includeImageDescriptions?: boolean; // Include image descriptions
includeAnswer?: boolean; // Include answer in results
includeRawContent?: boolean; // Include raw content
includeDomains?: string[]; // List of domains to include
excludeDomains?: string[]; // List of domains to exclude
maxTokens?: number; // Maximum number of tokens
timeRange?: "year" | "month" | "week" | "day" | "y" | "m" | "w" | "d"; // Time range for search
}提取选项
interface ExtractOptions {
extractDepth?: "basic" | "advanced"; // Extraction depth level
includeImages?: boolean; // Include images in results
}响应格式
所有工具都以以下格式返回响应:
{
content: Array<{
type: "text",
text: string
}>
}对于搜索结果,每项包括:
标题
内容
网址
对于提取的内容,每项包括:
网址
原始内容
失败的 URL 列表(如果有)
错误处理
所有工具都包含适当的错误处理,如果出现问题,将会抛出描述性错误消息。
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 Tavily API 服务器:
npx -y @smithery/cli install @kshern/mcp-tavily --client claude手动安装
npm install @mcptools/mcp-tavily或者直接通过 npx 使用:
npx @mcptools/mcp-tavily先决条件
Node.js 16 或更高版本
npm 或 yarn
Tavily API 密钥(从Tavily获取)
设置
克隆存储库
安装依赖项:
npm install设置您的 Tavily API 密钥:
export TAVILY_API_KEY=your_api_key建筑
npm run build使用 MCP Inspector 进行调试
对于开发和调试,我们建议使用MCP Inspector ,它是 MCP 服务器的强大开发工具。
检查器提供了以下用户界面:
测试工具调用
查看服务器响应
调试工具执行
监控服务器状态
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
分叉存储库
创建你的功能分支(
git checkout -b feature/AmazingFeature)提交您的更改(
git commit -m 'Add some AmazingFeature')推送到分支(
git push origin feature/AmazingFeature)打开拉取请求
执照
该项目已获得 MIT 许可。
支持
如有任何疑问或问题:
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseAqualityAmaintenanceA Model Context Protocol server that enables web search, scraping, crawling, and content extraction through multiple engines including SearXNG, Firecrawl, and Tavily.4223138MIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that performs comprehensive web research by combining Tavily Search and Crawl APIs to gather extensive information and provide structured JSON output tailored for LLMs to create detailed markdown documents.10127Apache 2.0
- -licenseBqualityNot gradedmaintenanceA Model Context Protocol compliant server that facilitates comprehensive web research by utilizing Tavily's Search and Crawl APIs to gather and structure data for high-quality markdown document creation.110112
- FlicenseCqualityDmaintenanceA Model Context Protocol server that enables web search capabilities using the Tavily API, allowing AI models to retrieve current information from the internet through natural language commands.3
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kshern/mcp-tavily'
If you have feedback or need assistance with the MCP directory API, please join our Discord server