jj-mcp-server

v1.0.1
jj-mcp-server Checked 6 hours ago Published 1 year ago

Model Context Protocol (MCP) server for the Jujutsu (jj) version control system

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

status

Show the high-level status of the Jujutsu (jj) repository, including the working copy commit, parent commits, and a summary of changes. Useful for getting an overview of the current state of your repository. Parameters: repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
repoPathstring

rebase

Rebase one or more revisions onto a different parent revision in a Jujutsu (jj) repository. Commonly used to move changes to a new base or to clean up commit history. Parameters: source (Revisions to rebase, e.g., '@-'), destination (Destination revision, e.g., 'main'), repoPath (Optional repo path), cwd (Optional working directory to run the command in).

ParameterTypeDescription
destination *string
source *string
cwdstring
repoPathstring

commit

Update the current change with the specified message in a Jujutsu (jj) repository and then create and move to a new, empty change. This set of actions is jj's closest analog to committing in a Git repository. Parameters: message (Commit message), repoPath (Optional repo path), cwd (Optional working directory to run the command in).

ParameterTypeDescription
message *string
cwdstring
repoPathstring

new

Create a new, empty change with optional parent revisions in a Jujutsu (jj) repository. Useful for starting a new line of development or feature branch. Parameters: parents (Optional parent revisions, comma separated), repoPath (Optional repo path), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
parentsstring
repoPathstring

abandon

Abandon one or more revisions, rebasing descendants onto their parents in a Jujutsu (jj) repository. Useful for discarding changes or cleaning up history. Parameters: revisions (Revisions to abandon, e.g., '@'), repoPath (Optional repo path), cwd (Optional working directory to run the command in).

ParameterTypeDescription
revisions *string
cwdstring
repoPathstring

log

Show the commit history of a Jujutsu (jj) repository. Useful for reviewing past changes and understanding project evolution. Parameters: repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in), limit (Optional number of commits to show).

ParameterTypeDescription
cwdstring
limitinteger
repoPathstring

bookmark-create

Create a new bookmark in a Jujutsu (jj) repository. Useful for marking important points in history or creating named branches. Parameters: name (Name of the bookmark to create), revision (Optional revision to point the bookmark at), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
name *string
cwdstring
repoPathstring
revisionstring

bookmark-delete

Delete an existing bookmark in a Jujutsu (jj) repository and propagate the deletion to remotes on the next push. Parameters: names (Names of bookmarks to delete), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
names *array
cwdstring
repoPathstring

bookmark-forget

Forget a bookmark in a Jujutsu (jj) repository without marking it as a deletion to be pushed. Parameters: names (Names of bookmarks to forget), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
names *array
cwdstring
repoPathstring

bookmark-list

List bookmarks and their targets in a Jujutsu (jj) repository. Useful for reviewing all named points in history. Parameters: repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in), template (Optional template for output formatting).

ParameterTypeDescription
cwdstring
repoPathstring
templatestring

bookmark-move

Move existing bookmarks to target revision in a Jujutsu (jj) repository. Useful for updating bookmark positions. Parameters: names (Names of bookmarks to move), revision (Target revision to move bookmarks to), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
names *array
revision *string
cwdstring
repoPathstring

bookmark-rename

Rename a bookmark in a Jujutsu (jj) repository. Useful for updating bookmark names. Parameters: oldName (Current name of the bookmark), newName (New name for the bookmark), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
newName *string
oldName *string
cwdstring
repoPathstring

bookmark-set

Create or update a bookmark to point to a certain commit in a Jujutsu (jj) repository. Parameters: name (Name of the bookmark to set), revision (Revision to point the bookmark at), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
name *string
revision *string
cwdstring
repoPathstring

bookmark-track

Start tracking a remote bookmark in a Jujutsu (jj) repository. Parameters: remoteBookmark (Remote bookmark to track, format: bookmark@remote), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
remoteBookmark *string
cwdstring
repoPathstring

bookmark-untrack

Stop tracking a remote bookmark in a Jujutsu (jj) repository. Parameters: remoteBookmark (Remote bookmark to untrack, format: bookmark@remote), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
remoteBookmark *string
cwdstring
repoPathstring

