Skip to main content
Glama
skurekjakub

Git Stuff Server

by skurekjakub

Git Stuff 서버

이 저장소에는 Git 관련 기능을 제공하는 MCP(Model Context Protocol) 서버 역할을 하는 Node.js 애플리케이션이 포함되어 있습니다. 현재 Git 병합 커밋의 첫 번째 부모 커밋과의 차이점을 생성하는 도구를 제공합니다.

특징

  • MCP 서버: stdio를 사용하여 통신하는 표준 MCP 서버로 실행됩니다.

  • get_git_merge_diff 도구:

    • Git 병합 커밋 해시를 허용합니다.

    • GenerateMergeDiff.ps1 PowerShell 스크립트를 실행합니다.

    • git show -m --first-parent <commitHash> 로 생성된 텍스트 diff 내용을 반환합니다.

Related MCP server: agent-services-mcp

필수 조건

  • Node.js (ES 모듈을 지원하는 버전, 지정된 경우 package.json 에서 engines 확인, 그렇지 않은 경우 tsconfig.json 대상 확인 - ES2022)

  • npm (일반적으로 Node.js와 함께 제공됨)

  • Git이 설치되어 있고 시스템의 PATH에 접근 가능합니다.

  • PowerShell (Windows) 또는 pwsh (Linux/macOS)가 설치되어 시스템의 PATH에 접근 가능합니다.

설치

  1. 저장소를 복제합니다.

    지엑스피1

  2. 종속성 설치:

    npm install

용법

  1. TypeScript 코드를 작성합니다.

    npm run build

    이는 src/ 의 TypeScript 코드를 build/ 의 JavaScript로 컴파일합니다.

  2. 서버를 실행합니다:

    • 컴파일된 코드를 실행하려면:

      npm start
    • 개발 모드에서 빌드하고 실행하려면:

      npm run dev

서버가 시작되어 표준 입출력에서 MCP 요청을 수신합니다.

get_git_merge_diff 도구 사용

MCP 클라이언트를 통해 연결된 경우 다음 입력으로 get_git_merge_diff 도구를 호출할 수 있습니다.

  • commitHash (문자열): 비교하려는 병합 커밋의 Git 커밋 해시(SHA)입니다.

이 도구는 diff 내용을 텍스트로 반환합니다.

작동 원리

  1. MCP 서버( src/index.ts )는 get_git_merge_diff 도구에 대한 요청을 받습니다.

  2. commitHash 입력의 유효성을 검사합니다.

  3. GenerateMergeDiff.ps1 PowerShell 스크립트를 실행하여 commitHash 전달합니다.

  4. PowerShell 스크립트는 git show -m --first-parent <commitHash> 실행하고 출력(오류 포함)을 서버의 현재 작업 디렉터리에 있는 merge_changes.diff 라는 임시 파일에 저장합니다.

  5. Node.js 서버는 merge_changes.diff 의 내용을 읽습니다.

  6. 서버는 임시 merge_changes.diff 파일을 삭제합니다.

  7. 서버는 diff 콘텐츠(또는 오류 메시지)를 MCP 클라이언트에 반환합니다.

구성

주요 구성 지점은 src/index.ts 내의 상수로 정의됩니다.

  • SERVER_NAME : MCP 서버에 등록된 이름입니다.

  • SCRIPT_NAME : 실행할 PowerShell 스크립트의 파일 이름입니다.

  • OUTPUT_DIFF_FILE : 스크립트가 생성한 임시 diff 파일의 이름입니다.

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 package.json 파일을 참조하세요.

Available Tools

4 tools
ado_pr_changesC

Fetches changes from an Azure DevOps Pull Request with full diff content using the Azure DevOps Node API.

