CS

cryppadotta/scryfall-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

37 stars 14 forks 质量 51 趋势 0

cryppadotta/scryfall-mcp 是从 https://github.com/cryppadotta/scryfall-mcp. 导入的 MCP 服务器候选。

概览

cryppadotta/scryfall-mcp 是从 https://github.com/cryppadotta/scryfall-mcp. 导入的 MCP 服务器候选。

概述(AI 翻译)

一个用于与Scryfall API交互的模型上下文协议(MCP)服务器。它提供了查找《万智牌》卡牌细节、卡牌判定和价格信息的工具。

特色

  • search_cards 对占卜进行基于文本的搜索。返回匹配的卡牌列表。
  • get_card_by_id 通过Scryfall UUID直接检索一张卡牌。
  • get_card_by_name 通过准确的英文名检索一张卡片。
  • random_card 从整个掠夺者数据库中随机抽一张卡牌。
  • get_rulings 检索该卡牌的官方判决,可能澄清卡牌互动或规则。
  • get_prices_by_id 通过Scryfall ID获取某张卡当前的价格信息(美元、美元箔、欧元、TIX)。
  • get_prices_by_name 通过准确名称获取某张卡当前的价格信息(美元、美元箔、欧元、TIX)。

用途

服务器可运行两种模式:

  1. 标准标准模式(默认)
  2. 带有HTTP端点的服务器发送事件(SSE)模式

使用 NPX

如果你Node.js本地安装了:

连接服务器

标准模式

你的应用或环境(比如Claude Desktop)可以通过stdio直接与服务器通信。

本页由 AI 翻译,技术细节请以原文为准。

README

Scryfall MCP Server

A Model Context Protocol (MCP) server for interacting with the Scryfall API. It provides tools to look up Magic: The Gathering card details, card rulings, and price information.

Features

  • search_cards
    Perform a text-based search on Scryfall. Returns a list of matching cards.
  • get_card_by_id
    Retrieve a card directly via its Scryfall UUID.
  • get_card_by_name
    Retrieve a card by exact English name.
  • random_card
    Get a random card from the entire Scryfall database.
  • get_rulings
    Retrieve official rulings for a card, which may clarify card interactions or rules.
  • get_prices_by_id
    Retrieve current pricing information (USD, USD foil, EUR, TIX) for a given card by Scryfall ID.
  • get_prices_by_name
    Retrieve current pricing information (USD, USD foil, EUR, TIX) for a given card by exact name.

Usage

The server can be run in two modes:

  1. Standard stdio mode (default)
  2. Server-Sent Events (SSE) mode with HTTP endpoints

Using NPX

If you have Node.js installed locally:

# Stdio mode
npx scryfall-mcp-server

# SSE mode
npx scryfall-mcp-server --sse

Connecting to the Server

Stdio Mode

Your application or environment (like Claude Desktop) can communicate directly via stdio with the server.

SSE Mode

When running in SSE mode (with --sse), you can connect using the MCP CLI:

npx @wong2/mcp-cli --sse http://localhost:3000/sse

The server will be available at:

  • SSE endpoint: http://localhost:3000/sse
  • Message endpoint: http://localhost:3000/messages

Integration in claude_desktop_config.json

Example snippet for stdio mode:

{
  "mcpServers": {
    "scryfall": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp/scryfall"]
    }
  }
}

Or with npx:

{
  "mcpServers": {
    "scryfall": {
      "command": "npx",
      "args": ["scryfall-mcp-server"]
    }
  }
}

Building from Docker

docker build -t mcp/scryfall .

Then you can run in stdio mode:

docker run -i --rm mcp/scryfall

Or in SSE mode:

docker run -i --rm -p 3000:3000 mcp/scryfall --sse

License

Licensed under the MIT License.

在 GitHub 查看完整 README

安装

docker run -i --rm mcp/scryfall
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "scryfall": { "command": "docker", "args": ["run", "-i", "--rm", "mcp/scryfall"] } } }