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

jj-mcp

v1.0.8

Published

MCP server for the Jujutsu (jj) version control system — expose jj commands as MCP tools and resources

Downloads

47

Readme

Jujutsu MCP Server

A Model Context Protocol (MCP) server for the Jujutsu version control system. Exposes jj commands as MCP tools so AI assistants can read and manipulate jj repositories directly.

Requirements

  • Node.js 26.2.0+
  • jj CLI 0.4+ installed and in PATH

Installation

npm install -g jj-mcp

Or run without installing:

npx jj-mcp

Client Configuration

Add to your MCP client config. All clients use the same JSON shape:

{
  "mcpServers": {
    "jj": {
      "command": "jj-mcp"
    }
  }
}

| Client | Config file | |--------|-------------| | Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) | | Windsurf | ~/.codeium/windsurf/mcp_config.json | | Cursor | ~/.cursor/mcp.json | | Cline | MCP settings in VS Code extension |

For a local build, point command at the compiled binary instead:

{
  "mcpServers": {
    "jj": {
      "command": "node",
      "args": ["/path/to/jj-mcp/dist/index.js"]
    }
  }
}

Available Tools

Core

| Tool | Description | |------|-------------| | jj_status | Working copy status | | jj_log | Commit history (supports revset expressions) | | jj_diff | Show differences | | jj_describe | Edit commit message | | jj_commit | Create commit from working copy | | jj_new | Create new empty commit | | jj_abandon | Remove a commit | | jj_rebase | Rebase commits | | jj_squash | Combine commits | | jj_split | Split a commit | | jj_undo | Undo last operation | | jj_redo | Redo undone operation | | jj_restore | Restore files from a revision | | jj_edit | Set working copy to a revision | | jj_next | Move to next child revision | | jj_prev | Move to previous parent revision |

Bookmarks

| Tool | Description | |------|-------------| | jj_bookmark_list | List bookmarks | | jj_bookmark_create | Create bookmark | | jj_bookmark_delete | Delete bookmark |

Git Integration

| Tool | Description | |------|-------------| | jj_git_fetch | Fetch from a Git remote | | jj_git_push | Push to a Git remote | | jj_git_import | Import Git refs into jj | | jj_git_export | Export jj changes to Git | | jj_git_clone | Clone a Git repo and initialize jj |

Operations & History

| Tool | Description | |------|-------------| | jj_obslog | Obslog for a revision (mutation history) | | jj_op_log | Operation log | | jj_bisect | Binary search for regressions, e.g. jj_bisect({range: "v1.0..main"}) |

Files & Tags

| Tool | Description | |------|-------------| | jj_file_show | Show file contents at a revision | | jj_tag_list | List tags | | jj_tag_create | Create a tag |

Workspaces & Config

| Tool | Description | |------|-------------| | jj_workspace_list | List workspaces | | jj_workspace_add | Add a workspace | | jj_config_get | Get a config value | | jj_config_set | Set a config value | | jj_sparse | Manage sparse checkout patterns | | jj_init | Initialize a new jj repo | | jj_sanity_check | Verify jj is installed and repo is valid |

Available Resources

Resources provide read-only repository state without a tool call:

| URI | Description | |-----|-------------| | jj://status | Working copy status | | jj://log/recent | Recent commits (default limit: 10) | | jj://bookmarks | All bookmarks | | jj://config | Repository configuration |

All URIs accept a cwd query parameter, and jj://log/recent also accepts limit:

jj://log/recent?cwd=/path/to/repo&limit=20

Revset Expressions

All tools that accept a revset parameter support jj's revision syntax:

| Expression | Meaning | |------------|---------| | @ | Working copy | | @- | Parent of working copy | | main | Bookmark named "main" | | ::main | All ancestors of main | | main..@ | Commits between main and working copy |

Safety Features

Pre-Execution Confirmation Gate

Dangerous operations require explicit confirmation before execution. This prevents accidental data loss or repository corruption.

Affected tools: jj_abandon, jj_rebase, jj_squash, jj_split, jj_restore, jj_edit, jj_git_push, jj_git_export, jj_bookmark_delete, jj_config_set, jj_sparse (with remove)

How it works:

  1. Elicitation mode (clients that support it): A confirmation dialog appears describing the risk. Accept to proceed.

  2. Token fallback (all other clients): The tool returns a PRE-EXECUTION WARNING and refuses to execute. To proceed, re-call the tool with the same arguments plus confirmed: true:

    {
      "name": "jj_abandon",
      "arguments": {
        "revset": "abc123",
        "confirmed": true
      }
    }

Additional hard blocks: Some commands have mandatory safety checks that cannot be bypassed:

  • jj_abandon requires a non-empty revset
  • jj_rebase requires both source and destination
  • jj_restore requires at least one of paths, from, or to

Troubleshooting

jj command not found — ensure jj is on your PATH:

which jj && jj --version

Verify the server:

jj-mcp --check   # checks jj is found and cwd is a jj repo
jj-mcp --version

Large output — the server uses a 10 MB buffer. For very large diffs or logs, use the limit parameter.