如何将 Tavily Web Search 远程 MCP 连接到 Gemini CLI

约 1 分钟即可把 Tavily 的远程 MCP 服务端接入 Gemini CLI。如需排查 OAuth / 401 问题,可先用 OAuth 2.1 调试器体检端点。

🛡️ Official✓ VerifiedStreamable HTTPAPI Key🛡️ A+~164 tok5 tools
Streamable HTTPhttps://mcp.tavily.com/mcp/

🔒 Client-side only — never leaves your browser.

Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:

{
  "mcpServers": {
    "tavily": {
      "httpUrl": "https://mcp.tavily.com/mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

接入步骤

  1. 编辑设置文件 — 打开 ~/.gemini/settings.json。
  2. 添加服务端 — 在 mcpServers 中加入 "tavily": { "httpUrl": https://mcp.tavily.com/mcp/ }。
  3. 完成认证 — 在 Tavily 控制台获取凭据,并将其作为 Authorization: Bearer <密钥> 请求头加入配置。
  4. 验证 — 在 在线 Inspector 中粘贴 https://mcp.tavily.com/mcp/ 并运行 initialize + tools/list 验证连通性。

🧰 工具预览(5)

ToolSafetyDescriptionParameters
tavily-search
~29 tok
🟢 ReadSearch the web with Tavily.—
tavily-extract
~29 tok
🟢 ReadExtract content from URLs.—
tavily-crawl
~26 tok
🟠 WriteCrawl a website.—
tavily-map
~28 tok
🟢 ReadMap a website's structure.—
tavily-research
~32 tok
🟠 WriteRun a research task across sources.—

更多连接指南