The Lab · exhibit VI · the endpoint

SRD 5.2.1 over MCP

The machine room behind the browser: the four tools, the config line for your own client, a console pointed at the live URL, and how a whole MCP server fits inside a Cloudflare Worker.

What this is

An MCP server. If you use a client that speaks the Model Context Protocol — Claude Code, Claude Desktop, Cursor, whatever you've got — you point it at one URL and it gains four tools for reading the 5.2.1 SRD. Ask it about a stat block and it goes and reads one, which for a 322-monster reference book is the difference between a number and a guess.

The data is the System Reference Document Wizards of the Coast released under CC BY 4.0. None of it is a paid book and none of it is mine — I packaged it, I didn't write it. Every response carries its own attribution so the credit travels with the record instead of living on this page.

Try it

This is not a mockup. The box below holds a real JSON-RPC request; pressing send POSTs it to the live endpoint and prints what comes back, unedited. Change the monster's name and see what happens.

The answer arrives twice-wrapped, which is the protocol and not a bug: MCP returns tool results as text content, so the payload sits inside the envelope as an escaped JSON string. Your client unpacks that for you. Here it's left exactly as the wire had it.

Response

{
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"_license\": \"Source: D&D System Reference Document v5.2.1, © Wizards of the Coast LLC, licensed under CC-BY 4.0. Re-published via the Open5e API (https://api.open5e.com/, document slug: wotc-srd), also under CC-BY 4.0.\",\n  \"condition\": {\n    \"attribution\": \"SRD 5.2.1 / CC-BY 4.0\",\n    \"description\": \"* A charmed creature can't attack the charmer or target the charmer with harmful abilities or magical effects.\\n* The charmer has advantage on any ability check to interact socially with the creature.\",\n    \"key\": \"charmed\",\n    \"name\": \"Charmed\"\n  }\n}"
      }
    ]
  },
  "jsonrpc": "2.0",
  "id": 1
}

Point your own client at it

The endpoint is:

https://adamkinney.com/api/srd/mcp

In Claude Code, one line:

claude mcp add --transport http srd https://adamkinney.com/api/srd/mcp

Anywhere that takes a JSON config:

{
  "mcpServers": {
    "srd": {
      "type": "http",
      "url": "https://adamkinney.com/api/srd/mcp"
    }
  }
}

No account, no key, no rate limit. It serves public-domain reference data off a free tier; if someone gives me a reason to put a gate on it, I'll put a gate on it and say so here.

The four tools

lookup_monster
One monster by name. The full stat block, or null if the SRD does not have it.
lookup_condition
One condition by name. The rules text, verbatim.
search_monsters
Filter by challenge rating, type, and size. Summaries only — follow up with lookup_monster.
license
The attribution block. Every other response carries it too, so it travels with the data.

How it runs

The whole server lives inside a Cloudflare Worker. No container, no origin server, no database — the same site that serves this page answers the tool calls.

Two things had to change to make that possible. The server used to read its own JSON files off disk, and a Worker has no disk; version 1.4.0 takes the dataset as an argument instead, so the two files inline into the bundle at build time and a request never touches a filesystem. And it used to keep a session, which an isolate is a bad place for — the next request may not land in the same one. So it's stateless: a fresh server per request, which costs nothing when all four tools are pure reads of a file that shipped with the build.

Parsing 322 stat blocks costs about five milliseconds, once, when an isolate wakes up. Every request after that is a map lookup.

It runs on your machine too

Same server, same dataset, over stdio instead of HTTP:

npx -y @adkinn/fifth-edition-srd-mcp

Source is at github.com/adkinn/srd-5.2.1 and the package is @adkinn/fifth-edition-srd-mcp. MIT for the code, CC BY 4.0 for the data.

Where it came from

I built it for a tabletop app I shut down in August with nobody on it. The dataset and the server were the parts worth keeping, so they moved out of that folder and kept shipping. Hosting it here cost an afternoon and about two megabytes of bundle, which is a cheap way to keep a good thing alive.

The browser is the same endpoint with a UI on it, and the rest of the apps are in the Lab.

Source: D&D System Reference Document v5.2.1, © Wizards of the Coast LLC, licensed under CC BY 4.0. Re-published via the Open5e API, also under CC BY 4.0.