Getting Started
Prerequisites
Section titled “Prerequisites”- Node.js 20+ — check with
node --version - Anthropic API key — get one at console.anthropic.com
Install
Section titled “Install”Install globally for the claude-rpg command:
npm install -g claude-rpgOr run directly without installing:
npx @mcptoolshop/claude-rpg play --world fantasySet your API key
Section titled “Set your API key”Claude RPG reads your key from the ANTHROPIC_API_KEY environment variable. It’s never stored, logged, or transmitted beyond the Anthropic API.
# Linux/macOSexport ANTHROPIC_API_KEY=sk-ant-...
# Windows (PowerShell)$env:ANTHROPIC_API_KEY = "sk-ant-..."
# Windows (cmd)set ANTHROPIC_API_KEY=sk-ant-...Play your first game
Section titled “Play your first game”Launch play mode and choose a world interactively:
claude-rpg playYou’ll be presented with a menu of starter worlds and then guided through character creation (name, archetype, background, traits, disciplines, and stat allocation). Once creation is complete, the game begins with a narrated opening scene. Type anything — explore, talk to NPCs, pick up items, fight, negotiate, sneak. Claude interprets your freeform text and the engine resolves what happens.
For faster campaign pacing, add the --fast flag:
claude-rpg play --fastAvailable starter worlds
Section titled “Available starter worlds”The interactive world selector offers twelve worlds, grouped by difficulty:
| World | Genre | --world alias |
|---|---|---|
| Chapel Threshold | Mountain monastery under siege (fantasy) | fantasy |
| Neon Lockbox | Corporate arcology where data is currency (cyberpunk) | cyberpunk |
| Iron Colosseum | Blood, sand, and freedom bought bout by bout (gladiator) | gladiator |
| Crimson Court | Candlelit vampire politics (vampire) | vampire |
| Gaslight Detective | Victorian conspiracy reaching the crown (detective) | detective |
| Black Flag Requiem | Dying pirate republic (pirate) | pirate |
| Ashfall Dead | Post-outbreak survival colony (zombie) | zombie |
| Dust Devil’s Bargain | Supernatural frontier town (weird-west) | weird-west |
| Jade Veil | A masterless blade in a crumbling shogunate (ronin) | ronin |
| Signal Loss | Deep space colony that lost Earth contact (colony) | colony |
| Salt Road Ledger | Merchant campaign where every debt is a knife (mercantile) | merchant |
| Hue and Cry | A thief-taker in a city with no police force (pursuit) | bounty-hunter |
Already know where you’re headed? Skip the menu:
claude-rpg play --world gladiatorAn unknown world name exits with the valid list — nothing interactive starts.
Generate a custom world
Section titled “Generate a custom world”Don’t want a starter world? Generate one from any text prompt:
claude-rpg new "A flooded gothic trade city ruled by three merchant houses"World generation uses Claude Opus for quality. The engine builds factions, NPCs, districts, items, and relationships from your prompt.
Save and load
Section titled “Save and load”Games auto-save. To resume a previous session:
claude-rpg loadSave files live in ~/.claude-rpg/saves/.