ParametersJSON Schema
NameRequiredDescriptionDefault
organizationIdYesOptional organization identifier to load specific configuration settings.
pullRequestIdYesThe numeric ID of the Pull Request (as a string).

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions fetching changes with 'full diff content', which implies a read-only operation, but doesn't clarify permissions, rate limits, or what the output format looks like (e.g., JSON structure, error handling). This leaves significant gaps for a tool that interacts with an external API.

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, efficient sentence that front-loads the core purpose without unnecessary details. Every word contributes to understanding the tool's function, making it highly concise and well-structured.

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?

Given the complexity of interacting with Azure DevOps API and no annotations or output schema, the description is incomplete. It lacks details on authentication, error cases, return format (e.g., diff structure), and how it differs from sibling tools, making it inadequate for safe and effective use by 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?

The input schema has 100% description coverage, clearly documenting both parameters ('pullRequestId' and 'organizationId'). The description adds no additional parameter semantics beyond what the schema provides, such as example values or usage context, so it meets the baseline for high schema coverage.

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 the action ('fetches changes') and resource ('Azure DevOps Pull Request'), specifying it includes 'full diff content' and uses the 'Azure DevOps Node API'. However, it doesn't explicitly distinguish this tool from sibling tools like 'ado_pr_comment' or 'ado_pr_threads', which likely handle different aspects of pull requests.

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 is provided on when to use this tool versus alternatives. The description doesn't mention sibling tools like 'ado_pr_comment' or 'git_merge_diff', nor does it specify prerequisites or contexts for usage, leaving the agent to infer based on the tool name alone.

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

ado_pr_commentB

Posts a comment to an Azure DevOps Pull Request. Can reply to existing threads or create new ones.

ParametersJSON Schema
NameRequiredDescriptionDefault
commentsToPostYes
organizationIdNo
pullRequestIdYes

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the ability to reply or create threads, which adds some behavioral context, but fails to disclose critical traits like required permissions, rate limits, whether comments are editable/deletable, or the response format. For a mutation tool with zero annotation coverage, this is inadequate.

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 concise sentences with zero waste, front-loaded with the core purpose. Every word earns its place, making it easy to scan and understand quickly without unnecessary 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?

Given the complexity of a mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on permissions, error handling, return values, and full parameter explanations, leaving significant gaps for an AI agent to use it correctly.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It mentions 'reply to existing threads or create new ones', which hints at the 'threadId' parameter's purpose, but doesn't explain the meaning of 'commentsToPost', 'organizationId', or 'pullRequestId'. With 3 parameters and low coverage, the description adds minimal value beyond the schema.

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 the action ('Posts a comment') and target resource ('to an Azure DevOps Pull Request'), distinguishing it from siblings like 'ado_pr_changes' or 'ado_pr_threads'. However, it doesn't specify if this is for creating new PRs versus existing ones, which would make it a 5.

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 by mentioning 'Can reply to existing threads or create new ones', which suggests when to use it for different comment types. However, it lacks explicit guidance on when to choose this tool over alternatives like 'ado_pr_threads' or 'git_merge_diff', and doesn't mention prerequisites or exclusions.

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

ado_pr_threadsC

Fetches all active comment threads from an Azure DevOps Pull Request.

ParametersJSON Schema
NameRequiredDescriptionDefault
organizationIdNoOptional organization identifier to load specific configuration settings.
pullRequestIdYesThe numeric ID of the Pull Request (as a string).

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states it 'fetches' data, implying a read-only operation, but doesn't clarify authentication needs, rate limits, pagination, error handling, or what 'active' entails (e.g., unresolved threads only). For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's front-loaded with the core action and resource, making it easy to parse. Every element earns its place, and there's no redundancy or fluff, achieving optimal conciseness.

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?

