git-commands-mcp

git-commands-mcp

3.2

If you are the rightful owner of git-commands-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A Node.js implementation of a Git repository browser using the Model Context Protocol (MCP).

The MCP Git Repo Browser is a Node.js-based server that allows users to interact with Git repositories using the Model Context Protocol (MCP). It provides a set of tools for performing various operations on Git repositories, such as viewing directory structures, reading file contents, searching code, comparing branches, and retrieving commit histories. The server is designed to be efficient and modular, leveraging Node.js native modules and libraries like simple-git for Git operations. It supports both global installation via npm and manual setup, and it is compatible with MCP clients through stdio communication. The project also includes a CI/CD pipeline using GitHub Actions for automatic npm publishing.

Features

  • Basic Repository Operations: Provides tools for viewing directory structures, reading files, and searching code.
  • Branch Operations: Allows comparison of branches and viewing of changes between them.
  • Commit Operations: Retrieves commit history and detailed commit information.
  • Local Changes: Displays uncommitted changes in the working directory.
  • Modular Code Structure: Ensures maintainability and efficiency through a well-organized codebase.

Tools

  1. git_directory_structure

    Returns the ASCII tree representation of the repository directory structure

  2. git_read_files

    Read and return the contents of the specified file

  3. git_search_code

    Search for specified schema in repository code

  4. git_branch_diff

    Compare two branches and show file differences

  5. git_commit_history

    Get the commit history of the branch

  6. git_commits_details

    Get details of the submission

  7. git_local_changes

    Get uncommitted changes in the working directory