Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Twine Mcp

FreeNot checked

MCP server for Twine interactive story authoring

GitHubEmbed

About

MCP server for Twine interactive story authoring

README

Twine MCP logo

Twine MCP

npm versionCIlicenseMCP compatible

MCP server for AI-assisted Twine interactive story authoring. Edits .twee files directly, provides build tooling to output playable HTML, and can export stories for visualization in the Twine GUI.

Works with Cursor, Claude Code, Claude Desktop, and Codex CLI.


Setup

npm install -g @unveil-gg/twine-mcp
twine-mcp setup

The wizard asks for your workspace directory, picks your editor, and writes the MCP config — no manual JSON editing.

Restart your editor when done. Ask your AI to run ping to confirm.

Manual config

Add to your editor's MCP config (~/.cursor/mcp.json, ~/.claude.json, etc.):

{
  "mcpServers": {
    "twine": {
      "command": "twine-mcp",
      "env": {
        "TWINE_PROJECT": "/Users/yourname/Documents/games"
      }
    }
  }
}

TWINE_PROJECT can point to a single game folder or a workspace containing multiple games. The server discovers all projects automatically, and supports multiple workspace roots at once — including the folder open in your editor. See DEVELOPMENT.md for details.


Tools

Category Tools
Stories list_stories, get_story, create_story, delete_story, export_twee
Passages list_passages, get_passage, create_passage, update_passage, delete_passage, rename_passage, set_start_passage, batch_update
CSS get_stylesheet, update_stylesheet
Graph get_link_graph, find_broken_links, find_dead_ends, find_orphans, find_cycles, get_passage_path, get_reachable_passages
Analysis analyze_story, get_story_stats, search_passages, find_variable_usage, check_tag_consistency
Narrative summarize_story, get_story_context, get_narrative_flow, get_all_endings, get_passage_context, get_story_branches
Project create_project, build_story, validate_story, import_from_twine, export_for_twine, move_passage, list_files
Formats list_story_formats, get_format_info, get_format_syntax_guide
Refactor split_passage, merge_passages
Utility ping, get_config, list_workspace_roots, rescan_workspace

MCP Resources: twine://stories, twine://story/{name}, twine://story/{name}/graph, twine://story/{name}/summary

Recommended AI workflow

ping → summarize_story → get_story_context → get_story_branches
     → get_narrative_flow → get_passage_context → get_all_endings

Start cheap (summarize_story ≈ 200 tokens), go deeper only when needed.


Contributing & development

from github.com/Unveil-gg/twine-mcp

Install Twine Mcp in Claude Desktop, Claude Code & Cursor

Recommended · one command, every IDE
unyly install twine-mcp

Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.

First time? Get the CLI: curl -fsSL https://unyly.org/install | sh

Or configure manually

Run in your terminal:

claude mcp add twine-mcp -- npx -y @unveil-gg/twine-mcp

FAQ

Is Twine Mcp MCP free?

Yes, Twine Mcp MCP is free — one-click install via Unyly at no cost.

Does Twine Mcp need an API key?

No, Twine Mcp runs without API keys or environment variables.

Is Twine Mcp hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Twine Mcp in Claude Desktop, Claude Code or Cursor?

Open Twine Mcp on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Twine Mcp with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All ai MCPs