diff

Compare file contents between two revisions in a Jujutsu (jj) repository. With the `--from` and/or `--to` options, shows the difference from/to the given revisions. If either is left out, it defaults to the working-copy commit. Parameters: from (Show changes from this revision), to (Show changes to this revision), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in), context (Optional number of lines of context to show), stat (Optional flag to show a histogram of changes).

ParameterTypeDescription
contextinteger
cwdstring
fromstring
repoPathstring
statboolean
tostring

git-clone

Create a new Jujutsu (jj) repository backed by a clone of a Git repo. The Git repo will be a bare git repo stored inside the .jj/ directory. Parameters: source (URL or path of the Git repo to clone), destination (Optional destination directory for the clone), remoteName (Optional name for the newly created remote, default: origin), colocate (Optional flag to colocate the jj repo with the git repo), depth (Optional depth for shallow clone).

ParameterTypeDescription
source *string
colocateboolean
depthinteger
destinationstring
remoteNamestring

git-export

Update the underlying Git repo with changes made in the Jujutsu (jj) repository. Useful for syncing jj changes back to Git. Parameters: repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
repoPathstring

git-fetch

Fetch branches and bookmarks from a Git remote into a Jujutsu (jj) repository. Similar to git fetch but preserves the jj-specific state. Parameters: remote (Remote to fetch from, default: origin), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in), branches (Optional branch/patterns to fetch, can specify multiple).

ParameterTypeDescription
branchesarray
cwdstring
remotestring
repoPathstring

git-import

Update the Jujutsu (jj) repository with changes made in the underlying Git repo. Useful for syncing Git changes into jj. Parameters: repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
repoPathstring

init

Create a new Jujutsu (jj) repository backed by a Git repo. Can create a new Git repo or import an existing one. Parameters: destination (Optional destination directory), colocate (Optional flag to colocate the jj repo with the git repo), gitRepo (Optional path to existing git repo to use).

ParameterTypeDescription
colocateboolean
destinationstring
gitRepostring

git-push

Push branches and bookmarks to a Git remote from a Jujutsu (jj) repository. Similar to git push but preserves the jj-specific state. Parameters: remote (Remote to push to, default: origin), bookmarks (Optional bookmarks to push, can specify multiple), all (Optional flag to push all bookmarks), tracked (Optional flag to push tracked bookmarks), deleted (Optional flag to push deleted bookmarks), allowNew (Optional flag to allow pushing new bookmarks), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
allboolean
allowNewboolean
bookmarksarray
cwdstring
deletedboolean
remotestring
repoPathstring
trackedboolean

git-remote-add

Add a Git remote to a Jujutsu (jj) repository. Parameters: name (Name of the remote to add), url (URL of the remote), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
name *string
url *string
cwdstring
repoPathstring

git-remote-list

List Git remotes in a Jujutsu (jj) repository. Parameters: repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
repoPathstring

git-remote-remove

Remove a Git remote from a Jujutsu (jj) repository. Parameters: name (Name of the remote to remove), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
name *string
cwdstring
repoPathstring

git-remote-rename

Rename a Git remote in a Jujutsu (jj) repository. Parameters: oldName (Current name of the remote), newName (New name for the remote), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
newName *string
oldName *string
cwdstring
repoPathstring

git-remote-set-url

Set the URL of a Git remote in a Jujutsu (jj) repository. Parameters: name (Name of the remote), url (New URL for the remote), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
name *string
url *string
cwdstring
repoPathstring

git-root

Show the underlying Git directory of a repository using the Git backend in Jujutsu (jj). Useful for finding the .git directory location. Parameters: repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
repoPathstring

show

Show description and changes in a revision of a Jujutsu (jj) repository compared to its parent(s). Useful for reviewing the exact changes made in a specific commit. Parameters: revision (The revision to show, defaults to working copy), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in), context (Optional number of lines of context to show).

ParameterTypeDescription
contextinteger
cwdstring
repoPathstring
revisionstring

revert

Apply the reverse of one or more revisions in a Jujutsu (jj) repository. Creates new changes that undo the specified commits. Useful for safely undoing changes. Parameters: revisions (Revisions to revert), destination (Optional destination revision, where to apply the revert), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
revisions *array
cwdstring
destinationstring
repoPathstring

