GitHub Repo MCP is an open-source MCP server that lets your AI assistants browse GitHub repositories, explore directories, and view file contents. Getting started β’ Feature overview - π» 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 subdirect
Add this skill
npx mdskills install Ryan0204/github-repo-mcpWell-documented MCP server with clear tool descriptions and comprehensive setup instructions across platforms
1# GitHub Repo MCP23[](https://smithery.ai/server/@Ryan0204/github-repo-mcp)45<p class="center-text">6 <strong>GitHub Repo MCP is an open-source MCP server that lets your AI assistants browse GitHub repositories, explore directories, and view file contents.</strong>7</p>89<a href="https://glama.ai/mcp/servers/@Ryan0204/github-repo-mcp">10 <img width="380" height="200" src="https://glama.ai/mcp/servers/@Ryan0204/github-repo-mcp/badge" alt="github-repo-mcp MCP server" />11</a>1213## Table of contents1415<p class="center-text">16 <a href="#getting-started">Getting started</a> β’17 <a href="#feature-overview">Feature overview</a>18</p>1920## β¨ Key features2122- π» Compatible with Cursor, Windsurf, Claude Desktop, and other MCP clients supporting `stdio` protocol23- π Browse the contents of any public GitHub repository24- π Navigate through repository directories and subdirectories25- π View the content of code and text files26- π¦ Easy installation via package manager2728## Getting Started2930### Prerequisites3132Installing the server requires the following on your system:33- Node.js 18+34- npm or yarn3536### Step 1. Installation3738You can install and run GitHub Repo MCP using Smithery, NPX, or setting in mcp.json of your IDE:3940#### MacOS4142```bash43npx github-repo-mcp44```4546#### Windows NPX4748```bash49cmd /c npx -y github-repo-mcp50```5152#### Windows NPX via .cursor/mcp.json5354```json55{56 "mcpServers": {57 "github-repo-mcp": {58 "command": "wsl",59 "args": [60 "bash",61 "-c",62 "cmd /c npx -y github-repo-mcp"63 ],64 "enabled": true65 }66 }67}68```6970#### Windows NPX via .cursor/mcp.json (if path not set)7172```bash73# Find the full path to npx first74which npx75```7677```json78{79 "mcpServers": {80 "github-repo-mcp": {81 "command": "wsl",82 "args": [83 "bash",84 "-c",85 "'/home/[username]/.nvm/versions/node/v20.18.0/bin/npx github-repo-mcp'"86 ],87 "enabled": true88 }89 }90}91```9293#### Installing via Smithery9495To install GitHub Repo MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@Ryan0204/github-repo-mcp):9697```bash98npx -y @smithery/cli install @Ryan0204/github-repo-mcp --client claude99```100101102Wait a few seconds or click on the refresh button a few times if it does not register. If it still won't register, make sure you entered the right command.103104### Step 2. Configuration105106The GitHub Repo MCP server can use a GitHub token for higher rate limits when accessing the GitHub API.107108#### Environment Variables109110| Variable | Required | Default | Description |111|----------|----------|---------|-------------|112| `GITHUB_TOKEN` | No | None | Your GitHub personal access token for higher rate limits |113114#### Setting Up a GitHub Token (Optional)115116While the server works without authentication, GitHub API has rate limits that are much lower for unauthenticated requests. To increase your rate limit:1171181. Create a personal access token at https://github.com/settings/tokens1192. Set the token as an environment variable in mcp.json:120121```json122{123 "mcpServers": {124 "github-repo-mcp": {125 "command": "...",126 "args": [127 ...128 ],129 "env": {130 "GITHUB_TOKEN": "Your_Github_Token"131 }132 "enabled": true,133 }134 }135}136```137138## Feature Overview139140### Repository Browsing Tools141142The server provides three main tools for interacting with GitHub repositories:143144#### 1. `getRepoAllDirectories`145146Lists all files and directories at the root of a GitHub repository.147148- **Parameters**:149 - `repoUrl`: The URL of the GitHub repository (e.g., "https://github.com/owner/repo")150151#### 2. `getRepoDirectories`152153Lists contents of a specific directory in a GitHub repository.154155- **Parameters**:156 - `repoUrl`: The URL of the GitHub repository157 - `path`: The directory path to fetch (e.g., "src")158159#### 3. `getRepoFile`160161Retrieves and displays the content of a specific file from a GitHub repository.162163- **Parameters**:164 - `repoUrl`: The URL of the GitHub repository165 - `path`: The file path to fetch (e.g., "src/index.js")166167### Usage Examples168169Here are some examples of how to use these tools with an AI assistant:1701711. **Browsing a repository root**:172 Ask your AI assistant to "Show me the contents of the repository at https://github.com/Ryan0204/github-repo-mcp"1731742. **Exploring a specific directory**:175 Ask "What files are in the src directory of https://github.com/Ryan0204/github-repo-mcp?"1761773. **Viewing a file**:178 Ask "Show me the README.md file from https://github.com/Ryan0204/github-repo-mcp"179180### Limitations181182- **Rate Limiting**: Without authentication, GitHub API has strict rate limits (60 requests per hour)183- **Private Repositories**: Can only access public repositories unless a token with appropriate permissions is provided184- **Binary Files**: The server detects common binary file extensions and won't display their contents185- **Large Files**: GitHub API has limitations on the size of files that can be retrieved186187## Troubleshooting188189Here are some common issues and their solutions:190191- **Rate limit exceeded**: Set up a GitHub token as described in the Configuration section192- **Command not found**: Ensure the package is installed globally193- **Connection errors**: Check your internet connection and GitHub API status194195If you encounter any issues, please check the output for error messages or create an issue in the GitHub repository.196197---198199Enjoy! βΊοΈ200
Full transparency β inspect the skill content before installing.