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.
Create an API key
In LoreHub, open Profile → API keys, give the key a name (for example "Claude Desktop") and select Create key. Copy the key, which starts with lh_: LoreHub shows it only once.
The key is read-only. LoreHub accepts it only for reading what your account can see, never to change anything, and never for your account, password or billing. You don't put your password anywhere. If a key leaks, or you stop using it, revoke it on the same page and it stops working at once.
uvx lorehub-mcp
Or with pip: pip install lorehub-mcp, then run lorehub-mcp.
Claude Code
claude mcp add lorehub --env LOREHUB_API_KEY=lh_your-key -- 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_API_KEY": "lh_your-key"
}
}
}
}
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_API_KEY": "lh_your-key"
}
}
}
}
Other MCP clients work the same way: run uvx lorehub-mcp over stdio with LOREHUB_API_KEY set.
Upgrading from 0.1
0.1 signed in with LOREHUB_LOGIN and LOREHUB_PASSWORD (or LOREHUB_TOKEN). 0.2 no longer reads them. Create an API key, put it in LOREHUB_API_KEY, and delete the login and password from your MCP config. If that config was ever shared or synced, change your LoreHub password too.
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_API_KEY |
Required. Your read-only API key from Profile → API keys. | |
LOREHUB_API_URL |
https://api.lorehub.app |
Must be https:// and a lorehub.app host (plain http:// only for localhost), so the key can't be sent anywhere else. |
LOREHUB_ALLOW_CUSTOM_API_URL |
Set to 1 only if you run LoreHub on your own HTTPS host. |
|
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 GET calls to the LoreHub API with your API key: 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.
Security: ids must be GUIDs, so a crafted id can't reach other API endpoints. The server doesn't follow redirects, doesn't log the key, and doesn't pass the API's error text on to the agent. Area titles, notes and rule values are written by your world's collaborators, so the server tells the agent to treat them as data, not instructions.
Not yet: nodes come back as full ids, without their line text or speaker.
License
MIT
Metadata
Release files for lorehub-mcp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lorehub_mcp-0.2.0.tar.gz | 12.2 kB | With provenance | Details for lorehub_mcp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lorehub_mcp-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for lorehub_mcp-0.2.0-py3-none-any.whl |
Total release size: 23.3 kB
Release files / lorehub_mcp-0.2.0.tar.gz
| Download URL | lorehub_mcp-0.2.0.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
89d4c22f02037bd16e85b498d33eb8b64305906d001f6957e25163526ce3a737
|
|
BLAKE2b-256 checksum How to use checksums |
c53288c7942795ba17b2910d298a649e6c1087e9032f1af85cf6444d8c69d158
|
| 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 4, 2026.
Transparency logRelease files / lorehub_mcp-0.2.0-py3-none-any.whl
| Download URL | lorehub_mcp-0.2.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
31d1ef52e1601456c249146a7925d114db8ebd32ed7a00637d4759f6ef7b6947
|
|
BLAKE2b-256 checksum How to use checksums |
e0b571f172c49bfecd5f9c77578bcffbdce4eef8886e9c82f3d5e7044324a15f
|
| 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 4, 2026.
Transparency logSecurity for lorehub-mcp 0.2.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.
Attestation for lorehub_mcp-0.2.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 4, 2026.
Transparency logA 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.