Git Repo Browser
Provides a tree-like representation of a Git repository's directory structure and reads specified file contents.
About
This Node.js tool, leveraging the Model Context Protocol (MCP), enables users to browse Git repositories programmatically. It exposes two key functionalities: generating an ASCII tree representation of a repository's directory structure and retrieving the contents of specified files. The tool is designed for efficiency by reusing cloned repositories and employs robust error handling. It integrates with MCP via stdio, allowing seamless interaction with MCP clients. Requires Node.js 14.x or higher and Git to be installed.
Key Features
- Reuses cloned repositories for efficiency.
- Generates a tree-like directory structure of a Git repository.
- Implements clean error handling and resource cleanup.
- Reads and returns the contents of specified files within a repository.
- Creates deterministic temporary directories based on repository URL hashes.