Skip to main content
Glama
davidweb3-ctrl

MCP Git Enhanced

🦞 MCP Git Enhanced

Tests Coverage License

Улучшенный MCP-сервер (Model Context Protocol) для Git, предоставляющий ИИ-ассистентам мощные возможности для проверки кода, анализа коммитов и управления ветками.

Функции

  • 🔍 Анализ diff кода - Сравнение коммитов, веток или изменений в рабочей директории

  • 📊 Анализ истории коммитов - Глубокое понимание паттернов коммитов и участников

  • 🌿 Управление ветками - Список, сравнение и рекомендации по очистке

  • 📈 Статус репозитория - Комплексный обзор рабочей директории

  • 🔎 Анализ коммитов - Детальная проверка отдельного коммита

Related MCP server: pr-mcp-server

Установка

Из npm (после публикации)

npm install -g @bountyclaw/mcp-git-enhanced

Из исходного кода

git clone https://github.com/bountyclaw/mcp-git-enhanced.git
cd mcp-git-enhanced
npm install
npm run build

Использование с Claude Code

Добавьте в конфигурацию Claude Code (~/.claude/settings.json):

{
  "mcpServers": {
    "git-enhanced": {
      "command": "npx",
      "args": ["@bountyclaw/mcp-git-enhanced"]
    }
  }
}

Или для локальной разработки:

{
  "mcpServers": {
    "git-enhanced": {
      "command": "node",
      "args": ["/path/to/mcp-git-enhanced/dist/index.js"]
    }
  }
}

Доступные инструменты

git_diff

Анализ изменений кода между коммитами, ветками или рабочей директорией.

{
  "repoPath": "/absolute/path/to/repo",
  "target": "HEAD~5",
  "source": "HEAD~10",
  "filePath": "src/",
  "staged": false
}

git_log

Анализ истории коммитов с фильтрацией и статистикой.

{
  "repoPath": "/absolute/path/to/repo",
  "maxCount": 20,
  "author": "John Doe",
  "since": "1 week ago",
  "stat": true
}

git_branch

Управление и анализ веток git.

{
  "repoPath": "/absolute/path/to/repo",
  "action": "list|compare|suggest_cleanup",
  "includeRemote": true
}

git_status

Получение комплексного статуса репозитория.

{
  "repoPath": "/absolute/path/to/repo",
  "short": false
}

git_commit_analyze

Детальный анализ конкретного коммита.

{
  "repoPath": "/absolute/path/to/repo",
  "commitHash": "abc123"
}

Примеры использования

Проверка кода

"Show me the diff between main and the feature branch"
"What files changed in the last 5 commits?"
"Analyze the impact of commit abc123"

Состояние репозитория

"List all branches that can be safely deleted"
"Show me commits from the last week"
"Who are the top contributors to this project?"

Рабочая директория

"What's the current status of my repo?"
"Show me the staged changes"
"What files have uncommitted changes?"

Разработка

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Test locally
node dist/index.js

Тестирование

Этот проект использует Jest для тестирования с полным покрытием всех обработчиков инструментов Git.

# Run all tests
npm test

# Run tests with coverage report
npm run test:coverage

# Run tests in watch mode
npm run test:watch

Отчет о покрытии

Файл

Инструкции

Ветки

Функции

Строки

tools.ts

98%+

95%+

100%

98%+

Структура тестов

  • src/__tests__/tools.test.ts - Модульные тесты для всех 5 обработчиков инструментов Git

    • git_diff - 7 тестовых случаев

    • git_log - 13 тестовых случаев

    • git_branch - 10 тестовых случаев (список, сравнение, suggest_cleanup)

    • git_status - 5 тестовых случаев

    • git_commit_analyze - 4 тестовых случая

Качество кода

# Run ESLint
npm run lint

# Fix ESLint issues
npm run lint:fix

# Format with Prettier
npm run format

# Check formatting
npm run format:check

Требования

  • Node.js >= 18.0.0

  • Git установлен и доступен в PATH

Лицензия

MIT

Участие в разработке

Приветствуются любые вклады! Пожалуйста, ознакомьтесь с CONTRIBUTING.md для получения подробной информации.


Создано с 🦞 компанией BountyClaw

Available Tools

5 tools
git_branchB

Manage and analyze git branches. Provides branch listing, comparison, and management suggestions.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoPathYesAbsolute path to the git repository
actionYesAction to perform: list branches, compare branches, or suggest cleanup
branchNameNoBranch name for specific operations
baseBranchNoBase branch for comparison (default: main or master)
includeRemoteNoInclude remote branches in listing

TDQS

B3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided; description does not disclose behavioral traits (e.g., read vs write, side effects of 'suggest cleanup'). Only high-level actions are mentioned without deeper context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, but it is generic and not packed with information. Could be more concise while including key details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and description does not explain return values or usage context for the three actions. For a tool with 5 parameters, the description is too brief.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with adequate field descriptions. Description adds no extra parameter information beyond schema, meeting the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'Manage and analyze git branches' with specific actions 'branch listing, comparison, and management suggestions'. It distinguishes from siblings like git_commit_analyze and git_status which cover different aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. Sibling tool names provide some context but the description lacks when-to-use or when-not-to-use instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

git_commit_analyzeB