restore

Restore paths from another revision in a Jujutsu (jj) repository. Can undo changes to specific files by restoring them to their previous state. Parameters: source (Optional source revision to restore from, defaults to parent), destination (Optional destination revision to restore into, defaults to working copy), paths (Paths to restore), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
paths *array
cwdstring
destinationstring
repoPathstring
sourcestring

interdiff

Compare the changes between two commits in a Jujutsu (jj) repository. Shows only the difference between the two diffs, excluding changes from other commits. Parameters: from (First commit to compare), to (Second commit to compare), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in), context (Optional number of lines of context to show).

ParameterTypeDescription
from *string
to *string
contextinteger
cwdstring
repoPathstring

evolog

Show how a change has evolved over time in a Jujutsu (jj) repository. Lists previous commits which a change has pointed to as it was updated, rebased, etc. Parameters: revision (Revision to show evolution for), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in), limit (Optional limit on number of revisions to show), patch (Optional flag to show patch compared to previous version).

ParameterTypeDescription
cwdstring
limitinteger
patchboolean
repoPathstring
revisionstring

edit

Sets the specified revision as the working-copy revision in a Jujutsu (jj) repository. Note: it is generally recommended to instead use `jj new` and `jj squash`. Parameters: revision (The commit to edit, e.g., 'my-branch' or a commit ID), repoPath (Optional path to the repository root or a working directory within the repository), cwd (Optional working directory to run the command in).

ParameterTypeDescription
revision *stringThe commit to edit, e.g., 'my-branch' or a commit ID.
cwdstringOptional working directory to run the command in.
repoPathstringOptional path to the repository root or a working directory within the repository.

file-annotate

Show the source change for each line of a file in a Jujutsu (jj) repository. Useful for understanding how each line of a file has evolved. Parameters: path (Path to the file to annotate), revision (Optional revision to annotate from, defaults to working copy), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
path *string
cwdstring
repoPathstring
revisionstring

file-chmod

Sets or removes the executable bit for files in a Jujutsu (jj) repository. Unlike POSIX chmod, this works on Windows and on arbitrary revisions. Parameters: mode (Mode to set, 'x' for executable, 'n' for non-executable), paths (Paths to modify), revision (Optional revision to modify, defaults to working copy), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
mode *string
paths *array
cwdstring
repoPathstring
revisionstring

file-list

List files in a revision of a Jujutsu (jj) repository. Useful for exploring the repository contents at a specific point in history. Parameters: revision (Optional revision to list, defaults to working copy), paths (Optional paths to filter by), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
pathsarray
repoPathstring
revisionstring

file-show

Print contents of files in a revision of a Jujutsu (jj) repository. Similar to Unix cat but works on repository files at any revision. Parameters: paths (Paths of files to show), revision (Optional revision to show from, defaults to working copy), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
paths *array
cwdstring
repoPathstring
revisionstring

file-track

Start tracking specified paths in the working copy of a Jujutsu (jj) repository. By default new files are automatically tracked; this is primarily useful when auto-tracking is disabled. Parameters: paths (Paths to track), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
paths *array
cwdstring
repoPathstring

file-untrack

Stop tracking specified paths in the working copy of a Jujutsu (jj) repository. The paths must already be ignored via .gitignore or other ignore rules. Parameters: paths (Paths to untrack), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
paths *array
cwdstring
repoPathstring

squash

Move changes from one revision into another revision in a Jujutsu (jj) repository. Only supports whole-file changes (no --interactive flag support). Parameters: source (Source revision to squash from, defaults to working copy), destination (Destination revision to squash into), paths (Optional path patterns to squash, whole paths only, no partial file changes), keepEmptied (Optional flag to keep emptied source revision), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
destinationstring
keepEmptiedboolean
pathsarray
repoPathstring
sourcestring

workspace-root

Show the current workspace root directory in a Jujutsu (jj) repository. Useful for determining the base directory of the current workspace. Parameters: repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
repoPathstring

operation-abandon

Abandon operation history in a Jujutsu (jj) repository. Discards old operations and reparents descendants onto the root operation. Parameters: operation (Operation or range to abandon), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
operation *string
cwdstring
repoPathstring

