University Ruins Magic
STREAMABLE HTTPMCP server for MTG card information query and search via SBWSZ API
MCP server for MTG card information query and search via SBWSZ API
English | 中文
一个基于 Model Context Protocol (MCP) 的服务端,用于与 大学院废墟 API 交互。提供了一系列工具来查询万智牌中文卡牌信息。
本服务端基于大学院废墟的公开 API。您可以在以下地址查看完整的 API 文档:

t:creature c:r(红色生物)或 pow>=5 or mv<2(力量大于等于5或法术力值小于2)。# 全局安装 npm install -g sbwsz-mcp-server # 或直接运行(推荐) npx sbwsz-mcp-server
# 克隆项目 git clone <repository-url> cd sbwsz-mcp # 安装依赖 npm install # 构建项目 npm run build # 运行 STDIO 模式 npm run start:stdio # 运行 HTTP 模式 npm run start:http
服务端支持两种运行模式:
用于与 Claude Desktop 等 MCP 客户端直接集成:
npm run start:stdio
用于容器部署或 HTTP 客户端访问:
npm run start:http
HTTP 服务器将在端口 8081 上启动,端点为 http://localhost:8081/mcp
在 claude_desktop_config.json 中添加配置:
{ "mcpServers": { "sbwsz": { "command": "npx", "args": ["sbwsz-mcp-server"] } } }
{ "mcpServers": { "sbwsz": { "command": "node", "args": ["path/to/sbwsz-mcp/dist/index.js"], "cwd": "path/to/sbwsz-mcp" } } }
# 构建镜像 docker build -t sbwsz-mcp . # 运行 STDIO 模式(用于集成) docker run -i --rm sbwsz-mcp # 运行 HTTP 模式(用于服务) docker run -p 8081:8081 sbwsz-mcp
项目使用 cross-env 确保在所有平台上正确设置环境变量:
npm run start:http 或 npm run start:stdionpm run start:http 或 npm run start:stdio