Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

MCP Server Reference

Technical reference for Mimir’s Model Context Protocol (MCP) server — the sidecar that enables AI assistant integration.

Architecture

The MCP server (mimir-mcp) runs as a Tauri sidecar process. It connects to the same SQLite database as the main app and exposes 54 tools across 8 categories.

Components

  • Binary: mimir-mcp (built to crates/mimir/binaries/mimir-mcp-{target-triple})
  • Protocol: MCP over stdio
  • Database: Shared SQLite database (same file the desktop app uses; default location varies by platform — see below)
  • Plugin: Claude Code plugin at crates/mimir-mcp/plugin/

Configuration

The database path is resolved from the MIMIR_DATABASE_PATH environment variable, falling back to a platform default:

PlatformDefault database path
macOS~/Library/Application Support/com.mimir.app/data/mimir.db
Linux$XDG_DATA_HOME/com.mimir.app/data/mimir.db (falls back to ~/.local/share/com.mimir.app/data/mimir.db when XDG_DATA_HOME is unset)
WindowsNo default — MIMIR_DATABASE_PATH must be set

See Environment Variables for details.

Errors

Most tools operate on an active campaign. Until a campaign is selected with set_active_campaign, campaign-scoped tools return a NoActiveCampaign error (No active campaign. Use set_active_campaign first.). The active campaign is held in memory per server process — it is not persisted, so each new server process starts with no campaign selected.

Tool Reference

Campaign Management (10 tools)

ToolDescription
list_campaignsList all available campaigns
set_active_campaignSet the active campaign (required by most tools)
get_campaign_detailsGet campaign info including modules and characters
get_campaign_sourcesGet enabled source books for a campaign
create_campaignCreate a new campaign
update_campaignUpdate campaign name or description
delete_campaignDelete a campaign and all its data
export_campaignExport campaign as shareable archive
import_campaignImport campaign from archive
preview_archivePreview archive contents without importing

Module Management (8 tools)

ToolDescription
create_moduleCreate new module in active campaign
list_modulesList all modules in active campaign
get_module_detailsGet module info including documents, monsters, items
update_moduleUpdate module name or description
delete_moduleDelete module and all contents
add_monster_to_moduleAdd monster from catalog or homebrew to module
remove_monster_from_moduleRemove monster from module
add_item_to_moduleAdd catalog item as loot to module

Document Management (6 tools)

ToolDescription
list_documentsList campaign-level or module-level documents
read_documentRead full content of a document
create_documentCreate document (backstory, read_aloud, dm_notes, description, custom)
edit_documentEdit document using search and replace
delete_documentDelete a document
reorder_documentReorder documents by swapping sort positions

Character Management (13 tools)

ToolDescription
list_charactersList characters with optional filters (type, module, location, faction)
get_characterGet detailed character info including classes and inventory
create_characterCreate NPC or PC (auto-populates proficiencies from catalog)
edit_characterUpdate ability scores, currency, race, background, traits
delete_characterDelete character and all associated data
level_up_characterLevel up character (handles HP, multiclass, ASI/feats, spells)
add_item_to_characterAdd catalog item to character inventory
remove_item_from_characterRemove item from character inventory
update_character_inventoryUpdate item quantity, equipped, or attuned state
get_character_inventoryGet inventory (filterable by equipped/attuned)
add_character_spellAdd spell to character’s known spells
remove_character_spellRemove spell from character
list_character_spellsList character’s known spells (filterable by class/prepared)

Map Management (8 tools)

ToolDescription
create_mapUpload UVTT file to create new map
list_mapsList maps (optionally filtered by module)
get_mapGet map details including token placements
update_mapUpdate map metadata (name, description, lighting)
delete_mapDelete map and associated UVTT asset
add_token_to_mapAdd monster or NPC token to map
list_tokens_on_mapList all tokens (optionally visible only)
remove_tokenRemove token placement from map

Map Generation (3 tools)

ToolDescription
generate_mapGenerate Dungeondraft map from YAML config or biome preset
list_map_presetsList available biome presets
validate_map_configValidate YAML config without generating

Catalog Search (1 tool)

A single search_catalog tool searches all catalog categories.

ToolDescription
search_catalogSearch the D&D 5e catalog by category

Parameters:

ParameterTypeDescription
categorystring (required)One of: monster, item, spell, race, class, background, feat, condition
namestringSearch by name (partial match)
limitintegerMaximum results (default: 20)
cr_min / cr_maxnumberChallenge rating range (monsters only)
monster_typestringCreature type, e.g. undead, dragon (monsters only)
include_homebrewbooleanInclude homebrew monsters from the active campaign (monsters only, default: true)
raritystringcommon, uncommon, rare, very rare, legendary, artifact (items only)
item_typestringe.g. weapon, armor, wondrous item (items only)
levelintegerSpell level, 0 for cantrips (spells only)
schoolstringSchool of magic, e.g. evocation (spells only)
class_namestringFilter by class spell list (spells only)

Results are filtered to the active campaign’s enabled sources when a campaign is set.

Homebrew Content (5 tools)

Homebrew items, monsters, and spells share a unified tool set. Every call takes a content_type parameter: item, monster, or spell.

ToolDescription
list_homebrewList homebrew content of one type in the active campaign
get_homebrewGet a homebrew entry by ID
create_homebrewCreate new homebrew, or clone from the catalog with cloned_from_name + cloned_from_source
update_homebrewUpdate a homebrew entry
delete_homebrewDelete a homebrew entry by ID

create_homebrew parameters:

ParameterTypeDescription
content_typestring (required)item, monster, or spell
namestring (required)Name of the homebrew content
datastringJSON string with content data. Required when not cloning; when cloning, fields here override the catalog data
item_typestringItems only: weapon, armor, potion, ring, rod, scroll, staff, wand, wondrous item, adventuring gear
raritystringItems only: common, uncommon, rare, very rare, legendary, artifact
crstringMonsters only, e.g. 1/4, 1, 5, 20
creature_typestringMonsters only, e.g. humanoid, dragon, undead
sizestringMonsters only: T, S, M, L, H, G
levelintegerSpells only: 0 for cantrip, 1–9
schoolstringSpells only, e.g. evocation, necromancy
cloned_from_namestringCatalog entry to clone from; must be used with cloned_from_source
cloned_from_sourcestringSource book of the cloned entry (e.g. PHB, DMG, MM)

Claude Code Plugin

For installation and setup, see the AI Assistant How-To.

Slash Commands

CommandDescription
/mimir-campaignsList all available campaigns
/create-moduleCreate a new module in the active campaign
/search-monstersSearch the D&D monster catalog
/search-spellsSearch the D&D spell catalog
/generate-mapGenerate a procedural Dungeondraft map

Skills

SkillDescription
/mimir-dmGeneral campaign management
/encounter-balanceAnalyze encounter difficulty
/loot-auditAudit treasure distribution
/session-prepPre-session readiness review
/continuity-checkFind contradictions across documents
/npc-networkMap NPC relationships
/pressure-testStress-test scenarios
/mapgenCreative direction for map generation

See Also