npm package: @gitkraken/gk
Description: gk is GitKraken on the command line. It makes working across multiple repos easier with Workspaces, provides access to pull requests and issues from multiple services (GitHub, GitLab, Bitbucket, etc.), and seamlessly connects with GitKraken Client and Git
Author: Gitkraken
Latest version: 3.1.55

# GitKraken MCP Server

The GitKraken MCP Server is a local MCP server that is powerful and easy to use. It combines the functionality of all of your GitKraken Integrations and provides that power to your AI agents, assistants, and chatbots. Your agentic workflows will be more capable and efficient.

### Use Cases

- Safe Git Operations: Perform Git operations safely and securely
- Issue & PR Automation: Read and Create Issues and Pull Requests across all supported GitKraken Integrations (GitHub, GitLab, BitBucket, Azure DevOps, Jira, Trello, Linear, etc.)
- Understand Repo Changes: Get a detailed overview of all changes in a repository and understand the impact of each change

---

## Local GitKraken MCP Server

[![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://gitkraken.dev/deeplink?product=gitlens&path=/link/command/install-mcp&ide=vscode&__hstc=91416005.36b7b55e451d23c79de91bbf539cbdd9.1710276073503.1760514722070.1760597038071.206&__hssc=91416005.2.1760597038071&__hsfp=2819208119&_gl=1*1czyc4g*_gcl_au*Njc0MDYxMzMzLjE3NTkxNzUzMDk.*_ga*MjA4ODE0MDQ0NC4xNzEwOTU1MTc3*_ga_TTGBQHQ5E4*czE3NjA1OTcwMzgkbzMwMSRnMSR0MTc2MDU5NzA0MSRqNTckbDAkaDE5OTY1ODc1OTc.) [![Install in VS Code Insiders](https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square&logo=visualstudiocode&logoColor=white)](https://gitkraken.dev/deeplink?product=gitlens&path=/link/command/install-mcp&ide=vscode-insiders&__hstc=91416005.36b7b55e451d23c79de91bbf539cbdd9.1710276073503.1760514722070.1760597038071.206&__hssc=91416005.2.1760597038071&__hsfp=2819208119&_gl=1*vo5djr*_gcl_au*Njc0MDYxMzMzLjE3NTkxNzUzMDk.*_ga*MjA4ODE0MDQ0NC4xNzEwOTU1MTc3*_ga_TTGBQHQ5E4*czE3NjA1OTcwMzgkbzMwMSRnMSR0MTc2MDU5NzA0MSRqNTckbDAkaDE5OTY1ODc1OTc.) [![Install in Cursor](https://img.shields.io/badge/Cursor-Install_Server-black?style=flat-square&logo=cursor&logoColor=white)](https://gitkraken.dev/deeplink?product=gitlens&path=/link/command/install-mcp&ide=cursor&__hstc=91416005.36b7b55e451d23c79de91bbf539cbdd9.1710276073503.1760514722070.1760597038071.206&__hssc=91416005.2.1760597038071&__hsfp=2819208119&_gl=1*16g2pxj*_gcl_au*Njc0MDYxMzMzLjE3NTkxNzUzMDk.*_ga*MjA4ODE0MDQ0NC4xNzEwOTU1MTc3*_ga_TTGBQHQ5E4*czE3NjA1OTcwMzgkbzMwMSRnMSR0MTc2MDU5NzA0MSRqNTckbDAkaDE5OTY1ODc1OTc.) [![Install in Windsurf](https://img.shields.io/badge/Windsurf-Install_Server-34e8bb?style=flat-square&logo=windsurf&logoColor=white)](https://gitkraken.dev/deeplink?product=gitlens&path=/link/command/install-mcp&ide=windsurf&__hstc=91416005.36b7b55e451d23c79de91bbf539cbdd9.1710276073503.1760514722070.1760597038071.206&__hssc=91416005.2.1760597038071&__hsfp=2819208119&_gl=1*p414s6*_gcl_au*Njc0MDYxMzMzLjE3NTkxNzUzMDk.*_ga*MjA4ODE0MDQ0NC4xNzEwOTU1MTc3*_ga_TTGBQHQ5E4*czE3NjA1OTcwMzgkbzMwMSRnMSR0MTc2MDU5NzA0MSRqNTckbDAkaDE5OTY1ODc1OTc.) [![Install in Trae](https://img.shields.io/badge/Trae-Install_Server-32f08c?style=flat-square&logo=trae&logoColor=white)](https://gitkraken.dev/deeplink?product=gitlens&path=/link/command/install-mcp&ide=trae&__hstc=91416005.36b7b55e451d23c79de91bbf539cbdd9.1710276073503.1760514722070.1760597038071.206&__hssc=91416005.2.1760597038071&__hsfp=2819208119&_gl=1*khjtg5*_gcl_au*Njc0MDYxMzMzLjE3NTkxNzUzMDk.*_ga*MjA4ODE0MDQ0NC4xNzEwOTU1MTc3*_ga_TTGBQHQ5E4*czE3NjA1OTcwMzgkbzMwMSRnMSR0MTc2MDU5NzA0MSRqNTckbDAkaDE5OTY1ODc1OTc.)

## Installation

There are several ways of installing the GitKraken MCP Server depending on the environment in which you want to use it.

### Install in VS Code with GitLens

If you are using a new enough version of VS Code and have GitLens installed, the MCP Server is installed for you automatically. To verify this, you simply need to run a Copilot prompt that would use our MCP server. For example, you can run the following prompt:

> What Issues are assigned to me?

### Install in Other IDEs with GitLens

GitLens can automate it's installation in other VS Code based IDEs such as Cursor, WindSurf, Trae, and Kiro.

For quick installation, use one of the one-click install buttons above. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start.

If you already have Gitlens, you can simply bring up the Command Palette (Ctrl+Shift+P) and type "GitLens: Install MCP Server" and select the option to install the MCP Server in your IDE.

More about using MCP server tools in VS Code's [agent mode documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).

### Install without GitLens

For easy installation, you can use the GitKraken CLI command:

```bash
gk mcp install <PLATFORM>
```

Alternatively, you can manually add the following JSON block to your IDE's MCP settings:

```json
{
  "mcp": {
    "servers": {
      "gitkraken": {
        "command": "gk",
        "args": ["mcp"],
        "type": "stdio"
      }
    }
  }
}
```

This assumes that you ran the install command globally (`npm i -g @gitkraken/gk`).

Optionally, you can add a similar example (i.e. without the mcp key) to a file called `.vs code/mcp.json` in your workspace. This will allow you to share the configuration with other host applications that accept the same format.

More about using [GitKraken MCP documentation](https://help.gitkraken.com/mcp/mcp-getting-started/)

## Tools

### Git Tools

| Toolset             | Description                                                                                                                                                                                                      |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `git_add_or_commit` | Add file contents to the index (git add &lt;pathspec&gt;) OR record changes to the repository (git commit -m &lt;message&gt; [files...]). Use the &#39;action&#39; parameter to specify which action to perform. |
| `git_blame`         | Show what revision and author last modified each line of a file (git blame &lt;file&gt;).                                                                                                                        |
| `git_branch`        | List or create branches (git branch).                                                                                                                                                                            |
| `git_checkout`      | Switch branches or restore working tree files (git checkout &lt;branch&gt;).                                                                                                                                     |
| `git_log_or_diff`   | Show commit logs or changes between commits (git log --oneline or git diff).                                                                                                                                     |
| `git_push`          | Update remote refs along with associated objects (git push).                                                                                                                                                     |
| `git_stash`         | Stash the changes in a dirty working directory (git stash).                                                                                                                                                      |
| `git_status`        | Show the working tree status (git status).                                                                                                                                                                       |
| `git_worktree`      | List or add git worktrees (git worktree &lt;action&gt;).                                                                                                                                                         |

### Pull Request Tools

| Toolset                       | Description                                                          |
| ----------------------------- | -------------------------------------------------------------------- |
| `pull_request_assigned_to_me` | Search pull requests where you are the assignee, author, or reviewer |
| `pull_request_create`         | Create a new pull request                                            |
| `pull_request_create_review`  | Create a review for a pull request                                   |
| `pull_request_get_comments`   | Get all the comments in a pull requests                              |
| `pull_request_get_detail`     | Get an specific pull request                                         |
| `repository_get_file_content` | Get file content from a repository                                   |

### Issue Tools

| Toolset                 | Description                                                           |
| ----------------------- | --------------------------------------------------------------------- |
| `issues_add_comment`    | Add a comment to an issue                                             |
| `issues_assigned_to_me` | Fetch issues assigned to the user                                     |
| `issues_get_detail`     | Retrieve detailed information about a specific issue by its unique ID |

### GitKraken Tools

| Toolset                    | Description                    |
| -------------------------- | ------------------------------ |
| `gitkraken_workspace_list` | Lists all GitKraken workspaces |

## Prompts

- **code_review_branch** - Generate a code review branch name based on the provided context.
  - branch_name: Branch name to review (required)