@olaservo/scryfall-mcp-server 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # Scryfall MCP Server
2
+
3
+ An MCP server for searching and fetching Magic: The Gathering card data from [Scryfall](https://scryfall.com). Features an [MCP App](https://github.com/modelcontextprotocol/ext-apps) UI that renders card images, mana symbols, oracle text, and pricing when used in compatible hosts like Claude Desktop.
4
+
5
+ ![Card viewer UI in Claude Desktop](assets/card-viewer-screenshot.png)
6
+
7
+ ## Tools
8
+
9
+ - **search** — Search for cards using [Scryfall full-text syntax](https://scryfall.com/docs/syntax) (e.g., `c:red t:creature cmc=3`, `set:mkm`, `o:"draw a card"`)
10
+ - **fetch** — Fetch full card details by Scryfall UUID. In MCP App-capable hosts, renders a card viewer UI with the card image, mana cost icons, oracle text, set info, rarity, and prices.
11
+
12
+ ## Setup
13
+
14
+ ```bash
15
+ npm install
16
+ npm run build
17
+ ```
18
+
19
+ ### Claude Desktop
20
+
21
+ Add to your `claude_desktop_config.json`:
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "scryfall": {
27
+ "command": "node",
28
+ "args": ["/path/to/scryfall-mcp-app/dist/index.js"]
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
34
+ ## Development
35
+
36
+ ```bash
37
+ npm run dev # Watch mode with tsx
38
+ npm run build # Build UI + server
39
+ npm run inspector # Test with MCP Inspector
40
+ ```
41
+
42
+ ## How It Works
43
+
44
+ The server uses the [MCP Apps extension](https://github.com/modelcontextprotocol/ext-apps) to pair the `fetch` tool with a card viewer UI resource. When a card is fetched:
45
+
46
+ - **`content`** returns a readable text summary (card text, metadata, prices) for the model
47
+ - **`structuredContent`** sends the full card data to the UI for rendering
48
+ - The UI renders the card image, Scryfall mana symbol SVGs in the mana cost and oracle text, and card metadata
49
+ - CSP is configured to allow images from `cards.scryfall.io` and SVGs from `svgs.scryfall.io`
50
+ - Non-UI hosts receive the text fallback with all card details