Skip to main content

LoreHub MCP

An MCP server that lets AI agents (Claude, Cursor and any other MCP client) read the Meta Areas of a LoreHub dialogue.

A director draws Meta Areas on the Dialogue Builder canvas: a shot, a location, a mood, with a note, a priority and meta rules such as shot = close_up. With this server, your agent reads those areas and the nodes inside them, and turns them into references, shot lists or mood boards. It only reads: it never changes your world.

More on the LoreHub MCP page and in the Meta Areas guide.

Install

You need a LoreHub account with at least Viewer access to the world, and uv. Nothing else to install: uvx downloads and runs the server.

uvx lorehub-mcp

Or with pip: pip install lorehub-mcp, then run lorehub-mcp.

Claude Code

claude mcp add lorehub --env LOREHUB_LOGIN=you@example.com --env LOREHUB_PASSWORD=your-password -- uvx lorehub-mcp

Claude Desktop

Settings → Developer → Edit Config, then add to claude_desktop_config.json:

{
  "mcpServers": {
    "lorehub": {
      "command": "uvx",
      "args": ["lorehub-mcp"],
      "env": {
        "LOREHUB_LOGIN": "you@example.com",
        "LOREHUB_PASSWORD": "your-password"
      }
    }
  }
}

Cursor

Add the same block to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

{
  "mcpServers": {
    "lorehub": {
      "command": "uvx",
      "args": ["lorehub-mcp"],
      "env": {
        "LOREHUB_LOGIN": "you@example.com",
        "LOREHUB_PASSWORD": "your-password"
      }
    }
  }
}

Other MCP clients work the same way: run uvx lorehub-mcp over stdio with the two environment variables.

Find your world and dialogue ids

You don't need to look them up yourself. Ask the agent, for example "List my LoreHub worlds, then find the dialogue Tom at Grandpa's and give me its Meta Areas", and it calls list_worlds, list_dialogues and get_dialogue_meta in turn.

To copy them by hand: open the dialogue in the Dialogue Builder. The address looks like app.lorehub.app/<owner>/<world>/game/<story id>?dialogue=<dialogue id>, so the dialogue id is after ?dialogue=. The world id comes from list_worlds.

Tools

Tool What it returns
list_worlds() The worlds your account can open, with their ids and your role.
list_dialogues(world_id, game_id?, name?) Stories and their dialogues with ids. name filters by dialogue name.
get_dialogue_meta(world_id, dialogue_id, area?, include_nodes=true) Each Meta Area's title, note, priority and meta rules as field name: value, the nodes inside it, and the nodes where areas overlap (higher priority first). area filters by title text or area id.

Example output of get_dialogue_meta:

{
  "dialogue": "Tom at Grandpa's",
  "dialogue_id": "…",
  "areas": [
    {"title": "Grandpa's house: wide", "priority": 1,
     "rules": {"shot": "wide", "background": "grandpas_house"},
     "nodes": ["dlg.n_01", "dlg.n_04"], "id": "…"},
    {"title": "Close-up: Tom is crying", "note": "Tears, low light", "priority": 2,
     "rules": {"shot": "close_up", "background": "grandpas_house", "tom_emotion": "crying"},
     "nodes": ["dlg.n_04"], "id": "…"}
  ],
  "overlaps": [{"node": "dlg.n_04", "areas": ["Close-up: Tom is crying (P2)", "Grandpa's house: wide (P1)"]}]
}

Configuration

Variable Default
LOREHUB_LOGIN, LOREHUB_PASSWORD Your LoreHub user name or email and password. The server signs in, and signs in again when the token expires.
LOREHUB_TOKEN A LoreHub JWT instead of a login and password. It lasts 8 hours.
LOREHUB_API_URL https://api.lorehub.app
LOREHUB_TIMEOUT 30 Seconds per request.
LOREHUB_LOG_LEVEL INFO Logs go to stderr.
LOREHUB_NODE_WIDTH, LOREHUB_NODE_HEADER_HEIGHT 200, 32 The canvas node card size. Leave them as they are.

How it works

The server makes read-only GET calls to the LoreHub API with your account's token: the dialogue's Meta Areas, its name and story, the story's meta schema (to turn rule ids into field names) and the node positions. A node is inside an area when the middle of its header is, the same rule the Dialogue Builder uses.

Not yet: nodes come back as full ids, without their line text or speaker.

License

MIT

Metadata

Release files for lorehub-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lorehub-mcp 0.1.0
File Size Uploaded Provenance Actions
lorehub_mcp-0.1.0.tar.gz 10.1 kB With provenance Details for lorehub_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lorehub-mcp 0.1.0
File Interpreter ABI Platform Actions
lorehub_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for lorehub_mcp-0.1.0-py3-none-any.whl

Total release size: 20.0 kB

Release files / lorehub_mcp-0.1.0.tar.gz

Download URL lorehub_mcp-0.1.0.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8821ba88158879bfe010b2940ccaab6eab52163c1caa2198c0643574a3d8b530
BLAKE2b-256 checksum
How to use checksums
316d6a9b27452586137476c11f2cce88a8ac7dbd578b8eb42e38b4d599d023ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / lorehub_mcp-0.1.0-py3-none-any.whl

Download URL lorehub_mcp-0.1.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d3df2bdde2a685c4e12d47d8fb98e7fd9e823fc768fd765a32b44960fa8d9b1
BLAKE2b-256 checksum
How to use checksums
bbbd44a402d59e8d2d724ea0ec1be4b93ad00c7c258da21a9eca1dae92be0038
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for lorehub-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lorehub_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page