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

claude-twine-bridge

v0.1.0

Published

MCP server that lets Claude directly author and manipulate Twine 2 interactive fiction stories

Readme

claude-twine-bridge

MCP server for authoring Twine 2 interactive fiction stories through Claude. Supports Harlowe, SugarCube, Chapbook, and Snowman story formats with full read/write for both Twine 2 HTML and Twee 3.

Install

npm install -g claude-twine-bridge

Or run directly with npx (no install needed):

npx claude-twine-bridge

Claude Desktop Setup

Add the server to your Claude Desktop config:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Windows (Store): %LOCALAPPDATA%\Packages\Claude_<id>\LocalCache\Roaming\Claude\claude_desktop_config.json

Using npx (recommended — always up to date):

{
  "mcpServers": {
    "twine": {
      "command": "npx",
      "args": ["-y", "claude-twine-bridge"]
    }
  }
}

Using a global install:

{
  "mcpServers": {
    "twine": {
      "command": "claude-twine-bridge"
    }
  }
}

Using a local clone:

{
  "mcpServers": {
    "twine": {
      "command": "node",
      "args": ["/absolute/path/to/claude-twine2/dist/index.js"]
    }
  }
}

Restart Claude Desktop after saving.

Auto-Save

Stories are automatically persisted to disk on every change (create, edit, delete passage, etc.). On startup, any previously saved stories are reloaded. This means stories survive across Claude Desktop sessions without needing to explicitly export.

Default save location: stories/ directory next to the installed package

Override with the TWINE_SAVE_DIR environment variable:

{
  "mcpServers": {
    "twine": {
      "command": "node",
      "args": ["/absolute/path/to/claude-twine2/dist/index.js"],
      "env": {
        "TWINE_SAVE_DIR": "/path/to/your/stories"
      }
    }
  }
}

Tools

| Tool | Description | |------|-------------| | create_story | Create a new story with a given format | | list_stories | List all stories (persisted across sessions) | | get_story | Get full story data as JSON | | delete_story | Remove a story from the session | | add_passage | Add a passage with [[link]] syntax | | edit_passage | Edit passage text, name, or tags | | read_passage | Read a single passage | | list_passages | List all passages and their connections | | delete_passage | Remove a passage | | set_start | Set the starting passage | | get_story_map | Show passage graph with dead ends, orphans, and broken links | | validate_story | Check for broken links, empty passages, orphans, reachability | | search_passages | Search by text, name, tags, or link targets across stories | | story_statistics | Word counts, branching factor, depth, tag usage | | rename_story | Rename a story (updates save file on disk) | | merge_stories | Combine passages from one story into another | | add_passages_batch | Add multiple passages in one call | | clone_passage | Duplicate a passage, optionally to another story | | move_passage | Move a passage between stories | | export_html | Save as Twine 2 HTML | | export_twee | Save as Twee 3 | | import_story | Load a .html or .twee file from disk | | import_story_from_text | Load from raw text content | | convert_format | Convert between HTML and Twee 3 |

Development

npm run dev      # ts-node-dev with hot reload
npm run build    # compile to dist/
npm start        # run compiled server

Security

This server reads and writes files at paths specified during tool calls. It runs locally over stdio and has no network exposure. As with any MCP server, the user is responsible for reviewing tool invocations in Claude Desktop before approving them.

License

MIT