Skip to main content
Glama
TheBananaStand

leo-tavily-mcp

leo-tavily-mcp

通过 MCP 将 Tavily 网络搜索作为 Leo 提供程序包。

Leo 的 web_search 工具本身不执行任何搜索——它会解析一个 WebSearchProvider 并向其发起请求。本服务器就是这样一个提供程序,可作为 hub 在运行时安装的包来访问,而无需为它重新构建。

它能回答什么

leo_mcp::providers 中的 web_search 角色:

search({ query, max_results }) -> { results: [{ title, url, snippet, score? }] }

结果以 JSON 形式放在文本内容块中返回,这正是 hub 的桥接层所读取的约定格式。

Related MCP server: Tavily MCP Server

配置

一个设置项,由包描述符声明,并由 Leo 以环境变量的形式原样在其设置键名下传递给本进程:

环境变量

来源

tavily_api_key

Settings → Packages → Web Search

Leo 只会传递包在 entitlements.settings_read 中声明且所有者已同意的键——绝不会传递整个设置表。名称是小写的,因为它就是设置键本身;任何一侧重命名都意味着凭据将静默地永远无法送达。

未配置密钥时,工具会返回 isError,并附带一条指明该设置项名称的消息。这是有意为之:空结果集会以"网络上没有相关内容"的形式到达 Leo。

运行它

npm install
node index.js          # speaks MCP over stdio
npm test               # checks the response mapping, no network needed

为什么用纯 JavaScript

本包以 git tarball 形式发布,并固定到某个提交 SHA,而不是 npm 包;npm 无法可靠地为 tarball URL 执行构建步骤。TypeScript 源码树安装后会在别人的机器上启动失败,而那正是最难诊断的远端。

注册表条目

{
  "name": "tavily",
  "label": "Web Search",
  "mcp": {
    "transport": "stdio",
    "command": "npx",
    "args": ["-y", "https://github.com/TheBananaStand/leo-tavily-mcp/archive/<40-char-sha>.tar.gz"]
  },
  "descriptor": {
    "provides": ["web_search"],
    "fields": [
      { "key": "tavily_api_key", "label": "API Key", "field_type": "password", "required": true }
    ],
    "entitlements": {
      "settings_read": ["tavily_api_key"],
      "network": ["api.tavily.com"],
      "sends": [
        { "to": "api.tavily.com", "classes": ["search_queries"],
          "because": "The search text and nothing else." }
      ]
    }
  }
}

URL 必须指定一个完整的 40 字符提交 SHA。标签看起来同样具体,但并非如此——refs/tags/v1.0.0 是一个指针,其所有者可以在条目通过审查后移动它,因此 hub 会以未固定为由拒绝它。

许可证

MIT

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    Integrates Tavily's search API with LLMs to provide advanced web search capabilities, including intelligent result summaries, domain filtering for quality control, and configurable search parameters.
    32 npm
    6
    MIT
  • A
    license
    Not graded
    quality
    F
    maintenance
    Provides AI-powered web search capabilities using Tavily's search API, enabling LLMs to perform sophisticated web searches, get direct answers to questions, and search recent news articles.
    72
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to perform real-time web searches, extract data from web pages, map website structures, and crawl websites using the Tavily API.
    61 npm
    MIT