NearestSearch MCP 服务器
用于通过基于 IP 的位置检测进行附近地点搜索的 MCP 服务器。
特征
基于 IP 的位置检测:使用 ipapi.co 确定您的当前位置
Google Places 集成:根据关键字和可选类型过滤器搜索附近的地点
简单界面:具有可定制半径的单一工具端点
Related MCP server: MCP Hub Tools
要求
Python 3.10+
已启用 Places API 的 Google Cloud Platform API 密钥
互联网连接
安装
克隆存储库:
git clone https://github.com/kukapay/nearby-search-mcp.git
cd nearby-search-mcp
安装依赖项:
# Using uv (recommended)
uv add "mcp[cli]" httpx python-dotenv
# Or using pip
pip install mcp httpx python-dotenv
客户端配置
{
"mcpServers": {
"nearby-search": {
"command": "uv",
"args": ["--directory", "path/to/nearby-search-mcp", "run", "main.py"],
"env": {
"GOOGLE_API_KEY": "your google api key"
}
}
}
}
用法
运行服务器
开发模式(使用 MCP Inspector):
mcp dev main.py
在 Claude Desktop 中安装:
mcp install main.py --name "NearbySearch"
直接执行:
python main.py
可用端点
工具:
搜索您当前位置附近的地点
参数:
keyword(str):要搜索的内容(例如,“咖啡店”)radius(int,可选):搜索半径(以米为单位)(默认值:1500)type(str,可选):地点类型(例如,“餐厅”,“咖啡馆”)
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。