Given the complexity of fetching PR threads, lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'active' means, the return format (e.g., list of threads with comments), or any behavioral aspects like permissions or errors. For a tool with no structured support, more detail is needed to ensure the agent can use it effectively without guesswork.

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%, with clear documentation for both parameters: 'pullRequestId' (required numeric ID) and 'organizationId' (optional for configuration). The description adds no additional parameter semantics beyond what the schema provides, such as format examples or usage tips. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but also doesn't detract.

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 the action ('fetches') and resource ('all active comment threads from an Azure DevOps Pull Request'), making the purpose immediately understandable. It distinguishes from sibling tools like 'ado_pr_changes' (which likely fetches code changes) and 'ado_pr_comment' (which likely creates comments). However, it doesn't explicitly mention how it differs from 'git_merge_diff' or specify what 'active' means in this context.

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 'ado_pr_comment' (for commenting) or 'git_merge_diff' (for diff analysis). It doesn't mention prerequisites, such as needing access to the Azure DevOps instance, or contextual factors like whether it's for review workflows. The absence of usage context leaves the agent to infer based on tool names alone.

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

git_merge_diffB

Generates the text diff for a Git merge commit against its first parent within a specified local repository.

ParametersJSON Schema
NameRequiredDescriptionDefault
commitHashYesThe Git commit hash (SHA) of the merge commit.
repoPathYesThe absolute path to the local Git repository directory.

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates a diff but doesn't mention behavioral traits like whether it's read-only, if it modifies the repository, error handling for invalid commits, or output format details. This leaves significant gaps in understanding how the tool behaves beyond its 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.

Conciseness5/5

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

The description is a single, well-structured sentence that efficiently conveys the tool's purpose without unnecessary words. It's front-loaded with the core action and includes essential details, making it easy to understand at a glance while avoiding redundancy or fluff.

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?

Given the lack of annotations and output schema, the description is incomplete for a tool that performs a potentially complex operation like Git diff generation. It doesn't explain what the output looks like (e.g., text format, error messages), behavioral constraints, or integration details, leaving the agent with insufficient context to use it effectively beyond basic invocation.

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%, with clear descriptions for both parameters (commitHash and repoPath). The description adds minimal value beyond the schema by specifying that the commit must be a merge commit and the diff is against its first parent, but it doesn't provide additional semantics like format examples or edge cases. This meets the baseline for high schema coverage.

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 specific action ('Generates the text diff') and resource ('for a Git merge commit against its first parent within a specified local repository'), distinguishing it from sibling tools like ado_pr_changes which likely handle Azure DevOps pull requests rather than local Git operations. It precisely defines what the tool does without being vague or tautological.

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, such as when to prefer it over other diff tools or in what scenarios it's applicable. It mentions a 'specified local repository' but doesn't clarify prerequisites like needing Git installed or the repository being accessible, leaving usage context implied rather than explicit.

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.

  1. 4 tool updatesv1.0.0
    • First observedado_pr_changes
    • First observedado_pr_comment
    • First observedado_pr_threads
    • First observedgit_merge_diff

TDQS

C2.9/5.0

Scored across 4 tools

Disambiguation4/5

Three tools (ado_pr_changes, ado_pr_comment, ado_pr_threads) are clearly distinct and focused on Azure DevOps pull request operations, with no overlap in their purposes. The fourth tool (git_merge_diff) is unrelated to Azure DevOps and operates on local Git repositories, creating a minor domain mismatch but no functional ambiguity.

Naming Consistency2/5

The naming is inconsistent across the tool set. The first three tools use a consistent 'ado_pr_' prefix with descriptive suffixes (changes, comment, threads), but the fourth tool uses a different 'git_' prefix with a different structure (merge_diff). This mixed convention reduces predictability and coherence.

Tool Count3/5

With only 4 tools, the count feels thin for a server named 'Git Stuff Server', which implies broader Git-related functionality. The tools are split between Azure DevOps PR operations and a local Git diff tool, making the scope appear fragmented rather than comprehensive.

Completeness2/5

For Azure DevOps pull requests, the tools cover fetching changes, commenting, and fetching threads, but lack core operations like creating, updating, or merging pull requests. For local Git operations, only one diff tool is provided, missing basic commands like clone, commit, or push. This results in significant gaps that will hinder agent workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers