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

margin-paper-mcp

v0.3.0

Published

Connect Claude Code, Codex and other agents to a Margin project (MCP), and sync a local copy with the margin command

Downloads

430

Readme

margin-paper-mcp

Connect Claude Code, Codex, Cursor or any MCP client to a Margin project, the open-source collaborative LaTeX workspace.

Your agent works on the live paper like a co-author, with nothing to download or push. It can:

  • read and search
  • edit text, create and rewrite files, add sections, create documents and folders, move and delete files
  • suggest edits and comment
  • compile
  • see, claim and update board tasks
  • answer review comments
  • save named versions
  • work with the workspace reference library, shared by all your projects:
    • add papers by DOI, BibTeX or title
    • fetch free PDFs, or say where to download paywalled ones, then attach the file you downloaded (attach_pdf ~/Downloads/paper.pdf)
    • read and search a paper's full text, and keep summary notes on it
    • report what each document cites, used to cite, or only lists in its bibliography

Co-authors see it working live ("Claude Code for Alice") with its own cursor. A project setting (Share → AI agents) decides whether edits go straight in or arrive as suggestions to accept. Everything an agent changed can be undone in one step from its avatar.

Setup

Create an access token in Margin → Local, then:

# Claude Code, inside a git clone of the project (server and project come from the git remote)
claude mcp add margin -e MARGIN_TOKEN=mgn_… -- npx -y margin-paper-mcp

# Anywhere
claude mcp add margin -e MARGIN_TOKEN=mgn_… -- npx -y margin-paper-mcp --url https://paper.example.com --project my-paper-1a2b3c

Codex (~/.codex/config.toml):

[mcp_servers.margin]
command = "npx"
args = ["-y", "margin-paper-mcp", "--url", "https://paper.example.com", "--project", "my-paper-1a2b3c"]
env = { MARGIN_TOKEN = "mgn_…" }

Options: --url / MARGIN_URL, --project / MARGIN_PROJECT, --token / MARGIN_TOKEN, --name / MARGIN_AGENT_NAME (the name co-authors see; detected from the client otherwise).

margin: a local folder without git

The package also installs a margin command for people who want the files on their computer but don't use git:

npx -y -p margin-paper-mcp margin clone https://paper.example.com/#/p/my-paper-1a2b3c   # asks for the token once
cd My-Paper
# …edit…
npx -y -p margin-paper-mcp margin sync      # send your changes, get everyone else's
npx -y -p margin-paper-mcp margin status    # what changed here; is Margin newer?

If you and someone else changed the same lines, sync stops and explains how to pick a version. margin sync --keep-both sends both versions instead, so anyone can pick one with a click in Margin's editor. Git runs underneath, so the folder is an ordinary clone.

License: AGPL-3.0-or-later.