Skip to main content

A Model Context Protocol (MCP) server for Git for Artificial Intelligence Tracking (GAIT)

Project description

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
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.

Step 4: Enable the instructions in Copilot

In VS Code:

  1. Open Copilot Chat
  2. Open the Chat Instructions menu
  3. Select gait-mcp.md

Once selected, these rules persist for the entire workspace.

You no longer need to paste a prompt for every session.

Optional: Manual Copilot prompt (fallback)

If you are not using Chat Instructions, you can still bootstrap manually:

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?

Expected workflow

  1. Open a project directory
  2. Enable GAIT Chat Instructions
  3. Ask Copilot to work normally

GAIT automatically:

  • Records every meaningful turn
  • Tracks file changes as artifacts
  • Allows reverting, branching, and resuming AI context

Once initialized, GAIT should track the conversation automatically.

Notes

After revert, gait_resume is the source of truth

  • GAIT refuses to initialize at filesystem root by design
  • The Copilot chat transcript cannot be erased, but GAIT history can be rewound
  • After revert, gait_resume is the source of truth

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_automateyournetwork_gait_mcp-0.1.0.tar.gz (51.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_automateyournetwork_gait_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_automateyournetwork_gait_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 51.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_automateyournetwork_gait_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 98f77418c873358e28beb6b8817af61caaac3a222032b3dcf912f0bb3b4f71fa
MD5 0ea30fc6a0e7b68ff2efb2dffad28ada
BLAKE2b-256 30eb28c1e51df215faa43404d7d60f44b6255e6f2d3556993a477b95da61999f

See more details on using hashes here.

File details

Details for the file iflow_mcp_automateyournetwork_gait_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_automateyournetwork_gait_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_automateyournetwork_gait_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 989a01d3685bd98e104d90212efa03d9b56b8cbaf82f2aff80680bd7e41932af
MD5 4ccfc94c8357c7fe74d10a6e6f31a8a8
BLAKE2b-256 7e27977b0cb9e33eaaf275c618d3796ecd728e56ecbd0a7269ad164f5b80a9d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page