
A Model Context Protocol (MCP) Server for Git for Artificial Intelligence Tracking (GAIT)
概览
A Model Context Protocol (MCP) server for . GAIT lets AI assistants track conversations, code changes, and context the same way Git tracks source code. This MCP server allows tools like VS Code Copilot, Gemini CLI, and Claude Desktop to persist AI turns, rewind history, branch ideas, and synchronize memory with your working directory. - Automatic versioning of AI conversations - Git-style branching and reverting for AI reasoning - Persistent memory that survives editor restarts - First-class support for code artifacts (files + content) - Cloud-backed remotes via GAITHUB-compatible servers Create and activate a virtual environment: Add the GAIT MCP server to your VS Code MCP configuration. This configuration worked reliably under WSL: Instead of pasting prompts manually, VS Code Copilot supports persistent Chat Instructions via Markdown files. This is the preferred and most reliable way to use GAIT. VS Code automatically scans this location by default using the setting:
README
以下为原文 README 节选,完整内容请查看原文。
gait_mcp
A Model Context Protocol (MCP) server for Git for Artificial Intelligence Tracking (GAIT).
GAIT lets AI assistants track conversations, code changes, and context the same way Git tracks source code. This MCP server allows tools like VS Code Copilot, Gemini CLI, and Claude Desktop to persist AI turns, rewind history, branch ideas, and synchronize memory with your working directory.
What this gives you
- Automatic versioning of AI conversations
- Git-style branching and reverting for AI reasoning
- Persistent memory that survives editor restarts
- First-class support for code artifacts (files + content)
- Cloud-backed remotes via GAITHUB-compatible servers
Install dependencies
Option 1: Using uv (recommended)
uv sync
uv run python -u gait_mcp.py
Option 2: Using pip
Create and activate a virtual environment:
python3 -m venv .venv
source .venv/bin/activate
# Windows: .venv\Scripts\activate
Upgrade pip and install dependencies:
pip install -U pip
pip install mcp fastmcp gait-ai
Add the MCP server to VS Code
Add the GAIT MCP server to your VS Code MCP configuration.
Example (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"
}
}
}
}
WSL / Ubuntu on Windows 11
This configuration worked reliably under WSL:
"gait": {
"type": "stdio",
"command": "wsl",
"args": [
"/home/johncapobianco/GAITCOPILOT/bin/python",
"-u",
"/home/johncapobianco/gait_mcp/gait_mcp.py"
],
"env": {
"GAITHUB_TOKEN": ""
}
}
Recommended: Use VS Code Chat Instructions (best results)
Instead of pasting prompts manually, VS Code Copilot supports persistent Chat Instructions via Markdown files. This is the preferred and most reliable way to use GAIT.
Step 1: Create the instructions folder
From the root of your repo:
.github/instructions/
VS Code automatically scans this location by default using the setting:
chat.instructionsFilesLocations = { ".github/instructions": true }
Step 2: Create the GAIT instruction file
Create this file:
.github/instructions/gait-mcp.md
Step 3: Add GAIT tracking rules
Paste your GAIT MCP rules into that file. For example:
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
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →