tavily-pool-gateway
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tavily-pool-gatewaysearch the web for recent advances in battery technology"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tavily Pool Gateway
EN | 中文
Pool multiple Tavily API keys behind one endpoint. Automatic rotation, circuit breaking, and credit accounting — when one account's monthly quota runs out, the next key takes over seamlessly. Ships with a web console and a Tauri desktop app.

这是什么
一个可以把多个Tavily账号的api转换为一个地址的项目。Tavily Pool Gateway 把你手上的多个 Tavily 账号 key 池化成一个服务:
一个地址接入:HTTP(兼容 Tavily 官方 API,SDK 改个 base_url 就能用)或 MCP(AI 客户端直接连)
自动轮询:额度最多的 key 优先;某个账号用完自动切换下一个,跨月自动恢复
熔断保护:连续限流自动冷却、无效 key 自动禁用、403 风控自动恢复
精确记账:每次请求从响应读取真实消耗,每小时与官方
/usage校准Web 控制台 + 桌面应用:浏览器打开
/ui/或用 Tauri 壳,监控额度、测试搜索、添加 key
Related MCP server: tavily-proxy-mcp
核心特性
能力 | 说明 |
多 key 池化 | 逗号分隔或 |
端点兼容 |
|
MCP Server |
|
安全防护 | 自动剥离请求体中的 |
异步研究 | research 任务透传(201 创建 / 202 轮询 / 200 完成),网关维护任务与 key 的映射 |
轻量 | 单进程 Python,运行内存约 60–100MB,无数据库 |
快速开始
1. 启动网关
git clone https://github.com/YOUR_NAME/tavily-pool-gateway.git
cd tavily-pool-gateway
python -m venv .venv
.venv/bin/pip install -r requirements.txt # Windows: .venv\Scripts\pip install -r requirements.txt
# 配置 key(二选一)
echo "tvly-your-key-1" >> api.txt # 方式 A:api.txt 每行一个
# TAVILY_KEYS=tvly-key-1,tvly-key-2 # 方式 B:环境变量逗号分隔
.venv/bin/python -m uvicorn app:app --host 0.0.0.0 --port 8000打开 http://localhost:8000/ui/ 即是控制台。
没有 key?到 tavily.com 免费注册,每账号每月 1000 credits。
2. 接入
HTTP(SDK 兼容):
from tavily import TavilyClient
client = TavilyClient(api_key="any", base_url="http://localhost:8000/v1")
client.search("hello")MCP(AI 客户端):在支持 MCP 的客户端(Codex / Hermes / Cursor 等)添加:
http://localhost:8000/mcp/3. 桌面应用(可选)
cd desktop/src-tauri
npx @tauri-apps/cli build安装包输出在 target/release/bundle/。桌面壳启动时自动探测网关(默认 http://127.0.0.1:8000,可用环境变量 TAVILY_GATEWAY_URL 指定远程地址);未启动时显示连接指导页。
也可以直接从 Releases 下载安装包(GitHub Actions 在打 tag 时自动构建 Windows / macOS / Linux 三平台)。
部署到服务器(systemd)
# 服务器上
sudo cp deploy/tavily-juhe.service /etc/systemd/system/
# 按需修改单元内的 WorkingDirectory / ExecStart / --host(建议绑定内网网卡 IP,勿用 0.0.0.0 暴露公网)
sudo systemctl daemon-reload && sudo systemctl enable --now tavily-juheAPI 摘要
方法 | 路径 | 说明 |
POST |
| 与 Tavily 官方 API 同构,key 由网关注入 |
POST |
| 创建深度研究任务(异步) |
GET |
| 查询任务状态(202 进行中 / 200 完成) |
GET |
| key 池额度与状态(零 credits 消耗) |
POST |
| 热添加 key: |
GET |
| 存活检查 |
GET |
| Web 控制台 |
POST |
| MCP streamable-http 入口 |
架构
调用方(SDK / MCP 客户端 / Web 控制台)
│
▼
┌─────────────────────────────────────┐
│ Gateway (FastAPI, 单进程) │
│ ├─ gateway.py HTTP 路由 /v1 /admin│
│ ├─ mcp_server.py MCP 工具 (7 个) │
│ ├─ keypool.py key 池核心 │
│ │ ├─ 状态机 healthy/cooling/ │
│ │ │ exhausted/disabled │
│ │ ├─ 选 key:剩余额度优先 │
│ │ ├─ 记账:usage.credits + 校准 │
│ │ └─ 防护:剥离 body api_key │
│ └─ webui/ Web 控制台 │
└─────────────────────────────────────┘
│ 轮询转发(Authorization: Bearer)
▼
Tavily 官方 API(多账号)注意事项
鉴权:默认无鉴权,设计为跑在可信内网(如 Tailscale)。如需暴露,设置环境变量
GATEWAY_TOKEN,调用方带Authorization: Bearer <token>。合规:请聚合自己真实持有的账号。批量注册免费账号薅额度有封号风险。
api.txt含真实 key,已在.gitignore中,请勿提交或分享。本项目全为vibecoding,属于个人使用分享,可能体验等各个方面都有问题或bug,还望海涵。
License
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
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Related MCP Servers
- AlicenseBqualityDmaintenanceA local MCP server that exposes Tavily search as a tool and rotates across multiple API keys for reliability.1MIT
- AlicenseAqualityAmaintenanceA proxy MCP server that connects to Tavily's official Streamable HTTP MCP, managing multiple API keys and automatically switching to the next one when the current key's quota is exhausted.5121MIT
- FlicenseNot gradedqualityDmaintenanceA Cloudflare Worker that proxies requests to the Tavily API with automatic key rotation from a pool, providing search, extract, crawl, and map tools via MCP.22
- FlicenseNot gradedqualityBmaintenanceA Cloudflare Worker that proxies the Tavily API through MCP, offering search, extract, crawl, and map tools with automatic API key rotation and health-based routing.3
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/IamPa/tavily-pool-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server