LoreHub MCP

Your LoreHub world, ready for any AI agent

Through the LoreHub MCP, Claude, Cursor and other AI agents read your stories, dialogues, characters, places and lore, and work with them right in your chat or editor. Your API key sets the access. Read key: agents look. Write key: agents create and edit, never delete. Every change shows in your history.
Example: Directors
Use cases

One world, for every role on the team

Each role asks the agent for something different. These are the tools and prompts each one uses.

readworks with any keywriteneeds a Write key
Writers

Get the canon map, read a dialogue as a script, and with a Write key draft dialogues, nodes, lines, options and links.

get_world_overviewget_dialoguesearch_worldcreate_dialoguerename_dialogueadd_nodeedit_nodeadd_optionedit_optionlink_nodes
Lore keepers

Read characters, places, lore and the timeline, check a scene for continuity, and create, edit and relate documents.

get_documentlist_documentsget_timelinecontinuity_checkcreate_documentedit_documentrelate_documents
Narrative designers

See a story's route map and variables, check a dialogue for dead ends, and add variables and the nodes that set them.

list_dialoguesget_story_mapcheck_dialoguecreate_variableset_variable_on_nodemove_node
Directors and artists

Director's notes → reference briefs and shot lists, and with a Write key draw Meta Areas and set a node's meta values.

get_dialogue_metareference_briefshot_listadd_meta_areaedit_meta_areaset_node_meta
Voice-over and producers

Every line of a story by speaker with line and word counts, the world's numbers, and a voice casting sheet per character.

get_character_linesget_world_statsvoice_casting_sheet
Localisers

Read every line with its translations and status, review a language for tone and terms, and write translations.

get_translationstranslation_reviewset_translation
Programmers

Get a dialogue's export JSON, as the Export button gives it, and a guide with loader code for Unity, Godot or Unreal.

get_exportengine_import_guide
Tools

What your agent can read and change

Sixteen tools read and seventeen write, plus six ready-made prompts. Every result says how many calls the world has left today.

Read

Work with any key. Most answer in one API call.

list_worlds

The worlds you added, with their ids and which one is current.

use_world

Switches the current world for this session, by name or id.

get_world_overview

The canon map: stories, documents by folder and tag, and counts of everything.

search_world

Matches in document names, dialogue names, lines and option texts.

list_dialogues

Stories and their dialogues with ids, filtered by name if you like.

get_dialogue

A dialogue as a script: each node's speaker, lines, options, conditions, variables, meta values and Meta Areas.

check_dialogue

Unreachable nodes, options without a target, dead ends and variables set but never checked.

get_document

A character, place or other document: its description, tags, relations and the dialogues that mention it.

list_documents

Documents with their folder and tags, filtered by tag, folder or name.

get_timeline

The calendar and the events in date order, with their linked documents.

get_story_map

A story's route map, its route scopes, and every variable with where it's set and checked.

get_character_lines

Every line of a story grouped by speaker, with line and word counts.

get_translations

Each line and option with its translation and status in every language.

get_export

A dialogue's Export Schema v2 JSON, as the Export button gives it.

get_world_stats

Dialogues, nodes, lines and words per story and character, and translation progress.

get_dialogue_meta

Each Meta Area's title, note, priority and rules, the lines inside it, and where areas overlap.

Write

Need a Write key. Agents create and edit, never delete, and every change shows in your history. A write can take more than one API call.

create_dialogue

Creates a dialogue in a story.

rename_dialogue

Renames a dialogue.

add_node

Adds a node, optionally after another, with a speaker and lines.

edit_node

Changes a node's speaker and lines in place.

move_node

Moves a node on the canvas.

set_node_meta

Sets a node's meta values, like shot = close_up.

add_option

Adds an option, optionally shown only when variables have given values.

edit_option

Changes an option's text.

link_nodes

Links a node, an option or the start to a node, optionally with conditions.

create_variable

Creates a true/false story variable.

