Self-host the gitaiflow MCP server to connect it to any MCP client, internal service or agent workflow.
gitaiflow is a private repository, so this path is for repo collaborators, not a general public install. If you don’t have access, use the AI-Native Binary or Claude Desktop Extension instead — or request access.
A thin MCP layer delegates Git and AI work to the gitaiflow native binary. Requires access to the private gitaiflow repository.
git clone https://gitlab.com/codefleet-labs/gitaiflow.gitcd gitaiflow
pip install -r requirements-mcp.txt
MCP_TRANSPORT=streamable-http python -m mcp_server.server
MCP_TRANSPORT=stdio python -m mcp_server.server
The MCP server is an adapter around the AOT executable; it does not introduce a second AI configuration system.
Keep transport, workspace, authentication, timeout, and rate-limit settings in .mcp.env or the deployment environment.
streamable-http (default) serves /mcp and /health on port 8080; stdio talks over stdin/stdout for local desktop clients and starts no HTTP listener.Authorization: Bearer <token>. Keep it out of logs and screenshots./workspace.MCP_WORKSPACE (native: same absolute path; Docker: /workspace). The request path then selects a Git repository beneath it.| Name | Default | Notes |
|---|---|---|
| MCP_TRANSPORT | streamable-http | streamable-http (default) serves /mcp and /health on port 8080; stdio talks over stdin/stdout for local desktop clients and starts no HTTP listener. |
| MCP_API_TOKEN | Optional | Bearer token for the streamable HTTP endpoint. Clients send it as Authorization: Bearer <token>. Keep it out of logs and screenshots. |
| MCP_WORKSPACE | Set explicitly | Working parent workspace. Native: an absolute host path. In Docker: /workspace. |
| MCP_ALLOWED_WORKSPACES | Set explicitly | Allow-list that authorizes repository roots. Set it alongside MCP_WORKSPACE (native: same absolute path; Docker: /workspace). The request path then selects a Git repository beneath it. |
| GITAIFLOW_BINARY | Auto-resolved | Path to the gitaiflow executable the MCP server runs. In Docker set it to /app/bin/gitaiflow and mount a matching Linux binary there. |
gitaiflow --version and gitaiflow --last-summary first; if the CLI fails, fix that before debugging MCP.MCP_TRANSPORT=streamable-httpMCP_API_TOKEN=<local-secret>MCP_WORKSPACE=/absolute/path/to/workspaceMCP_ALLOWED_WORKSPACES=/absolute/path/to/workspaceMCP_EXECUTION_TIMEOUT=120MCP_RATE_LIMIT=100MCP_RATE_WINDOW_SECONDS=60
set -asource .mcp.envset +a
MCP runtime settings (transport, token, workspace, timeout, rate limit) belong in .mcp.env or the process environment. AI settings (AI_PROVIDER, AI_API_KEY, AI_BASE_URL, AI_MODEL) stay in ~/.gitaiflow/config.env.
| Transport | How it runs | Use it for |
|---|---|---|
| streamable-http (default) | Serves http://localhost:8080/mcp and http://localhost:8080/health. Requests carry Authorization: Bearer <MCP_API_TOKEN>. | Native verification, Docker, MCP Inspector, service-style deployments. |
| stdio | Talks over stdin/stdout; no HTTP listener is started. | Local desktop clients such as the Claude Desktop Client. |
MCP_WORKSPACE and MCP_ALLOWED_WORKSPACES identify the parent workspace. The tool path argument selects one Git repository inside it, and the selected directory must itself be a Git repository root.
MCP_WORKSPACE and MCP_ALLOWED_WORKSPACES at the parent directory that contains all your repositories — one absolute path, not one per repository.paperclip resolves to <workspace>/paperclip.curl -i http://localhost:8080/health
npx -y @modelcontextprotocol/inspector@latest
A healthy /health only proves the MCP process is alive, not that the gitaiflow binary, repository selection or AI configuration work. A server restart also invalidates existing MCP sessions — reconnect your client.
| Tool | Required | Optional |
|---|---|---|
| gitaiflow_change_summary | remote | base_branch, path |
| gitaiflow_last_summary | — | path |
| gitaiflow_changelog | remote | since, until |
| gitaiflow_release_notes | — | path |
| gitaiflow_usage | — | scope, since, until |
| gitaiflow_list_models | — | free_only, as_json |
Use your repository’s real remote name for remote — it is never assumed to be origin. When path is used, it selects a Git repository inside the allowed workspace.