github-repo-mcp
GitHub Repo MCP allows AI assistants to browse and explore GitHub repositories. With this server, you can:
Browse any public GitHub repository's contents, including root directories, subdirectories, and files
List all entries at any directory level within repositories
Retrieve and display the content of code and text files
The server is compatible with MCP clients such as Cursor, Windsurf, and Claude Desktop (supporting the stdio protocol), offers easy installation via npm, yarn, or Smithery, and includes optional GitHub token authentication for higher API rate limits.
Key tools provided include getRepoAllDirectories, getRepoDirectories, and getRepoFile for specific repository interactions.
Enables browsing public GitHub repositories, navigating through directories, and viewing file contents with tools for listing repository files and fetching specific file data.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@github-repo-mcpshow me the README.md file from https://github.com/Ryan0204/github-repo-mcp"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitHub Repo MCP
Table of contents
Related MCP server: UIThub MCP Server
β¨ Key features
π» Compatible with Cursor, Windsurf, Claude Desktop, and other MCP clients supporting
stdioprotocolπ 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
Getting Started
Prerequisites
Installing the server requires the following on your system:
Node.js 18+
npm or yarn
Step 1. Installation
You can install and run GitHub Repo MCP using Smithery, NPX, or setting in mcp.json of your IDE:
MacOS
npx github-repo-mcpWindows NPX
cmd /c npx -y github-repo-mcpWindows NPX via .cursor/mcp.json
{
"mcpServers": {
"github-repo-mcp": {
"command": "wsl",
"args": [
"bash",
"-c",
"cmd /c npx -y github-repo-mcp"
],
"enabled": true
}
}
}Windows NPX via .cursor/mcp.json (if path not set)
# Find the full path to npx first
which npx{
"mcpServers": {
"github-repo-mcp": {
"command": "wsl",
"args": [
"bash",
"-c",
"'/home/[username]/.nvm/versions/node/v20.18.0/bin/npx github-repo-mcp'"
],
"enabled": true
}
}
}Installing via Smithery
To install GitHub Repo MCP for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Ryan0204/github-repo-mcp --client claudeWait 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.
Step 2. Configuration
The GitHub Repo MCP server can use a GitHub token for higher rate limits when accessing the GitHub API.
Environment Variables
Variable | Required | Default | Description |
| No | None | Your GitHub personal access token for higher rate limits |
Setting Up a GitHub Token (Optional)
While the server works without authentication, GitHub API has rate limits that are much lower for unauthenticated requests. To increase your rate limit:
Create a personal access token at https://github.com/settings/tokens
Set the token as an environment variable in mcp.json:
{
"mcpServers": {
"github-repo-mcp": {
"command": "...",
"args": [
...
],
"env": {
"GITHUB_TOKEN": "Your_Github_Token"
}
"enabled": true,
}
}
}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.
Parameters:
repoUrl: The URL of the GitHub repository (e.g., "https://github.com/owner/repo")
2. getRepoDirectories
Lists contents of a specific directory in a GitHub repository.
Parameters:
repoUrl: The URL of the GitHub repositorypath: 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 repositorypath: 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
Troubleshooting
Here are some common issues and their solutions:
Rate limit exceeded: Set up a GitHub token as described in the Configuration section
Command not found: Ensure the package is installed globally
Connection errors: Check your internet connection and GitHub API status
If you encounter any issues, please check the output for error messages or create an issue in the GitHub repository.
Enjoy! βΊοΈ
Available Tools
3 toolsgetRepoAllDirectoriesD
| Name | Required | Description | Default |
|---|---|---|---|
| repoUrl | Yes | The URL of the Github repo |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getRepoDirectoriesD
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The directory path to fetch | |
| repoUrl | Yes | The URL of the Github repo |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getRepoFileD
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | The file path to fetch | |
| repoUrl | Yes | The URL of the Github repo |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
3 tool updates
v1.0.0- First observed
getRepoAllDirectories - First observed
getRepoDirectories - First observed
getRepoFile
TDQS
The tools have overlapping purposes with unclear boundaries: getRepoAllDirectories and getRepoDirectories appear to serve similar directory-related functions without descriptions to clarify their differences, while getRepoFile is distinct but the directory tools are ambiguous. This overlap will likely cause misselection between the two directory tools.
The naming follows a consistent camelCase pattern (getRepoAllDirectories, getRepoDirectories, getRepoFile) with a clear verb_noun structure, though the lack of descriptions makes it harder to assess intent. There are no deviations in style, but the similarity in names for the directory tools slightly reduces clarity.
With only 3 tools, this server feels thin for a GitHub repository domain, as it lacks essential operations like create, update, delete, or search. The limited scope suggests incomplete coverage, making it difficult for agents to perform comprehensive repository management tasks.
The tool surface is severely incomplete for a GitHub repository server: it only includes retrieval tools for directories and files, missing core CRUD operations (e.g., create repo, update files, delete items), search functionality, and lifecycle management. This will cause significant agent failures in handling typical repository workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Model Context Protocol server for Studex tools, notifications, and profile integrations
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.β¦
A Model Context Protocol server for Wix AI tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA server that allows AI assistants to browse and read files from specified GitHub repositories, providing access to repository contents via the Model Context Protocol.6MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that enables Claude to retrieve and analyze code from GitHub repositories through the uithub API.1421MIT
- FlicenseNot gradedqualityDmaintenanceA server-side implementation that handles context processing between GitHub repositories and AI models, enabling seamless integration of AI capabilities with codebases through the Model Context Protocol.1-
- FlicenseNot gradedqualityNot gradedmaintenanceModel Context Protocol server that enables interaction with GitHub repositories, issues, pull requests, and search functionality through natural language.1-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ryan0204/github-repo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server