@gitkraken/gk

中文文档
3.1.77发布于 2026/10/14CC-BY-3.0-USES Module近 30 天下载 32万

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

原始使用文档
文档目录12 节
  1. Use Cases
  2. Local GitKraken MCP Server
  3. Installation
  4. Install in VS Code with GitLens
  5. Install in Other IDEs with GitLens
  6. Install without GitLens
  7. Tools
  8. Git Tools
  9. Pull Request Tools
  10. Issue Tools
  11. GitKraken Tools
  12. Prompts

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 Install in VS Code Insiders Install in Cursor Install in Windsurf Install in Trae

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.

Install without GitLens

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

gk mcp install <PLATFORM>

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

{
  "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

Tools

Git Tools

ToolsetDescription
git_addAdd file contents to the index (git add <pathspec>).
git_blameShow what revision and author last modified each line of a file (git blame <file>).
git_branchList or create branches (git branch).
git_checkoutSwitch branches or restore working tree files (git checkout <branch>).
git_commitRecord changes to the repository (git commit -m <message> [files...]).
git_log_or_diffShow commit logs or changes between commits (git log --oneline or git diff).
git_pushUpdate remote refs along with associated objects (git push).
git_stashStash the changes in a dirty working directory (git stash).
git_statusShow the working tree status (git status).
git_worktreeList or add git worktrees (git worktree <action>).

Pull Request Tools

ToolsetDescription
pull_request_assigned_to_meSearch pull requests where you are the author or assignee (optionally include requested reviewer via reviewer)
pull_request_createCreate a new pull request. Supports optional assign_to_me; GitHub and GitLab assign the PR to the current user, while Azure DevOps and Bitbucket return a warning that the provider does not support assign_to_me.
pull_request_create_reviewCreate a review for a pull request
pull_request_get_commentsGet all the comments in a pull requests
pull_request_get_detailGet an specific pull request
repository_get_file_contentGet file content from a repository

Issue Tools

ToolsetDescription
issues_add_commentAdd a comment to an issue
issues_assigned_to_meFetch issues assigned to the user
issues_createCreate a new issue
issues_get_detailRetrieve detailed information about a specific issue by its unique ID

GitKraken Tools

ToolsetDescription
gitkraken_workspace_listLists 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)

版本与发布记录

@gitkraken/gk 共发布 22 个版本,首次发布于 2025/10/17;过去 12 个月发布了 17 个版本。

版本发布日期距今
3.1.77latest2026/10/141 个月前
3.1.762026/09/291 个月前
3.1.752026/09/161 个月前
3.1.702026/07/134 个月前
3.1.692026/06/294 个月前
3.1.682026/06/105 个月前

关于 @gitkraken/gk 的常见问题

@gitkraken/gk 是什么?

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

如何安装 @gitkraken/gk?

在项目目录运行 npm install @gitkraken/gk,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 gk,可以用 npx gk 直接运行。

@gitkraken/gk 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/gitkraken__gk 是否存在。

@gitkraken/gk 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@gitkraken/gk 可以商用吗?

@gitkraken/gk 使用 CC-BY-3.0-US 许可。声明的许可为 CC-BY-3.0-US,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@gitkraken/gk 的下载量有多少?

根据 npm 官方下载统计,@gitkraken/gk 在 2026/10/17 – 2026/11/15 这 30 天内被下载 319,809 次,日均约 10,660 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@gitkraken/gk 还在维护吗?

最新版本 3.1.77 发布于 2026/10/14(1 个月前);至今共发布 22 个版本,其中过去 12 个月发布了 17 个;首次发布于 2025/10/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。