mcp foursquare
用于Foursquare地点搜索和发现的MCP服务器。让你的AI助手找到场地, 搜索某个位置附近的位置,查找位置详细信息,并获取位置上下文——全部 通过Foursquare Places API v3。
状态: 准备就绪
______________________________________________________________________
先决条件
- 包子 运行时间(
curl -fsSL https://bun.sh/install | bash) - A. Foursquare开发者 帐户和API密钥
______________________________________________________________________
安装
git clone git@github.com:McCullonas/mcp-foursquare.git
cd mcp-foursquare
bun install______________________________________________________________________
配置
服务器需要一个环境变量:
| 变量 | 必填 | 描述 |
|---|---|---|
FOURSQUARE_SERVICE_TOKEN | 是 | 来自开发人员面板的Foursquare v3 API令牌 |
获取API密钥: location.foursquare.com/developer. 免费套餐包括每天1000次通话。
______________________________________________________________________
可用工具
search_near
搜索指定位置(城市、社区、地标)附近的地方。
参数:
query--搜索什么(例如。"coffee","museum")near--指定位置(例如。"Edinburgh, UK","Soho, London")categories*(可选)* --要筛选的Foursquare类别IDlimit*(可选)* --最大结果(默认值10)
search_near_point
搜索特定纬度/经度坐标附近的地点。
参数:
query--搜索什么ll--坐标为"lat,lng"(例如。"51.5074,-0.1278")radius*(可选)* --搜索半径(单位:米)limit*(可选)* --最大结果
place_snap
在给定位置获取最有可能的位置——这对地理标记很有用。
参数:
ll--坐标为"lat,lng"accuracy*(可选)* --GPS精度(单位:米)
place_details
通过Foursquare ID获取特定地点的详细信息。
返回:描述、电话、网站、时间、评级、价格水平、菜单链接、照片、提示。
参数:
fsq_id--Foursquare地点ID(来自搜索结果)
get_location
根据用户的IP地址(通过IP-api.com)获取大致位置。有用作为 当没有提供明确位置时的起点。
无需参数。
______________________________________________________________________
MCP客户端配置
添加到您的 settings.json (或 claude_desktop_config.json):
{
"mcpServers": {
"foursquare": {
"command": "bun",
"args": ["run", "/path/to/mcp-foursquare/src/index.ts"],
"env": {
"FOURSQUARE_SERVICE_TOKEN": "your-token-here"
}
}
}
}替换 /path/to/mcp-foursquare 带有克隆的绝对路径。
______________________________________________________________________
发展
# Run directly
bun run src/index.ts
# Build (outputs to dist/)
bun build src/index.ts --outdir dist --target node______________________________________________________________________
许可证
麻省理工学院
