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

@archtocode/bridge

v1.0.6

Published

ArchToCode local bridge + MCP adapter

Readme

ArchToCode Bridge

Local CLI bridge and MCP adapter for ArchToCode. It lets you:

  • Generate Mermaid diagrams from local code without uploading your repo.
  • Connect the ArchToCode web app to a local AI CLI (Claude, Gemini, Ollama, OpenAI).
  • Expose ArchToCode prompts to MCP clients (Claude Code) and push results back to the browser.

What It Is

The package ships two main pieces:

  1. Bridge server (HTTP + WebSocket): receives diagram generation requests and streams results back to the browser.
  2. MCP adapter (stdio): exposes tools like archtocode_list_prompts and archtocode_generate_diagram to MCP clients.

Install

npm install -g @archtocode/bridge

Quick Start (Web App)

  1. Start the bridge in your repo:
archtocode start --provider claude --repo .
  1. The bridge prints a handshake token. In the web app:
  • Open archtocode.com
  • Go to Prompts > AI Model Settings > Local / CLI
  • Click Connect and paste the token
  1. Click any prompt in the left sidebar. The request is handled locally.

Quick Start (MCP / Claude Code)

  1. Start the bridge:
archtocode start --provider claude --repo .
  1. Start the MCP adapter (stdio):
archtocode mcp
  1. Configure your MCP client (Claude Code) to run archtocode mcp. The adapter uses the stored handshake token from ~/.archtocode/bridge.json.

Commands

archtocode start

Start the local bridge server.

Options:

  • --port <number>: port to listen on (default 49321)
  • --provider <name>: default CLI provider (default claude)
  • --model <name>: default model name for the provider
  • --repo <path>: project path to index (default current directory)

Example:

archtocode start --provider claude --model sonnet --repo .

archtocode mcp

Start the MCP adapter (stdio). It reads bridge config from: ~/.archtocode/bridge.json

Options:

  • --bridge-url <url>: override bridge URL (default http://127.0.0.1:<port>)
  • --token <token>: override handshake token

archtocode doctor

Check prerequisites and CLI availability.

archtocode status

Print bridge status (must be running).

archtocode stop

Request graceful shutdown.

archtocode logs

Shows guidance on where logs are written.

MCP Tools Exposed

When archtocode mcp is running, MCP clients can call:

  • archtocode_list_prompts - list available diagram prompts
  • archtocode_get_prompt - fetch prompt details by ID
  • archtocode_generate_diagram - generate Mermaid via local bridge
  • archtocode_push_result - push Mermaid back to the web app

Configuration

The bridge stores its config here: ~/.archtocode/bridge.json

Environment overrides for MCP:

  • ARCHTOCODE_BRIDGE_URL
  • ARCHTOCODE_BRIDGE_TOKEN

Troubleshooting

posix_spawnp failed on macOS

The postinstall script fixes node-pty helper permissions. If you still see it:

npm install -g @archtocode/bridge

EMFILE: too many open files, watch

Increase file descriptor limit:

ulimit -n 65536

MCP crashes with Cannot read properties of null (reading '_zod')

Update to @archtocode/[email protected] or newer.

Web app returns ANSI/TUI garbage instead of Mermaid

Update to @archtocode/[email protected] or newer. The bridge runs Claude in non-interactive print mode and strips ANSI before Mermaid extraction.

About ArchToCode

ArchToCode (archtocode.com) is a web app for generating and exploring Mermaid diagrams from code. It provides:

  • 30+ prompt templates and 16 diagram types
  • GitHub and local repository integration
  • Diagram rendering, zoom/pan, node inspection, and export
  • Local / CLI integration for private, offline-capable analysis

The bridge is the local companion to the web app. Use it when you want private generation with your own local AI CLI.