LegendKeeper MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_HOST | No | HTTP bind address. | 127.0.0.1 (0.0.0.0 in Docker) |
| MCP_PATH | No | HTTP endpoint path. | /mcp |
| MCP_PORT | No | HTTP port. | 8000 |
| MCP_TRANSPORT | No | `stdio` or `http` (streamable HTTP). | stdio |
| MCP_AUTH_TOKEN | No | Bearer token required on every HTTP request (except `/healthz`). | |
| MCP_ALLOWED_HOSTS | No | Comma-separated `host:port` values; enables DNS-rebinding protection (e.g. `localhost:8000`). | |
| MCP_AUTH_TOKEN_FILE | No | Read the bearer token from a file. | |
| LEGENDKEEPER_API_KEY | Yes | API key for the project named `default`. | |
| LEGENDKEEPER_TIMEOUT | No | Request timeout in seconds. | 30 |
| LEGENDKEEPER_BASE_URL | No | API origin (for proxies and mocks). | https://www.legendkeeper.com |
| LEGENDKEEPER_LOG_LEVEL | No | Log level (logs go to stderr; keys are never logged). | INFO |
| LEGENDKEEPER_READ_ONLY | No | Only register reading tools; `api_request` allows GET only. | false |
| LEGENDKEEPER_PROJECT_ID | No | Skip the lookup of the project id behind a key. | discovered |
| LEGENDKEEPER_MAX_RETRIES | No | Retries for 429/5xx/network errors. | 3 |
| LEGENDKEEPER_UPLOAD_ROOT | No | `upload_image` may only read files under this directory. | unrestricted (/uploads in Docker) |
| LEGENDKEEPER_API_KEY_FILE | No | Read the key from a file (Docker secrets). | |
| MCP_ALLOW_UNAUTHENTICATED | No | Permit HTTP on a non-loopback address without a token (not recommended). | false |
| LEGENDKEEPER_MAX_UPLOAD_MB | No | Maximum image size. | 25 |
| LEGENDKEEPER_API_KEY_<NAME> | No | Additional worlds. `LEGENDKEEPER_API_KEY_HOMEBREW` becomes project `homebrew`. | |
| LEGENDKEEPER_DEFAULT_PROJECT | No | Which world tools use when `project` is omitted. | default, else the first name |
| LEGENDKEEPER_ALLOW_URL_UPLOADS | No | Allow `upload_image` to download from http(s) URLs. | true |
| LEGENDKEEPER_PROJECT_ID_<NAME> | No | Skip the lookup of the project id behind an additional key. | discovered |
| LEGENDKEEPER_API_KEY_<NAME>_FILE | No | Read an additional world's key from a file (Docker secrets). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_projectsA | List the LegendKeeper projects (worlds) this server is configured for, with the default project and whether writes are enabled. Each API key belongs to exactly one project. |
| browse_treeA | Show the resource tree (the world's wiki hierarchy) as an indented outline with ids, icons, tags and child counts. Start here to see how a world is organized. |
| searchA | Full-text search across resource names, aliases and document content (best match first). Returns ids, paths, tags and the matching passage. |
| get_resourceA | Get one resource's details: path, tags, aliases, icon, banner, documents, sidebar properties (facts) and children. Use read_document to read a document's content. |
| list_tagsA | List every tag used in the world with how many resources carry it. Check this before tagging so you reuse existing tags with the exact same spelling. |
| list_templatesA | List resource templates (id, name, parent). Use create_from_template to instantiate one. |
| list_calendarsA | List the calendars timelines can use (built-in ones like gregorian, harptos, exandria, plus custom calendars): id, name, months and eras. |
| list_membersA | List the members of the world and their roles (emails are only visible to ADMIN keys). |
| list_assetsB | List the world's asset library (uploaded images, maps, folders) with ids and URLs. Image URLs can be used in page images, banners, map images and events. |
| read_documentA | Read a document of a resource. Pages come back as Markdown (with mentions as Name
links); maps list their pins/regions/paths with coordinates; timelines list lanes and events; boards list
their text. Without |
| write_pageA | Write Markdown to a page document. [[Name]] and text become mentions; callouts, secrets, tables, task lists and images are supported. Writes are atomic; pass expected_version (from read_document) so edits made in the app after you read the page are never overwritten. |
| create_documentA | Add a document (tab) to a resource: a page, a map, a timeline or a board. A resource holds at most 5. |
| update_documentB | Rename a document, hide/show it, toggle full width, set a timeline's calendar or a map's image. |
| delete_documentA | Delete one document (tab) of a resource. It can be restored with api_request (POST /resources/{id}/docs/{docId}/restore). |
| create_resourceB | Create a resource (wiki article, location, character…), optionally with page content in Markdown. Reuse existing tags (list_tags) and give it an icon. Returns the new id and its documents. |
| create_resourcesA | Create up to 100 resources in one atomic request: ideal for scaffolding a region, a cast of NPCs or a
whole hierarchy. Give items a |
| update_resourceA | Change a resource's name, tags, aliases, icon, visibility, lock or banner. Content is edited with write_page; facts with set_facts; position in the tree with move_resource. |
| move_resourceA | Move a resource (and its children) to another parent and/or position among its siblings. |
| delete_resourceA | Move a resource (with its documents, and children if cascade=true) to the trash. Restore it with restore_resource using the id returned here. |
| restore_resourceA | Restore a deleted resource from the trash (its parent must not be deleted). |
| create_from_templateA | Create a resource from a template (copies its documents, properties, icon and tags). |
| set_factsB | Set at-a-glance facts (e.g. Race, Age, Ruler, Population) as key-value rows in the page's infobox or the resource's sidebar. Creates the infobox / property group when it does not exist yet. |
| create_map_featureA | Add a pin, label, region, path or folder to a map document. Coordinates are [lat, lng] in the map's frame (read_document on the map shows its bounds), or image pixels with pixel_coordinates=true. |
| update_map_featureC | Change a map feature: rename, move, reshape, relink, restyle or hide it. |
| delete_map_featureC | Delete a feature (pin, label, region, path or folder) from a map. |
| create_timeline_eventC | Add an event to a timeline document. Link it to the page that tells the full story. |
| update_timeline_eventC | Change a timeline event's name, dates, lane, link or style. |
| delete_timeline_eventC | Delete an event from a timeline. |
| create_timeline_laneB | Add a lane (row) to a timeline, placed after the existing lanes. |
| upload_imageA | Upload an image to the world's asset library and return its asset id and URL. Use the URL in a page
image ( |
| api_requestA | Call any LegendKeeper REST v3 endpoint of this project directly (advanced: boards, calendars, block-level edits, properties, invites, restores…). Returns the raw JSON response. Writes are disabled in read-only mode. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| markdown-guide | How Markdown maps to LegendKeeper blocks, mentions, callouts and preserved blocks. |
| style-guide | Conventions for tags, icons, infoboxes, links, map pins and timeline events. |
TDQS
Scored across 31 tools
Most tools target a distinct resource+action (resources, documents, map features, timeline events each have their own verbs). A few pairs could be confused at a glance — create_resource vs create_resources vs create_from_template, and get_resource vs read_document (metadata vs content) — but the descriptions clearly delineate them.
Strong verb_noun snake_case pattern dominates (list_projects, create_resource, update_map_feature, delete_timeline_event). Minor deviations are 'search' (bare verb, no noun) and 'api_request' (noun_verb ordering), but overall the convention is predictable.
31 tools is on the heavy side, but the domain is genuinely broad — wiki resources, documents (pages/maps/timelines/boards), assets, tags, calendars and members. The count is defensible for that surface, though some document/map/timeline CRUD could arguably be folded together.
Near-complete lifecycle coverage: full CRUD plus trash/restore for resources, documents, map features and timeline events, plus search, tree browsing, tags, templates, facts, and asset upload. The api_request escape hatch explicitly covers remaining gaps (boards, calendars, invites, block edits).