Labsco
Ryan0204 logo

GitHub Repo MCP

β˜… 27

from Ryan0204

Browse GitHub repositories, explore directories, and view file contents.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

GitHub Repo MCP

GitHub Repo MCP is an open-source MCP server that lets your AI assistants browse GitHub repositories, explore directories, and view file contents.

Table of contents

Getting started β€’ Feature overview

✨ Key features

  • πŸ’» Compatible with Cursor, Windsurf, Claude Desktop, and other MCP clients supporting stdio protocol

  • πŸ”Ž Browse the contents of any public GitHub repository

  • πŸ“‚ Navigate through repository directories and subdirectories

  • πŸ“ View the content of code and text files

  • πŸ“¦ Easy installation via package manager

Feature Overview

Repository Browsing Tools

The server provides three main tools for interacting with GitHub repositories:

1. getRepoAllDirectories

Lists all files and directories at the root of a GitHub repository.

2. getRepoDirectories

Lists contents of a specific directory in a GitHub repository.

  • Parameters:

  • repoUrl: The URL of the GitHub repository

  • path: The directory path to fetch (e.g., "src")

3. getRepoFile

Retrieves and displays the content of a specific file from a GitHub repository.

  • Parameters:

  • repoUrl: The URL of the GitHub repository

  • path: The file path to fetch (e.g., "src/index.js")

Usage Examples

Here are some examples of how to use these tools with an AI assistant:

Browsing a repository root: Ask your AI assistant to "Show me the contents of the repository at https://github.com/Ryan0204/github-repo-mcp"

Exploring a specific directory: Ask "What files are in the src directory of https://github.com/Ryan0204/github-repo-mcp?"

Viewing a file: Ask "Show me the README.md file from https://github.com/Ryan0204/github-repo-mcp"

Limitations

  • Rate Limiting: Without authentication, GitHub API has strict rate limits (60 requests per hour)

  • Private Repositories: Can only access public repositories unless a token with appropriate permissions is provided

  • Binary Files: The server detects common binary file extensions and won't display their contents

  • Large Files: GitHub API has limitations on the size of files that can be retrieved