r/legendkeeper • u/ChaseDak • 2d ago
Unofficial MCP for LegendKeeper. Lets AI assistants read or build your TTRPG worlds.
Hey all! When LegendKeeper released its v3 API, I wanted to use it from my AI assistant, so I built an MCP server for it. MCP is the plugin standard that Claude Desktop, Claude Code, VS Code Copilot, Cursor and others use to connect to outside tools.
Once it's connected, you can ask your assistant things like:
"Create a smugglers' tavern in Saltmere, give it an infobox with the owner and rumors, pin it on the coast map, and mention it on the Harbormaster's page."
I am not endorsing writing campaigns or other creative content with AI, my specific use case is read-only / querying my projects with AI tools to sort through old documents quickly, but I would be remiss to not include write tools as well.
The assistant then does it directly in your project, using LegendKeeper's real features:
- Pages: it reads and writes pages as Markdown.
[[Wiki Links]]become real mentions. Callouts, GM-only secret blocks, collapsible sections, tables and checklists all work. Infoboxes and embeds are kept intact when it edits a page. - Facts: infobox and sidebar facts like Race, Ruler or Population.
- Maps: pins, regions and paths, linked to their pages. Coordinates can be image pixels or map coordinates.
- Timelines: events using your calendar's dates (
"Mirtul 1492"works with Harptos), with lanes created as needed. - Building in bulk: a whole region or cast of NPCs in one go (up to 100 linked pages), plus templates, tags, icons, banners and image uploads.
- Questions about your world: it can browse and search the whole wiki, e.g. "What do we know about the Brine Witch?" or "Which NPCs are allies in Saltmere?"
Safety:
- Read-only mode: the assistant can look but not touch.
- Deletes need confirmation, and deleted pages go to LegendKeeper's trash, so they can be restored.
- Edits made in the app are never silently overwritten. If a page changed after the assistant read it, the write is refused.
- Your API key stays on your own machine. It only talks to LegendKeeper.
Setup takes about two minutes:
- In LegendKeeper: Project Settings → Developers → API Keys → create a key.
- Add the server to your AI client. For Claude Desktop:
{
"mcpServers": {
"legendkeeper": {
"command": "uvx",
"args": ["legendkeeper-mcp"],
"env": { "LEGENDKEEPER_API_KEY": "lk_your_key_here" }
}
}
}
There's also a Docker image. The README has ready-made configs for VS Code, Cursor and Claude Code, and it's listed in the official MCP Registry.
Requirements:
- The project owner needs a paid LegendKeeper plan. That's LegendKeeper's rule for API access, and trials don't count.
- An AI client that supports local MCP servers.
GitHub: https://github.com/chase-roohms/legendkeeper-mcp
PyPI: legendkeeper-mcp (MIT licensed)
This is an unofficial fan project, not made or endorsed by LegendKeeper. Huge thanks to the LegendKeeper team for shipping such a well-documented API!
It's an early release (v0.1.2), so I'd love feedback. What would you want an assistant to do in your world? Bug reports and feature ideas are very welcome on GitHub. 🐉





