The Tavily MCP Load Balancer is a high-availability gateway that provides intelligent load balancing across multiple Tavily API keys with web-based management and multi-protocol access.
Core Capabilities:
Advanced Web Search (
tavily-search/search): Real-time web searches with customizable depth (basic/advanced), topic filtering (general/news), time-range constraints, country boosting, and domain inclusion/exclusionContent Extraction (
tavily-extract): Extract and parse web content from URLs in markdown or plain text format with configurable extraction depthWeb Crawling (
tavily-crawl): Systematically crawl websites with configurable depth, breadth, category filtering, path selection via regex, and natural language instructionsSite Mapping (
tavily-map): Generate structured maps of website architectures to analyze site organization and navigation pathsIntelligent Load Balancing: Distributes requests across multiple API keys using round-robin and weighted scheduling with automatic key rotation and failover
Smart Error Handling: Automatically detects and handles rate limits, quota exhaustion, and authentication errors
Web Management Dashboard: Manage API keys with encrypted storage, monitor real-time usage statistics via WebSocket, review request logs (30-day retention), and configure settings
Multi-Protocol Support: Access via MCP stdio, SSE (Server-Sent Events), or streamableHTTP (JSON-RPC) interfaces
Data Persistence: SQLite database with encrypted storage for API keys, quotas, and logs with automatic monthly quota refresh at UTC boundaries
Flexible Deployment: Docker support for linux/amd64 and linux/arm64 architectures with configurable concurrency limits, timeouts, and operational parameters
Supports environment variable configuration for API keys and server settings through .env files
Built on Node.js runtime to provide high-performance MCP server capabilities
Uses npm for package management and script execution
Developed using TypeScript for type-safety and modern JavaScript features
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 MCP Load Balancersearch for latest AI developments in 2024"
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 MCP Load Balancer
一个支持多 API 密钥负载均衡的 Tavily MCP 服务器,提供 SSE 和 streamableHTTP 接口,自动轮询多个 API 密钥以实现高可用性。
v3.0.0 (2025-01-06)
官方 MCP 对齐:完整适配 tavily-mcp v0.2.12 工具参数与行为
智能错误处理:精细区分配额耗尽、速率限制与网络问题
持久化存储:SQLite 存储 API Key、配额与请求日志
Web 管理后台:可视化管理 Key、统计、日志与设置
自动配额刷新:UTC 自然月自动更新配额状态
v2.2.0 (2025-08-15)
多架构镜像:linux/amd64 与 linux/arm64
v2.1.0 (2025-08-14)
streamableHTTP 支持:HTTP POST /mcp 端点
多协议兼容:SSE + streamableHTTP
v2.0.0 (2025-08-12)
架构重构:原生 SSE 实现
工具更新:新增 tavily-crawl 和 tavily-map
安全改进:响应数据清理和字符编码处理
v1.0.0 (2025-08-05)
初始版本:多 API 密钥负载均衡
功能特性
智能负载均衡 — 轮询 + 权重调度,多 Key 高可用
错误分级处理 — 速率限制 / 配额耗尽 / 鉴权错误精确识别
多协议支持 — MCP stdio / SSE / streamableHTTP 全覆盖
数据持久化 — SQLite 存储 Key、配额与日志
Web 管理后台 — Dashboard、Key 管理、统计、日志、设置
实时更新 — WebSocket 推送统计刷新
数据安全 — Key 加密存储 + 脱敏展示
Related MCP server: tavily-search-mcp-server
快速开始
Docker 部署(推荐)
镜像支持 amd64 / arm64,Docker 会自动匹配本机架构。
本地开发
服务启动后访问:
端点 | 地址 |
管理后台 |
|
SSE 接口 |
|
streamableHTTP |
|
API |
|
WebSocket |
|
首次启动后在管理后台添加 API Key。环境变量
TAVILY_API_KEYS仅用于初始导入。
Docker Compose
自定义构建
开发模式
可用工具
工具名称 | 功能描述 | 主要参数 |
| 网络搜索 | query, max_results, search_depth |
| 网页内容提取 | urls, extract_depth, format |
| 网站爬虫 | url, max_depth, limit |
| 网站地图生成 | url, max_depth, max_breadth |
接口说明
接口 | 地址 |
SSE |
|
消息 |
|
streamableHTTP |
|
健康检查 |
|
streamableHTTP 示例
工具参数
search / tavily-search
tavily-extract
tavily-crawl
tavily-map
配置
环境变量
变量名 | 描述 | 默认值 |
| 服务端口 | 60002 |
| 绑定地址 | 0.0.0.0 |
| 数据库路径 | ./data/tavily.db |
| 加密密钥(必填) | - |
| 管理后台密码 | - |
| 启用 Web UI | true |
| 最大并发 | 4 |
| 请求超时(ms) | 30000 |
| Key 最大错误次数 | 5 |
| 日志保留天数 | 30 |
| 日志级别 | info |
| 初始 Key(逗号分隔) | - |
配置示例
故障排除
问题 | 解决方案 |
无可用 API 密钥 | 在管理后台检查 Key 状态和配额 |
连接超时 | 检查网络和防火墙设置 |
端口被占用 |
|
建议在 Web 管理后台查看请求统计、错误日志与 Key 状态。
许可证
MIT License
如果这个项目对你有帮助,欢迎 Star ⭐