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

arch-viz-mcp

v0.4.0

Published

MCP server bridging stdio to the Architecture Visualization Convex backend. CLI subcommands (scan-imports / scan-orphans / scan-drift) keep the canvas strictly in sync with code. v0.3.0 added dependency / navigation / data-flow edge inference plus link_no

Readme

@arch-viz/mcp-server

Local stdio MCP server that lets AI agents (Claude Code, Codex, Cursor) read and update an Arch Viz canvas as they work — plus CLI subcommands for keeping the canvas strictly in sync with the codebase.

One server instance is bound to exactly one project. Configure each MCP client that should write to that project to launch this server with the project's environment variables.

Two modes

1. stdio MCP server (default — no args)

npx -y arch-viz-mcp

AI agents call the tools below over MCP. This is what your editor wires up.

2. CLI subcommands (Sprint 2)

npx -y arch-viz-mcp scan-imports   # auto-link imports of every linked file
npx -y arch-viz-mcp scan-orphans   # surface repo source files not linked yet
npx -y arch-viz-mcp scan-drift     # find linked files that disappeared on disk

Run from the repo root. Each subcommand reuses the same ARCHITECTURE_* env vars as the stdio mode. scan-orphans and scan-drift push a snapshot to the project — view results at /canvas/<projectId>/orphans and in the node modal's Drift tab.

Tools exposed

| Tool | Purpose | | ---------------------- | ----------------------------------------------------------------------- | | list_nodes | Read current canvas state. Call first so the AI knows what exists. | | get_node | Drill into one node — description, linked files, kanban tasks, metadata. | | create_node | Create a page or feature node. Optional parentId, files, position. | | update_node | Partial update: name, description, position, metadata (route / apiPaths). | | delete_node | Cascade-delete a node, its children, files, kanban, and activity log. | | link_files | Attach one or more file paths to a node (dedupes against existing). | | link_nodes | Manually classify an edge (dependency / navigation / data_flow) between two nodes — for cross-language relations the import scanner cannot see. | | unlink_nodes | Remove a manually-classified edge. Hierarchy edges are not removable here (they follow parentId). | | lookup_files | Bulk-classify paths as linked or unlinked against the project. Used by the post-commit hook to surface unlinked files in .arch-viz/suggestions.json. | | add_kanban_task | Add a task to a node's kanban (status: todo / doing / done). | | update_kanban_status | Move a task across columns; auto-positions to bottom of destination. | | log_activity | Append a free-form activity log entry attributing the change to actor.|

Install

Published on npm — no clone needed:

npx -y arch-viz-mcp

For local development from a checkout, build with pnpm --filter arch-viz-mcp build; the entrypoint is apps/mcp-server/dist/index.js.

Configuration

Three environment variables are required:

| Variable | Value | | -------------------------- | -------------------------------------------------------------------------------- | | ARCHITECTURE_CONVEX_URL | Deployment HTTP URL — must end in .convex.site (NOT .convex.cloud) | | ARCHITECTURE_API_KEY | Token starting with archv_, generated at /settings/tokens in the web app | | ARCHITECTURE_PROJECT_ID | Convex project id (visible in the canvas URL: /canvas/<projectId>) |

Why .convex.site? Convex serves HTTP Actions (what this server calls) on a different subdomain than the main client API. .convex.cloud will return 404 for every request.

Claude Code (claude.ai/code)

Add to your MCP settings via the Claude Code UI, or directly to ~/.claude.json (mcpServers section):

{
  "mcpServers": {
    "arch-viz": {
      "command": "npx",
      "args": ["-y", "arch-viz-mcp"],
      "env": {
        "ARCHITECTURE_CONVEX_URL": "https://your-deployment.convex.site",
        "ARCHITECTURE_API_KEY": "archv_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        "ARCHITECTURE_PROJECT_ID": "jXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      }
    }
  }
}

Replace URL, key, and project id with your own values. npx -y downloads arch-viz-mcp from the npm registry on first run and caches it.

Codex CLI

Edit ~/.codex/mcp.json:

{
  "mcpServers": {
    "arch-viz": {
      "command": "npx",
      "args": ["-y", "arch-viz-mcp"],
      "env": { "ARCHITECTURE_CONVEX_URL": "…", "ARCHITECTURE_API_KEY": "…", "ARCHITECTURE_PROJECT_ID": "…" }
    }
  }
}

Cursor

Settings → MCP → Add Server, same shape as above.

Pin a version

npx -y [email protected] locks to a specific release if you want reproducibility instead of always-latest.

Verify it works

After configuring, restart your MCP client. From inside a session, ask the AI:

"List all nodes in the Arch Viz canvas."

The AI should call list_nodes and return the current nodes. Watch the canvas in a browser — anything the AI creates, updates, or deletes shows up live.

Troubleshooting

| Symptom | Likely cause | | ------------------------------------------------ | ----------------------------------------------------------------------------------------------- | | Startup error: ARCHITECTURE_CONVEX_URL points to …convex.cloud … | URL has the wrong subdomain. Replace .convex.cloud with .convex.site. | | Startup error: prefix "archv_" | Token was pasted incomplete or the wrong value was copied. Regenerate at /settings/tokens. | | [unauthorized] Missing or invalid API token. | Token revoked or never existed. Generate a fresh one. | | [forbidden] Node not in token scope. | The token belongs to a different project than the node being modified. Check ARCHITECTURE_PROJECT_ID. | | AI never calls any tool | The MCP server didn't connect. Check the AI's MCP panel for connection state; restart the client. | | Logs from the server clobbering JSON-RPC output | The server logs to stderr only — never stdout. If you see message corruption, something else (a wrapper script?) is writing to stdout. |

Security

  • Tokens are bearer secrets. Treat them like passwords.
  • Each token is scoped to a single project; do not share across projects.
  • Revoke unused tokens at /settings/tokens. Revocation is immediate — running MCP clients will start receiving unauthorized errors.
  • The raw token is shown once on creation. If lost, revoke and create a new one.

Development

# Run from source (no build step) with stdio
pnpm --filter @arch-viz/mcp-server dev

# Run unit tests
pnpm vitest run apps/mcp-server/

For end-to-end smoke testing without an MCP client, pipe JSON-RPC frames to stdin manually:

printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"smoke","version":"0"}}}' \
  '{"jsonrpc":"2.0","method":"notifications/initialized"}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"list_nodes","arguments":{}}}' \
  | ARCHITECTURE_CONVEX_URL=https://…convex.site ARCHITECTURE_API_KEY=archv_… ARCHITECTURE_PROJECT_ID=… \
    node apps/mcp-server/dist/index.js