Analyze a specific commit in detail including changed files, statistics, and impact.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoPathYesAbsolute path to the git repository
commitHashNoCommit hash to analyze (default: HEAD)

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It mentions 'changed files, statistics, and impact' but does not disclose what 'impact' means, potential error states, or performance implications for large commits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that front-loads the verb and object, containing no redundant information. It earns its place with precise wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Without an output schema, the description should elaborate on return values (e.g., format, key fields). It only vaguely mentions 'changed files, statistics, and impact,' leaving the agent guessing about the tool's full output.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters are well-documented in the schema (repoPath and commitHash with default). The description adds no further detail for individual parameters, so it meets the baseline for high schema coverage but does not enhance meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool analyzes a specific commit in detail, including changed files, statistics, and impact. It effectively distinguishes from sibling tools like git_diff (diff analysis) and git_log (history) by focusing on a single commit's comprehensive breakdown.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when a detailed analysis of a specific commit is needed, but lacks explicit guidance on when not to use it or comparisons with alternatives like git_diff for detailed file changes.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

git_diffB

Analyze code changes between commits, branches, or working directory. Provides detailed diff analysis with statistics and file categorization.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoPathYesAbsolute path to the git repository
targetNoTarget to diff against (commit hash, branch name, or 'HEAD'). If omitted, shows uncommitted changes.
sourceNoSource to diff from (commit hash, branch name). If omitted with target, diffs target against working directory.
filePathNoSpecific file or directory path to diff (relative to repo root)
stagedNoShow staged changes only (git diff --cached)

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It describes the output as 'detailed diff analysis' but does not explicitly state that the tool is read-only or mention any side effects, auth needs, or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences long, front-loaded with the primary purpose, and contains no unnecessary words. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description provides a high-level overview but lacks details about return format, limits, or how statistics and categorization are presented. With no output schema, this leaves gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters. The description adds no parameter-specific details beyond the schema, justifying the baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool analyzes code changes between commits, branches, or the working directory. It distinguishes itself from sibling tools like git_log (history) and git_status (working tree status) by focusing specifically on diff analysis with statistics and categorization.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like git_log or git_commit_analyze. It only implies usage for diffing but lacks explicit context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

git_logC

Analyze commit history with filtering and statistics. Provides insights into commit patterns, contributors, and code evolution.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoPathYesAbsolute path to the git repository
maxCountNoMaximum number of commits to show (default: 20)
authorNoFilter commits by author name or email
sinceNoShow commits more recent than date (e.g., '2024-01-01', '1 week ago')
untilNoShow commits older than date
filePathNoShow commits affecting specific file or directory
branchNoBranch to log (default: current branch)
onelineNoShow commits in one-line format
statNoInclude file change statistics

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does not state that the operation is read-only, what permissions are needed, or any side effects. Merely mentioning 'analyze' does not disclose safety constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose. No redundant words. Could be slightly more structured, but it's efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 9 parameters, no output schema. The description does not explain return format, pagination, or how results are structured. For example, it doesn't say whether it returns plain list or statistical summary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema covers all 9 parameters with descriptions (100% coverage). The description adds no additional meaning beyond the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it 'analyze commit history' with filtering and statistics, which is a specific verb and resource. It distinguishes from sibling tools like git_branch or git_diff, but could be more precise about what kind of analysis (e.g., 'list commits' vs. 'analyze patterns').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like git_commit_analyze or git_diff. The description implies general history analysis but does not specify scenarios or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

git_statusC

Get comprehensive repository status including staged, unstaged, and untracked files.

ParametersJSON Schema
NameRequiredDescriptionDefault
repoPathYesAbsolute path to the git repository
shortNoShow short format output

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It states the tool retrieves status (implied read-only) but does not disclose any other behavioral traits, side effects, or constraints beyond the basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is a single concise sentence that front-loads the action. Its brevity is appropriate, though it could benefit from slightly more structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so description should explain return values. It mentions types of files included but lacks detail on output format. Adequate for a simple tool but not comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with both parameters described. Description does not add meaning beyond what the schema provides; it only mentions 'comprehensive status' without linking to parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states the tool gets repository status and specifies it includes staged, unstaged, and untracked files. This distinguishes it from siblings like git_diff or git_log, but does not explicitly compare to them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives like git_diff or git_log. Description implies usage for status but does not provide context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv1.0.2
    • First observedgit_branch
    • First observedgit_commit_analyze
    • First observedgit_diff
    • First observedgit_log
    • First observedgit_status

TDQS

B3.4/5.0
Disambiguation5/5

Each tool targets a distinct aspect of git: branches, commits, diffs, log history, and repository status. No functional overlap exists.

Naming Consistency4/5

All tools follow 'git_' prefix with descriptive nouns, but 'git_commit_analyze' deviates slightly from the single-noun pattern of the others.

Tool Count5/5

Five tools cover essential analysis operations without being excessive or insufficient for the server's stated analytical focus.

Completeness3/5

Tools provide broad analysis coverage but lack creation or modification operations (e.g., no commit creation, branch creation beyond suggestions), leaving notable gaps for full git workflows.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    The Git MCP Server allows AI assistants to perform enhanced Git operations via the Model Context Protocol, supporting core Git functions, branch and tag management, GitHub integration, and more.
    21
    607
    6
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides tools for interacting with Git repositories, enabling AI assistants to manage repositories, branches, commits, and files through a standardized interface.
    7,389
    1
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for managing Git reference repositories, enabling AI assistants to add, load, and sync reference code from any Git repository.
    13
    MIT

Latest Blog Posts

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/davidweb3-ctrl/mcp-git-enhanced'

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