MCP Server – Scryfall API Interface

by dbeltra

191 downloads
Not rated
GitHub

About

This is an MCP server that interfaces with the Scryfall API to fetch and display detailed Magic: The Gathering card data. It is intended for use by MCP hosts like Claude Desktop to search cards by name, color, type, and text content.

Details

Author
dbeltra
Downloads
191
Categories
Developer Tools, Other

- Search MTG cards by name, colors, type, and oracle text
- Outputs full card details including prices in USD/EUR
- Returns oracle text, mana cost, colors, and rarity
- Provides set name and power/toughness information

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Server – Scryfall API Interface
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Python 3.12+, uv, create a virtual environment, and install dependencies via uv pip install -r pyproject.toml. Configure your MCP host (e.g., Claude Desktop) by adding the server definition to claude_desktop_config.json with the command to run scryfall.py using uv.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp server \u2013 scryfall api interface": {
            "scryfall-mcp": {
                "command": "uv",
                "args": [
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "scryfall-mcp": {
        "command": "uv",
        "args": [
            "venv"
        ]
    }
}

MCP Server – Scryfall API Interface

This is an MCP server that interfaces with the Scryfall API to fetch and display detailed Magic: The Gathering card data. It supports searching cards by name, color, type, and text content.

Features

- Search MTG cards via Scryfall by:
- Card name
- Color(s)
- Type line
- Oracle text
- Detailed card data output:
- Oracle text, mana cost, colors
- Type, power/toughness, rarity
- Set name
- Prices in USD/EUR (regular and foil)

Project Setup

This project uses uv for Python environment and dependency management. All dependencies are declared in pyproject.toml.

Requirements

- Python 3.12+
- uv (install with cargo install uv)

Installation

uv venv
source .venv/bin/activate  # or .venv/Scripts/activate on Windows
uv pip install -r pyproject.toml

Running the project

Running the project with uv run scryfall.py "Atraxa" should display the scryfall results for the Atraxa card in the console, however this is intended to be ran by an MCP host, like Claude Desktop.

Integration with Claude Desktop

Claude Desktop can run the MCP server to interact with the Scryfall API and use the results. You need to install or update to the latest Claude version and create the claude_desktop_config.json file if it doesn't exist yet:

~/Library/Application\ Support/Claude/claude_desktop_config.json in MacOS
$env:AppData\Claude\claude_desktop_config.json in Windows

{
    "mcpServers": {
        "scryfall": {
            "command": "/ABSOLUTE/PATH/TO/BIN/uv",
            "args": [
                "--directory",
                "/ABSOLUTE/PATH/TO/mcp-server",
                "run",
                "scryfall.py"
            ]
        }
    }
}

Testing

This project uses pytest for unit testing. Tests are located in the tests/ directory.

Running Tests

To run the full test suite:
pytest

To run a specific test:

pytest tests/test_scryfall.py::test_get_cards_no_query
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.