set_variable_on_node

Makes a node set a variable when it plays.

create_document

Creates a document with a description, folder and tags.

edit_document

Changes a document's name, description or folder, and adds tags.

relate_documents

Relates two documents, like Father and Son.

add_meta_area

Draws a Meta Area with a note, colour and rules.

edit_meta_area

Changes a Meta Area's text, place, size or rules.

set_translation

Writes a line's translation in one language.

Ready-made prompts
continuity_check

Checks a scene against the documents and the timeline.

translation_review

Finds missing and outdated translations and reviews meaning, tone and terms.

engine_import_guide

The export's shape and loader code for Unity, Godot or Unreal.

reference_brief

A visual brief per Meta Area: subject, characters, shot, background and mood.

shot_list

A numbered shot list for a dialogue, one shot per node.

voice_casting_sheet

One entry per speaking character, with voice direction and sample lines.

Install

Set it up in a minute

You need uv, which downloads and runs the server for you, and an API key for each world. Your keys stay in your system keychain, never in an MCP config.

1. Create an API key

In LoreHub, open the avatar menu → Profile → API keys, pick the world, choose Read or Write, choose when the key expires and select Create key. Pick Read to explore, and Write when you want the agent to build. LoreHub shows the key, which starts with lh_, only once: copy it. The world id is on the same page: under the form once you pick a world, and next to each key in the list, as World id with a Copy button. Right after you create a key, LoreHub also shows the ready-made world add command.

2. Add the world on your computer

Run the ready-made command, or this one with the World id, and paste the key when it asks. The command has no key in it. It checks the key with LoreHub and stores it in your system keychain: the macOS Keychain, Windows Credential Manager or the Secret Service on Linux.

uvx lorehub-mcp world add --id <world id>
3. Switch between worlds

Add one key per world. One world is current, like a subscription in az: the tools use it unless the agent names another, and the agent can switch for a session with use_world.

# * marks the current world
uvx lorehub-mcp world list
# by name or id
uvx lorehub-mcp world use "Tom's World"
uvx lorehub-mcp world remove <name or id>
4. Connect your AI

The command and the config need no key: the server reads it from your keychain.

Claude Code
claude mcp add LoreHub -- uvx lorehub-mcp
Claude Desktop, Cursor and other clients

In Claude Desktop, open Settings → Desktop app → Extensions → Local MCP servers → Edit config, open claude_desktop_config.json in a text editor and add the LoreHub entry inside mcpServers, keeping what is already in the file. In Cursor, add it to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "LoreHub": {
      "command": "uvx",
      "args": ["lorehub-mcp"]
    }
  }
}

Then quit Claude Desktop completely (Cmd+Q on Mac, Quit from the tray icon on Windows) and open it again: LoreHub shows under Local MCP servers as Running. If it says uvx was not found, put the full path that which uvx prints (where uvx on Windows) in command.

CI and containers

On a machine without a keychain, put the key and its world in the server's environment instead. LOREHUB_API_KEY needs LOREHUB_WORLD_ID, and together they win over the worlds you added.

{
  "mcpServers": {
    "LoreHub": {
      "command": "uvx",
      "args": ["lorehub-mcp"],
      "env": {
        "LOREHUB_API_KEY": "lh_your-key",
        "LOREHUB_WORLD_ID": "your-world-id"
      }
    }
  }
}
Read key: agents look. Write key: agents create and edit, never delete. Every change shows in your history. Each key works in one world, expires when you choose, and stops working at once when you revoke it on the same page.
Each world gets a number of API calls a day from its plan (10 on Free), shared by all its members' keys. Most reads cost 1 call; writes and a few reads, like check_dialogue and get_dialogue_meta, cost 2 or more.

Start building your story today

Write, play and test branching dialogue in the browser, then export JSON to Unity, Unreal, Godot or any engine.
Free plan with 3 seats
Play your story in the browser
JSON export for any engine
Worldbuilding wiki included