Skip to main content
Glama

Git MCP Server

git-mcp

License: MIT Node CI

Domain-neutral git utility service packaged for Model Context Protocol (MCP) agents. It exposes REST endpoints for repository status, diffs, and commits while enforcing a configurable root allowlist.

Features

  • /health endpoint reporting configured root directories.

  • /v1/git/status returning branch, upstream, ahead/behind counts, and per-file codes.

  • /v1/git/diff streaming raw git diff output for a ref.

  • Additional helpers for commit operations (extendable by downstream projects).

Installation

pnpm install git-mcp # or npm install git-mcp

Usage

import { createApp } from "git-mcp"; const app = createApp(); app.listen({ host: "127.0.0.1", port: 8787 });

Set MCP_GIT_ROOTS to a colon-separated list of allowed directories (defaults to process.cwd()).

Development

pnpm install pnpm run lint pnpm run test pnpm run build

License

MIT — see LICENSE.

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Enables git repository operations through REST endpoints, providing access to repository status, diffs, and commits. Enforces security through configurable root directory allowlists for safe git operations.

  1. Features
    1. Installation
      1. Usage
        1. Development
          1. License

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/yevheniikravchuk/git-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server