Scryfall MCP服务器
一个模型上下文协议 (MCP) 服务器,用于通过 Scryfall API 搜索和检索 Magic: The Gathering 地图信息。
🎯 特征
- 地图搜索使用Scryfall搜索语法搜索地图
- 特定卡片恢复按名称获取特定卡片的详细信息
- 自动补全基于部分查询的卡片名称建议
- 字段预设: 用于常见用例的默认字段集
- 多种格式支持JSON,CSV和表格格式的输出
- 速率限制自动自动管理 Scryfall API 分期限制
📋 先决条件
- Node.js(版本 18 或更高版本)
- npm o纱线
🚀 安装
- 克隆或下载此仓库
- 安装依赖关系:
npm install⚙️ 配置
在 Claude Desktop 中配置
将以下配置添加到 Claude Desktop 配置文件:
视窗: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"scryfall": {
"command": "node",
"args": ["C:\\path_to\\MCP_scryfall\\index.js"]
}
}
}重要: 替换 C:\\path_to\\MCP_scryfall\\ 您克隆此存储库的绝对路径。
🔧 可用工具
1.搜索卡
使用Scryfall搜索语法搜索Magic: The Gathering卡片。
参数 :
query(必填):Scryfall搜索查询(例如,“c:red t:legendary”,“set:dom”,“o:flying cmc\=bug` - 至少蓝色,黑色和绿色c:c-无色卡
按类型
t:creature-生物t:instant-伊斯坦塔尼t:legendary- 传奇地图t:"legendary creature"- 传奇生物
每套
set:dom- Dominaria(使用集合代码)set:war-星火之战
为稀有
r:mythic罕见的神话r:rare-奇怪的r:uncommon- 不常见r:common-司令部
按文本
o:"draw a card"包含“draw a card”的卡片o:flying飞行卡
以法力成本
cmc=3- 完全转换的法力成本 3cmc=5法力值 5 或更高
力量/宪法
pow>=5力量5或更大tou<=2宪法2或以下pow=tou权力等于宪法
按格式
f:standard-在标准中合法f:commander-指挥官合法f:modern法律在现代
组合
c:blue t:creature cmc<=2 f:standard“标准中合法的CMC 2或更低的蓝色生物”
💡 使用范例
示例1:寻找传说中的红色生物
Cerca carte con query "c:red t:legendary t:creature" usando il preset creatures in formato tabella示例 2:获取一组卡的价格
Cerca carte del set "mom" usando il preset prices in formato CSV示例 3:在 Standard 中查找反法术
Cerca "o:counter o:target o:spell f:standard" con campi personalizzati: name, set, mana_cost, oracle_text, rarity, prices.usd示例 4:特定卡片信息
Mostrami "Black Lotus" con il preset comprehensive🛠️ 发展
要在开发模式下运行服务器:
npm start📚 资源
📄 许可证
麻省理工学院
⚠️ 备注
此服务器使用Scryfall的API,该API免费提供用于非商业用途。请查看 Scryfall的意大利歌剧院 在商业上使用此服务器之前。
服务器会自动实现速率限制(请求之间为 100ms),以遵守 Scryfall API 指南。
