canonical: https://jentic.com/apis/magicthegathering.io/magicthegathering

# Magic: The Gathering API

The Magic: The Gathering API serves card, set, and game data for the Magic: The Gathering trading card game. It searches cards by attributes such as name, type, and set, returns a single card or set by identifier, generates a booster pack for a set, and lists card types, subtypes, supertypes, and supported game formats. It is a free, public read-only data source.

## For AI agents

Search Magic: The Gathering cards by attribute, fetch a card or set by identifier, generate a booster pack, and list card types and game formats. The API is public and needs no authentication.

## Scope

Does not handle account data, deck storage, or purchases. Use the Magic: The Gathering API for card, set, and game reference data only.

## Capabilities

- Search cards by name, type, set, and other attributes
- Get a single card by its identifier
- List sets and get a set by its code
- Generate a booster pack for a set
- List card types, subtypes, and supertypes
- List the supported game formats

## Use cases

### Card Lookup and Search

An AI agent connected through Jentic can answer questions about specific cards. It searches by name, type, colour, or set and returns matching cards with their attributes, so an assistant can help a player find a card or check its details without a local database.

Example prompt: Search for all cards named Black Lotus and return their set and type

### Set and Booster Generation

Tools that simulate opening product need real set contents. The Magic: The Gathering API lists sets and generates a booster pack for a chosen set, letting an agent build a draft pool or simulate a pack opening from authentic set data.

Example prompt: Generate a booster pack for a given set code and return the cards it contains

### Game Reference Data

Rules and deck-building assistants need the game's vocabulary. The API lists card types, subtypes, supertypes, and supported formats, so an agent can validate a deck against a format or explain the type line of a card from authoritative data.

Example prompt: List the supported formats and the card types the game defines

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/cards` | Search cards by attribute |
| GET | `/cards/{id}` | Get a card by its identifier |
| GET | `/sets` | List sets |
| GET | `/sets/{id}/booster` | Generate a booster pack for a set |
| GET | `/formats` | List supported game formats |

## Key resources

- **Cards** — Search and retrieve card data by attribute or identifier
- **Sets** — List sets and get a set by its code
- **Booster** — Generate a booster pack for a set
- **Types** — Card types, subtypes, and supertypes
- **Formats** — The supported game formats

## Why Jentic

- **Setup:** Using the Magic: The Gathering API by hand means constructing search queries, paging through results, and parsing card and set payloads yourself. Through Jentic you install once, import it from the API Directory, and your agent calls the card, set, and format operations directly.
- **Permission scoping:** Every operation is a read that returns game data, so your agent can never modify anything, and you choose which operations it may call. You might allow card and set lookups while blocking booster generation.
- **Credential handling:** The Magic: The Gathering API is public and needs no API key, so there is no credential to store or inject. Your agent calls the endpoints directly through your own Jentic One instance.
- **Discovery method:** Agents search Jentic by intent such as 'search cards by name', and Jentic returns the matching operation with its input schema so the agent calls it with the right filters.

## Related APIs

- **RAWG** — Video game database with titles, genres, and platform data
- **IGDB** — Internet Game Database covering games, companies, and franchises
- **Giant Bomb** — Games media database of titles, characters, and franchises

## FAQ

### Does the Magic: The Gathering API require authentication?

No. The Magic: The Gathering API is free and public and requires no API key or credential. Every endpoint is a read that returns card and game data, so an agent can call it without any sign-up. Through Jentic you import it and your agent calls the operations directly.

### Can I limit what my agent is allowed to do with the Magic: The Gathering API?

Yes. Every operation is a read that returns game data, so the agent can never change anything, and you choose which operations it may call. You might allow card and set lookups while blocking booster generation, with every call logged by your own instance.

### Is there a Magic: The Gathering MCP server?

You don't need an MCP server to give your agent the Magic: The Gathering API. Jentic connects it directly from the API Directory: import it and your agent calls the card, set, and format operations. Operations are discovered on demand, so nothing extra loads into the agent's context.

### What are the rate limits for the Magic: The Gathering API?

According to its documentation the API is rate limited to 5000 requests per hour per IP address. It requires no key, so plan your agent's calls against that hourly ceiling before running high-volume searches.

### What data does the Magic: The Gathering API cover?

It covers cards, sets, and game vocabulary. You can search cards by attributes, retrieve a card or set by identifier, generate a booster pack for a set, and list card types, subtypes, supertypes, and supported formats.

### How do I search for a card through Jentic?

Search Jentic by intent, for example 'search cards by name', and Jentic returns the matching Magic: The Gathering operation with its input schema. Your agent supplies the search filters and reads back the matching cards. To run it on your own infrastructure, install Jentic One from its GitHub repo.
