BG桌游信息服务器
一个与BoardGameGeek XML API集成的MCP服务器,允许克劳德搜索桌游、获取游戏详情和访问用户收藏。
服务介绍
BoardGameGeek MCP 服务器
这是一个 Model Context Protocol (MCP) 服务器,它与 BoardGameGeek XML API 集成,允许 Claude 搜索棋盘游戏、检索游戏详情、获取用户收藏等。
功能
该服务器提供以下工具:
- search-games: 按名称搜索棋盘游戏
- get-game-details: 获取特定棋盘游戏的详细信息
- get-hot-games: 获取当前在 BoardGameGeek 上最热门的棋盘游戏
- get-user-collection: 获取用户的棋盘游戏收藏,并提供过滤选项
- sync-user-collection: 从 BoardGameGeek 同步用户的收藏
- get-user-plays: 获取用户的最近玩过的棋盘游戏
- sync-user-plays: 从 BoardGameGeek 同步用户的游玩记录
- get-similar-games: 获取与指定游戏相似的游戏
功能清单
- 搜索
- 获取游戏详情
- 热门游戏
- 获取用户游玩记录
- 同步用户游玩记录
- 获取用户收藏
- 同步用户收藏
- 获取相似游戏
前提条件
- Node.js 22.5.0 或更高版本(需要实验性的 SQLite 支持)
- npm(用于依赖管理)
构建和运行
构建服务器:
# Install dependencies
npm install
# Build the TypeScript code
npm run build
直接运行服务器:
# The --experimental-sqlite flag is required
node --experimental-sqlite build/index.js
使用 Docker 运行:
# Build the Docker image
docker build -t bgg-mcp-server .
# Run the container
docker run --rm -i bgg-mcp-server
测试
验证服务器是否正常工作:
# Make sure the server is built first
npm run build
# Run the test script with the experimental SQLite flag
node --experimental-sqlite test-mcp.js
测试脚本将:
- 启动 MCP 服务器
- 测试 search-games 功能
- 测试 get-hot-games 功能
- 显示结果和任何错误
与 Claude for Desktop 一起使用
-
打开你的 Claude for Desktop 配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
添加直接执行 Node.js 的服务器配置:
{
"mcpServers": {
"boardgamegeek": {
"command": "node",
"args": ["--experimental-sqlite", "/path/to/bgg-mcp-server/build/index.js"]
}
}
}
- 或者使用 Docker(推荐):
{
"mcpServers": {
"boardgamegeek": {
"command": "bash",
"args": ["-c", "cd /path/to/bgg-mcp-server && docker build -t bgg-mcp-server . && docker run --rm -i -v \"$(pwd)/data:/app/data\" bgg-mcp-server"]
}
}
}
注意:-v "$(pwd)/data:/app/data" 选项将本地 data 目录挂载到 Docker 容器中的 /app/data 目录,确保 SQLite 数据库在容器外持久化。
- 重启 Claude for Desktop
示例问题
连接到 Claude 后,你可以提出如下问题:
- "BoardGameGeek 上的新热门游戏是什么"
- "在 BoardGameGeek 上查找 Molly House 游戏"
数据存储
服务器使用 SQLite 进行数据持久化。所有检索到的游戏数据、用户收藏和游玩历史都存储在 data/bgg.sqlite 数据库文件中。这可以:
- 减少对 BoardGameGeek 的 API 调用
- 提高重复查询的响应时间
- 在服务器重启之间保持数据
如果数据库不存在,会自动创建,并且随着你使用服务器而填充数据。