npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@unveil-gg/twine-mcp

v0.8.1

Published

MCP server for Twine interactive story authoring

Readme

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.

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

Building & bundling assets

build_story compiles with the Tweego compiler (downloaded and cached on first use). Drop image/audio/video/font files under src/ and they're bundled automatically as embedded passages — no manual base64 step needed:

  • src/ — passed to Tweego; anything dropped here (.twee, .css, .js, fonts, images, audio, video) gets compiled or bundled into the output HTML.
  • assets/ — left alone by the compiler; use this for files you want to reference by relative URL instead of embedding.

Asset bundling into Twine.image/Twine.audio/Twine.video passages is a SugarCube-specific feature — other formats skip them (see skippedAssets in the build_story response). A file whose name collides with an existing passage is also skipped rather than overwritten.

No prebuilt Tweego binary exists yet for Apple Silicon Macs (an upstream gap). Until twine-mcp ships its own build, run under Rosetta 2 or build Tweego yourself and point TWINE_MCP_TWEEGO_BIN at the binary.

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