Labsco
MCP SERVER

MCP Git Repo Browser

by razorback16

Give an assistant a repository URL and it clones it once, then hands back the directory tree and the contents of the files you name.

Code Intelligence & Repository Indexing
Summary
Two calls, in the right order.

The shape is deliberate: get the tree first so the model can choose which files matter, then read only those. That is cheaper on context than dumping a repository into the conversation, and it works on any repository your machine's git can clone.

What it is

A small Node.js MCP server that reads public git repositories. It clones into a temporary directory keyed by a hash of the repository URL, so the same repository is only fetched once and later calls reuse it.

What you get
  • `git_directory_structure` — take a repository URL and return an ASCII tree of its layout
  • `git_read_important_files` — take a repository URL and a list of file paths, and return each path mapped to its contents
  • Repository reuse between calls, so browsing the tree then reading five files does not clone five times
Requirements

No account and no key. Node.js 14.x or higher and git installed on the system. Clone the repository, `npm install`, and point the client's config at `node /path/to/mcp-git-repo-browser/src/index.js`. It runs on stdio. Package `mcp-git-repo-browser` at 0.1.0, MIT.