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

@lineadraw/mcp

v0.7.0

Published

MCP server + in-chat viewer (MCP App) for Linea CAD documents.

Readme

@lineadraw/mcp

MCP server for Linea CAD documents, with the full Linea editor in chat (MCP Apps extension): the agent creates and edits documents through tools and opens them as a fully interactive editor directly in the conversation — you can draw, snap, dimension, and edit, and your changes flow back into the same document the agent's tools operate on.

Requires Node.js >= 20.

Use with an MCP client (stdio)

Add to your client's MCP configuration (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "lineadraw": {
      "command": "npx",
      "args": ["-y", "@lineadraw/mcp", "--stdio"]
    }
  }
}

Claude Code:

claude mcp add linea -- npx -y @lineadraw/mcp --stdio

Use as an HTTP connector

Without --stdio the server speaks streamable HTTP on http://localhost:3001/mcp (PORT overrides):

npx -y @lineadraw/mcp

Claude (web and Desktop) requires an https connector URL. Two options:

Tunnel (no account, URL changes each run, briefly internet-reachable):

npx cloudflared tunnel --url http://localhost:3001

Local TLS with mkcert (nothing leaves your machine; the mkcert CA lands in the Windows/macOS trust store, which Claude Desktop honors):

mkcert -install
mkcert localhost
$env:TLS_CERT="localhost.pem"; $env:TLS_KEY="localhost-key.pem"; npx -y @lineadraw/mcp

Settings → Connectors → Add custom connector → the https URL + /mcp (e.g. https://localhost:3001/mcp). The MCP endpoint answers on / too.

All MCP sessions in one server process share the open documents, so a reconnecting client keeps its work.

Tools

linea_new_document · linea_open_document · linea_save_document · linea_add_objects (model space or layout) · linea_update_objects (per-id patches) · linea_remove_objects · linea_transform (move/rotate/scale/mirror/copy/array; degrees) · linea_query (filtered read, optional measurements) · linea_list_layers · linea_layer (add/update/remove/set-current) · linea_create_layout · linea_update_layout · linea_remove_layout · linea_set_dim_style · linea_set_text_style · linea_render (svg/png snapshot) · linea_undo · linea_redo · linea_summary · linea_get_document · linea_replace_document (full-state save used by the in-chat editor) · linea_export (svg/png/pdf/dxf/dwg) · linea_show_document — opens the in-chat editor.

Documents are plain .linea files (zod-validated JSON); units are millimeters, Y-up, angles in radians. For scripted/batch editing without an agent in the loop, the same engine is available as a Node SDK: @lineadraw/sdk.

The in-chat editor

The package bundles the real @lineadraw/editor (React + Tailwind v4 + Inter) into ONE self-contained editor.html (~8 MB) — the sandboxed iframe's CSP allows no external assets. linea_show_document renders it with the document pushed as the tool result. Committed edits are debounced into linea_replace_document, so the conversation's granular tools and the interactive editor share one source of truth (the server registry). Foreign changes (the agent's tool calls) are detected by revision polling and remount the editor with the camera restored.

Sizing: the app reports a real content height (720px inline) through the protocol's auto-resize and fills the frame under the host's fullscreen display mode. Placement is the host's decision — the protocol offers inline | fullscreen | pip only, so a persistent "panel right of the chat" isn't requestable today.

In-chat caveat: disk-oriented menu items (Open/Save As) are limited by the iframe sandbox — save through the conversation via linea_save_document.

Ecosystem

  • Linea editor — the browser CAD app; documents are the same .linea files.
  • @lineadraw/sdk — the same engine as a Node API for scripts and batch tooling.
  • lineadraw — typings + CLI for authoring block/command marketplace repositories (npm create lineadraw).
  • lineadraw/lineadraw — the public collection: real blocks/commands, agent skill, guides.