Loreum

MCP Server

Connect AI assistants like Claude to your Loreum world data using the Model Context Protocol. Read your entire world and write changes that land in a review queue for your approval.

What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI assistants connect to external tools and data sources. Loreum's MCP server exposes your world data as structured tools the AI can call. The AI reads your characters, relationships, timeline, lore, and style guide. It can also propose changes (new entities, relationships, articles) that land in a staging area for your review.

Authentication

Generate a project-scoped API key from your project settings page. Each key has a name (e.g. "Claude Desktop"), a permission level (read-only or read-write), and an optional expiration date. The key is displayed once on creation. Copy it and add it to your MCP client configuration.

You can generate multiple keys per project and revoke any key at any time from project settings.

Setup for Claude Desktop

Add this to your Claude Desktop MCP configuration file:

{
  "mcpServers": {
    "loreum": {
      "command": "node",
      "args": ["path/to/loreum/apps/mcp/dist/index.js"],
      "env": {
        "MCP_API_BASE_URL": "https://loreum.app/v1",
        "MCP_API_TOKEN": "your-api-key"
      }
    }
  }
}

Replace your-api-key with the key you generated in project settings. For local development, use http://localhost:3021/v1 as the base URL.

Read Tools

These tools let the AI query your world data. Available with both read-only and read-write API keys.

ToolDescription
search_projectFull-text search across entities, lore, scenes, and timeline
get_entitySingle entity with optional relationships, lore, scenes, and timeline
get_entity_hubFull aggregated page for an entity with all connected content
list_entitiesList and filter entities by type, tag, or search query
get_storyboardNarrative structure: plotlines, works, chapters, scenes
get_entity_typesEntity types and their field schemas
get_style_guideBase style guide, scene overrides, and character voice notes
get_timelineTimeline events and eras for a project
get_lore_articleSingle lore article with linked entities
list_lore_articlesList and filter lore articles by category or tag
get_relationshipsRelationships for a specific entity

Write Tools

These tools let the AI propose changes to your world. All writes create pending changes in the review queue instead of modifying live data. Requires a read-write API key.

ToolDescription
create_entityCreate a character, location, organization, or custom item
update_entityPartial update to an existing entity
delete_entityDelete an entity
create_relationshipCreate a relationship between two entities
delete_relationshipDelete a relationship
create_lore_articleCreate a lore article linked to entities
update_lore_articleUpdate an existing lore article
delete_lore_articleDelete a lore article
create_timeline_eventCreate a timeline event linked to entities
update_timeline_eventUpdate an existing timeline event
delete_timeline_eventDelete a timeline event
create_sceneCreate a scene within a chapter
update_sceneUpdate scene content, style notes, or characters
create_plot_pointCreate a plot point on a plotline
update_plot_pointUpdate a plot point
set_style_guideCreate or update the project style guide

Review Queue

Every write tool creates a pending change instead of modifying your world directly. You review these changes from the Review Queue page in your project. Each change shows the operation type (create, update, or delete), the target, and a diff of what will change. Changes from a single AI session are grouped together so you can review them in context.

You can accept, edit, or reject each change individually, or use batch accept to apply all changes from a session at once.

Example Usage

Once connected, you can ask Claude things like:

  • "Who are the main characters in my Star Wars project?"
  • "What relationships does Luke Skywalker have?"
  • "Create a new location called the Iron Citadel."
  • "Write a lore article about the history of the Jedi Order."
  • "What does my style guide say about dialogue?"
  • "Add a timeline event for the Battle of Yavin."
  • "Is there anything contradictory in my timeline?"

Self-Hosting

The MCP server is included in the Loreum repository at apps/mcp/. Build it with pnpm --filter mcp build and run with node dist/index.js.