Skip to main content
Glama

chronicle-mcp

chronicle-mcp is a local Model Context Protocol (MCP) server providing persistent, queryable memory for Crusader Kings II tabletop-style roleplaying sessions. It equips AI agents with direct tools to log and retrieve characters, timeline events, and lore documents ("tomes"), backed entirely by plain JSON files on disk.

Features & Safe Upsert Behavior

  • Explicit ID Upserting: Calling upsert_character or upsert_tome without an id always creates a new record with a fresh ID, even if an existing character or tome shares the same name/title (crucial for tabletop RP campaigns with recurring or dynastic names across generations).

  • Lookup Helpers: Use find_character_by_name or find_tome_by_title to search for existing records and retrieve their id before performing updates with upsert_*.

  • Standardized Responses: All tool responses follow a consistent { success: boolean, ...data, message?: string } shape.

  • Robust Storage: Fast in-memory cached reads paired with ~300ms debounced disk writes and automatic recovery for corrupted JSON files.

Related MCP server: ai-journal

Setup

  1. Install dependencies:

    npm install
  2. Build the project:

    npm run build

Running the Smoke Test

To run the complete automated smoke test suite (including isolated CRUD, non-overwriting upsert checks, and corrupt file recovery tests) against a temporary scratch directory (./data-test/), run:

npm run test:smoke

Antigravity CLI Registration

Register chronicle-mcp in your Antigravity CLI configuration (global at ~/.gemini/config/mcp_config.json or project-level at .agents/mcp_config.json):

{
  "mcpServers": {
    "chronicle": {
      "command": "node",
      "args": ["/path/to/chronicle-mcp/build/index.js"],
      "env": {
        "CHRONICLE_DATA_DIR": "/path/to/chronicle-mcp/data"
      }
    }
  }
}

(Replace /path/to/chronicle-mcp with the absolute path to your local chronicle-mcp installation directory).

Data & Backups

All persistent campaign memory is stored in three plain JSON files inside the data/ directory (characters.json, timeline.json, and tomes.json). Creating a full backup of your RP campaign is as simple as copying or committing the data/ folder. You can also customize the data storage location by setting the CHRONICLE_DATA_DIR environment variable in your mcp_config.json. "# chronicle-mcp"

Available Tools

44 tools
add_relationshipB

Create or update a directional or reciprocal relationship edge pair in the active campaign.

Inputs: toId (required), type (required), fromId (required), toType (required), +6 more.

create_campaignA

Create a new campaign record without switching to it immediately.

Inputs: name (required).

delete_characterC

Delete a character by ID from the active campaign.

Inputs: id (required).

delete_houseC

Delete a house by ID from the active campaign.

Inputs: id (required).

delete_threadC

Delete a plot thread by ID from the active campaign.

Inputs: id (required).

delete_timeline_entryC

Delete a timeline entry by ID from the active campaign.

Inputs: id (required).

delete_tomeC

Delete a tome by ID from the active campaign.

Inputs: id (required).

find_character_by_nameA

Find a character in the active campaign by exact name string. Returns basic matches with IDs for further updates.

Inputs: name (required).

find_house_by_nameA

Find a house in the active campaign by exact name.

Inputs: name (required).

find_tome_by_titleB

Find a tome in the active campaign by exact title.

Inputs: title (required).

get_active_campaignA

Get details of the currently active campaign context.

Inputs: no named parameters.

get_characterB

Retrieve a full character dossier in the active campaign by exact ID or case-insensitive exact name match.

Inputs: name_or_id (required).

get_character_knowledgeB

Anti-metagaming lens: retrieve what a character knows, suspects, and blind spots without leaking unexposed truths.

Inputs: characterId (required), campaignId.

get_houseB

Retrieve house details by ID or name from the active campaign.

Inputs: name_or_id (required).

get_realm_recapC

Generate a summary recap of the active campaign realm state.

Inputs: no named parameters.

get_scene_briefingB

Director Engine: generate a dense, curated scene briefing before roleplay scenes. Computes cast cards, in-room relationships, grudges, atmosphere, and the Intrigue Matrix (active leverage, shared conspiracies, and anti-metagaming GM guardrails).

Inputs: characterIds (required), campaignId, locationName, povCharacterId, +1 more.

get_skillA

Retrieve the full playbook, tool sequence, and directives for a specific roleplay skill by ID.

Inputs: skillId (required).

get_threadB

Get details of a single plot thread in the active campaign by ID.

Inputs: id (required).

get_timeline_entryC

Retrieve a single timeline entry by ID from the active campaign.

Inputs: id (required).

get_tomeB

Retrieve a tome by ID or exact title from the active campaign.

