Loreum

Connect AI (MCP)

Loreum is a remote MCP server. Connect Claude, Cursor, or any Model Context Protocol client to a world and the assistant can search and read everything in it, and, if you allow it, create and edit entities, lore, timeline events, and story content.

How it works

Every world has its own MCP URL, shown under Settings → Connect AI in the app:

https://api.loreum.app/v1/mcp/your-world

When an app connects to that URL it is sent to Loreum to sign in. You pick the world and whether the app may only read or also write, then approve. Nothing to copy or paste. Each approval is a connected app you can disconnect from the world's settings at any moment, which instantly stops every token that app holds.

Under the hood this is standard OAuth 2.1: client ID metadata documents (the recommended way for apps to identify themselves) or dynamic client registration, PKCE (S256), short-lived access tokens, rotating refresh tokens, and tokens bound to exactly one world's URL. A token issued for one world is rejected by every other world's URL, even on the same account.

Connecting

Claude (web, desktop, mobile)

  1. Open Claude → Settings → Connectors → Add custom connector.
  2. Paste your world's MCP URL. Under OAuth client, keep "Use Anthropic's hosted client metadata" (the recommended option; Loreum supports it).
  3. Click Connect and approve access on the Loreum page that opens.
  4. Enable the connector in a conversation. It also shows up in Claude Code.

Claude Code

claude mcp add --transport http loreum https://api.loreum.app/v1/mcp/your-world

Claude Code opens your browser to sign in the first time (or run /mcp). Tokens are refreshed in the background.

ChatGPT

Settings → Connectors → Create: name it, paste your world's MCP URL, choose OAuth, then approve on the Loreum page that opens. ChatGPT's standard connectors and deep research use the search and fetch tools (with citation links back to your world); enable Developer mode under Connectors → Advanced to use every tool.

Cursor

Add to .cursor/mcp.json; Cursor handles the sign-in flow itself:

{
  "mcpServers": {
    "loreum": { "url": "https://api.loreum.app/v1/mcp/your-world" }
  }
}

Other clients

Any client that speaks MCP over Streamable HTTP and supports OAuth will work the same way (Windsurf, VS Code, the MCP Inspector). Clients that only support fixed headers can use an API key instead, see below.

API keys

For scripts, the REST API, and MCP clients without OAuth support, generate a project-scoped key under Settings → API keys. Keys are read-only or read-write, optionally expire, and can be revoked at any time. The key is shown once. Send it as a bearer token:

{
  "mcpServers": {
    "loreum": {
      "url": "https://api.loreum.app/v1/mcp/your-world",
      "headers": { "Authorization": "Bearer lrm_your_api_key" }
    }
  }
}
claude mcp add --transport http loreum https://api.loreum.app/v1/mcp/your-world \
  --header "Authorization: Bearer lrm_your_api_key"

In Claude's custom connector dialog, keys go under Request headers as an Authorization header with the value Bearer lrm_… (beta feature for organization admins). The older project-less URL https://api.loreum.app/v1/mcp still accepts API keys.

Read tools

Available to every connection. Slugs and ids returned here feed the other tools.

ToolWhat it does
get_projectWorld overview: name, description, timeline settings, content counts
search_projectSearch entities, lore, timeline events, and scenes in one call
list_entitiesCharacters, locations, organizations, items — filter by type or name
get_entityOne entity with relationships, timeline events, lore, tags, secrets
get_entity_typesCustom item types and their field schemas
list_tagsAll tags in the world
search / fetchChatGPT connector contract: search hits with citation URLs, and full documents by id
list_relationshipsGraph edges, optionally for one entity
list_lore_articlesLore titles by category, title text, or linked entity
get_lore_articleFull markdown of one article
get_timelineEvents in order, filterable by entity or significance
get_timeline_eventOne event in full
list_erasNamed historical periods
get_storyboardPlotlines and works with chapters
get_plotlineA plotline with its plot points
get_workA work with its chapters
list_scenesScenes of a chapter, including prose

Write tools

Only offered to read & write connections; read-only connections don't even see them. Every tool declares whether it is destructive so clients can ask before deleting.

ToolWhat it does
create_entity / update_entity / delete_entityCharacters, locations, organizations, items (with tags)
create_relationship / update_relationship / delete_relationshipKnowledge graph edges
create_lore_article / update_lore_article / delete_lore_articleLore wiki
create_timeline_event / update_timeline_event / delete_timeline_eventHistory
create_eraHistorical periods
create_plotline / create_plot_point / update_plot_pointStory arcs and beats
create_work / create_chapterBooks, scripts, campaigns and their chapters
create_scene / update_sceneScenes including narrative prose

Review queue

Write tools currently change your world directly. A review queue, where AI-proposed changes wait in a staging area with a diff for you to accept or reject, is on the roadmap. Until then, grant read-only access if you don't want the assistant editing your canon.

Example prompts

  • "Who are the main characters in my world and how are they connected?"
  • "Summarize everything that happened in the Third Age."
  • "Create a location called the Iron Citadel in the Northern Wastes, tagged fortress."
  • "Write a lore article on the founding of the Jedi Order and link it to Yoda."
  • "Draft the opening scene of chapter one from Frodo's point of view."

Self-hosting

The MCP server and its OAuth authorization server are part of the Loreum API. Set PUBLIC_API_URL to the exact origin users will paste (for example https://api.loreum.app) and WEB_URL to the web app origin. Hosted clients such as claude.ai require HTTPS and must be able to reach /.well-known/oauth-authorization-server on the API origin. Locally the endpoint is https://api.loreum.app/v1/mcp/<world>.