operation-diff

Compare changes to the repository between two operations in a Jujutsu (jj) repository. Shows what changed between operation states. Parameters: from (Operation to show changes from), to (Operation to show changes to), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in), context (Optional number of lines of context to show).

ParameterTypeDescription
contextinteger
cwdstring
fromstring
repoPathstring
tostring

operation-log

Show the operation log of a Jujutsu (jj) repository. Lists all operations performed on the repository in chronological order. Parameters: limit (Optional limit on number of operations to show), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
limitinteger
repoPathstring

operation-restore

Create a new operation that restores the repo to an earlier state in a Jujutsu (jj) repository. Effectively undoes all operations after the specified one. Parameters: operation (Operation to restore to), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
operation *string
cwdstring
repoPathstring

operation-show

Show changes to the repository in an operation of a Jujutsu (jj) repository. Displays what changed in the specified operation. Parameters: operation (Operation to show, defaults to latest), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
operationstring
repoPathstring

operation-undo

Create a new operation that undoes an earlier operation in a Jujutsu (jj) repository. Applies the inverse of the specified operation. Parameters: operation (Operation to undo, defaults to latest), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
operationstring
repoPathstring

config-get

Get the value of a config option in a Jujutsu (jj) repository. Unlike `jj config list`, the output is unformatted for scripting use. Parameters: name (Name of config option to get), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
name *string
cwdstring
repoPathstring

config-list

List config variables and their values in a Jujutsu (jj) repository. Shows both user and repo-level configs by default. Parameters: name (Optional name of specific config option to list), includeDefaults (Optional flag to include default values), includeOverridden (Optional flag to include overridden values), user (Optional flag to only show user-level config), repo (Optional flag to only show repo-level config), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
includeDefaultsboolean
includeOverriddenboolean
namestring
repoboolean
repoPathstring
userboolean

config-set

Set a config option in a Jujutsu (jj) repository. Updates either user or repo config file. Parameters: name (Name of config option to set), value (Value to set), user (Optional flag to set user-level config), repo (Optional flag to set repo-level config), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
name *string
value *string
cwdstring
repoboolean
repoPathstring
userboolean

config-unset

Unset a config option in a Jujutsu (jj) repository. Removes from either user or repo config file. Parameters: name (Name of config option to unset), user (Optional flag to unset user-level config), repo (Optional flag to unset repo-level config), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
name *string
cwdstring
repoboolean
repoPathstring
userboolean

config-path

Show the path to config files in a Jujutsu (jj) repository. Useful for directly editing config files. Parameters: user (Optional flag to show user config path), repo (Optional flag to show repo config path), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in).

ParameterTypeDescription
cwdstring
repoboolean
repoPathstring
userboolean

tag-list

List tags and their targets in a Jujutsu (jj) repository. Useful for reviewing all tagged points in history. Parameters: names (Optional names of tags to list), repoPath (Optional path to repo root or working directory), cwd (Optional working directory to run the command in), template (Optional template for output formatting).

ParameterTypeDescription
cwdstring
namesarray
repoPathstring
templatestring

describe

Update the change description or other metadata for a revision in a Jujutsu (jj) repository. By default, targets the working-copy revision (`@`). Parameters: message (The new change description to use), revisions (The revision(s) whose description to edit, e.g., 'my-branch', '@-', or a commit ID. Defaults to the working-copy revision if not specified), resetAuthor (If true, reset the author to the configured user), author (Set a custom author string, e.g., 'User <email@example.com>'. This changes author name and email while retaining author timestamp for non-discardable commits), repoPath (Opt…

ParameterTypeDescription
message *stringThe new change description to use.
authorstringSet a custom author string (e.g., 'User <email@example.com>'). This changes author name and email while retaining author timestamp for non-discardable commits.
cwdstringOptional working directory to run the command in.
repoPathstringOptional path to the repository root or a working directory within the repository.
resetAuthorbooleanIf true, reset the author to the configured user.
revisionsstringThe revision(s) whose description to edit (e.g., 'my-branch', '@-', or a commit ID). Defaults to the working-copy revision if not specified.