Inputs: title_or_id (required).

list_campaignsA

List all campaign playthroughs stored in chronicle-mcp along with basic stats (character, event, thread, house counts) and active status.

Inputs: no named parameters.

list_charactersA

List summary cards for all characters in the active campaign, with optional filters for status (alive/dead/unknown), house, or tag.

Inputs: filter.

list_commandsA

List all available Chronicle MCP tools/commands grouped by category, with explanations, parameter descriptions, and example usages.

Inputs: category.

list_housesC

List noble houses in the active campaign.

Inputs: filter.

list_relationshipsB

List all relationship edges connected to a specific entity in the active campaign.

Inputs: entityId (required), entityType (required), includeSecrets.

list_secretsB

Query secrets with filters (status, severity, subject, knower) with names resolved for clean LLM readability.

Inputs: status, severity, subjectId, campaignId, +2 more.

list_skillsA

List all registered roleplay skill playbooks with key triggers, auto-prefetch behavior, and campaign scopes.

Inputs: campaignId, includeAllCampaigns.

list_threadsC

List plot threads in the active campaign.

Inputs: filter.

list_timelineA

List timeline events in the active campaign sorted descending by date/creation, with optional filters for tag or date search.

Inputs: limit, filter.

list_tomesB

List lore tomes in the active campaign with optional category, tag, reliability, or sourceType filter.

Inputs: filter.

log_timeline_eventB

Log a new event to the active campaign timeline and auto-sync notes to tagged characters in the active campaign.

Inputs: entry (required).

remove_relationshipB

Delete a relationship edge pair by ID from the active campaign.

Inputs: id (required).

resolve_threadC

Resolve a plot thread in the active campaign.

Inputs: id (required), resolutionNote (required).

route_skillB

Dynamically routes intent to the optimal roleplay skill cartridge, scores triggers with live campaign state boosts, and returns directives plus prefetched context in a single round-trip.

Inputs: intent (required), autoBrief, campaignId, characterIds, +3 more.

search_chronicleB

Perform a global search across active campaign records (characters, timeline, tomes, threads, houses, secrets).

Inputs: query (required), sections, includeSecrets.

set_active_campaignA

Switch the currently active campaign context for all subsequent tool calls.

Inputs: name_or_id (required).

update_realm_pulseB

Update campaign setting, current date, sort year anchor, era, active player character, or realmMood (atmosphere, stability, crises, smallfolk whispers).

Inputs: setting, addCrisis, realmMood, addWhisper, +7 more.

update_secret_knowledgeC

Atomic intrigue transition: Character learns, suspects, forgets, or exposes a secret.

Inputs: action (required), secretId (required), characterId (required), date, +3 more.

update_timeline_entryC

Update an existing timeline entry in the active campaign by ID.

Inputs: id (required), patch (required).

upsert_characterB

Create or update a character in the active campaign. Omit id to create a new character record.

Inputs: character (required).

upsert_houseC

Create or update a noble house in the active campaign.

Inputs: house (required).

upsert_secretC

Create or update a secret, hidden conspiracy, or leverage point in the active campaign.

Inputs: title (required), truth (required), id, date, +11 more.

upsert_threadC

Create or update a plot thread in the active campaign.

Inputs: thread (required).

upsert_tomeB

Create or update a lore tome in the active campaign. Omit id to create a new tome.

Inputs: tome (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 44 tools

    Disambiguation3/5

    Three redundant pairs exist: get_tome/find_tome_by_title, get_character/find_character_by_name, and get_house/find_house_by_name, where the get_* tools already accept exact titles/names, so an agent can easily pick the wrong one. Similarly, list_commands vs list_skills and the many upsert_* vs update_* tools have overlapping intents that rely on descriptions alone to separate.

    Naming Consistency4/5

    Nearly all 44 tools follow a snake_case verb_noun pattern (get_character, upsert_tome, delete_house, list_threads). The only wrinkle is inconsistent verb choice for creation: create_campaign, upsert_character, and log_timeline_event all mean 'make a new record', which is a minor deviation from an otherwise predictable scheme.

    Tool Count2/5

    At 44 tools this is well past the heavy threshold for what is essentially one domain (campaign state management). The per-entity surfaces (tomes, characters, houses, threads) multiply the same five operations across resources, and the redundant find_* lookups add count without adding capability.

    Completeness3/5

    Characters, houses, tomes, threads, and the timeline all have full list/get/upsert/delete coverage, which is good. But campaigns lack get-by-id, update, and delete (only create/set_active/list), and secrets have upsert/list but no get_secret or delete_secret, leaving real lifecycle gaps.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers