Token导航 LogoToken导航TokenDH.com
gait MCP logo
开发工具stdio官方级别未说明来源级核验

gait MCP

MCP Server

GAIT MCP服务器为AI助手提供Git风格的对话、代码变更和上下文跟踪功能,支持持久化记忆、历史回退和分支管理。

工具数

0

提示词数

0

GitHub Stars

11

资源数

0
版本控制PythonClaudeClaude DesktopClaudeVS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

automateyournetwork

提供方

automateyournetwork

最后核验

2026/5/17 20:19

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run python -u gait_mcp.py

详细介绍

gait_mcp

一种模型上下文协议(MCP)服务器 Git人工智能跟踪(GAIT).

GAIT让AI助手跟踪对话、代码更改和上下文,就像Git跟踪源代码一样。此MCP服务器允许VS Code Copilot、Gemini CLI和Claude Desktop等工具持久化AI转弯、倒退历史、分支想法,并将内存与您的工作目录同步。

这给了你什么

  • AI对话的自动版本控制
  • Git风格的分支和还原用于AI推理
  • 编辑器重启后仍能保留的持久内存
  • 对代码工件(文件+内容)的一流支持
  • 通过GAITHUB兼容服务器提供云支持的遥控器

安装依赖项

选项1:使用紫外线(推荐)

uv sync
uv run python -u gait_mcp.py

选项2:使用pip

创建并激活虚拟环境:

python3 -m venv .venv
source .venv/bin/activate
# Windows: .venv\Scripts\activate

升级pip并安装依赖项:

pip install -U pip
pip install mcp fastmcp gait-ai

将MCP服务器添加到VS代码中

将GAIT MCP服务器添加到VS Code MCP配置中。

示例(Linux/macOS):

{
  "servers": {
    "gait": {
      "type": "stdio",
      "command": "/home/johncapobianco/GAITCOPILOT/bin/python",
      "args": [
        "-u",
        "/home/johncapobianco/gait_mcp/gait_mcp.py"
      ],
      "env": {
        "GAITHUB_TOKEN": "your_gaithub_token_here"
      }
    }
  }
}

Windows11上的WSL/Ubuntu

此配置在WSL下可靠工作:

"gait": {
  "type": "stdio",
  "command": "wsl",
  "args": [
    "/home/johncapobianco/GAITCOPILOT/bin/python",
    "-u",
    "/home/johncapobianco/gait_mcp/gait_mcp.py"
  ],
  "env": {
    "GAITHUB_TOKEN": ""
  }
}

推荐:使用VS代码聊天说明(最佳效果)

VS Code Copilot支持通过Markdown文件持久化聊天指令,而不是手动粘贴提示。 这是使用GAIT的首选和最可靠的方法。

步骤1:创建指令文件夹

从你的repo的根:

.github/instructions/

默认情况下,VS Code会使用以下设置自动扫描此位置:

chat.instructionsFilesLocations = { ".github/instructions": true }

步骤2:创建GAIT指令文件

创建此文件:

.github/instructions/gait-mcp.md

步骤3:添加增益跟踪规则

将您的GAIT MCP规则粘贴到该文件中。例如:

GAIT MCP Tracking Rules

These instructions override any default Copilot behavior related to file edits, tool usage, or conversation tracking.

Automatic tracking
Every time you create or modify a file, you MUST call gait_record_turn.

Artifacts
When calling gait_record_turn, you MUST include the full content of every file you created or changed in the artifacts parameter as a list:
[{'path': 'filename', 'content': 'full file contents'}]

Initialization
If GAIT is not initialized in the current directory, you MUST call gait_init before performing any other action.

Revert and resume protocol
If you call gait_revert:

You MUST NOT call gait_record_turn for that action

You MUST immediately call gait_resume

You MUST treat the output of gait_resume as the new ground truth

You MUST ignore any turns that occurred after the reverted commit

Consistency rules
If GAIT tracking is active, you MUST NOT skip recording turns.
If a turn cannot be recorded, you MUST explain why before continuing.

步骤4:启用Copilot中的指令

在VS代码中:

  1. 打开Copilot聊天
  2. 打开聊天说明菜单
  3. 选择 gait-mcp.md

一旦选定,这些规则将在整个工作区中持续存在。

您不再需要为每个会话粘贴提示。

可选:手动副驾驶提示(回退)

如果您没有使用聊天说明,您仍然可以手动引导:

I want to track our session using the GAIT MCP tool.

First, call gait_init in this directory to ensure tracking is active.

For every task I give you, once you have written or modified code, you must call gait_record_turn.

In that call, include my prompt as user_text, your explanation as assistant_text, and include the full content of any files you created or changed in the artifacts parameter as:
[{'path': 'filename', 'content': 'code'}].

Do you understand these instructions?

预期工作流程

  1. 打开项目目录
  2. 启用GAIT聊天指令
  3. 让副驾驶正常工作

自动增益:

  • 记录每一个有意义的转折
  • 将文件更改作为工件进行跟踪
  • 允许还原、分支和恢复AI上下文

初始化后,GAIT应自动跟踪对话。

备注

回复后,gait_resume是真理的来源

  • GAIT拒绝按设计在文件系统根目录进行初始化
  • 副驾驶聊天记录不能删除,但GAIT历史记录可以倒回
  • 在恢复之后, gait_resume 是真理的源泉

目录标签

目录标签

版本控制PythonClaudeAI对话管理本地部署代码跟踪开发工具AI协作

支持客户端

Claude DesktopClaudeVS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP