RS 

rmmargt/searchapi-mcp 是从 https://github.com/rmmargt/searchapi-mcp. 导入的 MCP 服务器候选
概览
rmmargt/searchapi-mcp 是从 https://github.com/rmmargt/searchapi-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
一个就生产环境的模型上下文协议(MCP)服务器,通过 SearchAPI.io 提供全面的搜索功能。启用AI助手搜索Google、地图、航班、酒店等,内置缓存、重试逻辑和断路器。
一个基于 Model Context Protocol (MCP) 的生产级搜索服务器,通过 SearchAPI.io 提供全面的搜索功能。使 AI 助手能够搜索 Google、地图、航班、酒店等,内置缓存、重试逻辑和熔断器。
功能 • 快速启动 • 安装 • 配置 • 可用工具
特色
🔍 搜索引擎
- Google 搜索 - 网页结果、知识图谱、答案框、相关问题
- Google Videos - 按时长、来源和上传时间筛选的视频搜索
- Google AI 模式 - 带有引用来源和结构化内容的 AI 生成概览
- 谷歌地图 - 地点、商家、评论和位置详情
- 谷歌地图地点 - 具体地点的详细信息(开放时间、照片、设施)
- Google 活动 - 查找音乐会、会议、节日及本地活动
- Google 航班 - 带全面筛选和价格日历的航班搜索
- 谷歌航班位置搜索 - 机场代码查询和自动补全
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
SearchAPI MCP Server
Features
🔍 Search Engines
- Google Search - Web results, knowledge graph, answer boxes, related questions
- Google Videos - Video search with filtering by duration, source, and upload time
- Google AI Mode - AI-generated overviews with cited sources and structured content
- Google Maps - Places, businesses, reviews, and location details
- Google Maps Place - Detailed information for specific locations (hours, photos, amenities)
- Google Events - Find concerts, conferences, festivals, and local activities
- Google Flights - Flight search with comprehensive filtering and price calendars
- Google Flights Location Search - Airport code lookup and autocomplete
- Google Travel Explore - Discover destinations and travel inspiration
- Google Hotels - Accommodation search with amenities, ratings, and price filters
🏗️ Production-Ready Architecture
- Connection Pooling - Efficient HTTP connection management with httpx
- Response Caching - Configurable TTL-based caching with LRU eviction
- Retry Logic - Exponential backoff for transient failures
- Circuit Breaker - Fail-safe pattern preventing cascading failures
- Metrics Collection - Request counts, latencies, cache hit rates, error tracking
- Health Checks - Monitor API connectivity and service status
⚙️ Configuration & Monitoring
- Pydantic Validation - Type-safe configuration with environment variable support
- Structured Logging - Configurable log levels with detailed request tracing
- Resource Management - Automatic cleanup and graceful shutdown
- Environment Variables - Flexible configuration for different deployments
Quick Start
Prerequisites
- Python 3.10 or higher
- SearchAPI.io API key (Get one here)
Installation with UV (Recommended)
The fastest way to get started is using uvx:
# Set your API key
export SEARCHAPI_API_KEY="your_api_key_here"
# Run directly with uvx (no installation needed)
安装
uvx --directory /absolute/path/to/searchAPI-mcp python mcp_server_refactored.py配置
{
"mcpServers": {
"searchapi": {
"command": "uvx",
"args": [
"--directory",
"/absolute/path/to/searchAPI-mcp",
"python",
"mcp_server_refactored.py"
],
"env": {
"SEARCHAPI_API_KEY": "your_api_key_here"
}
}
}
}