- Home
- MCP servers
- GitHub Repo
GitHub Repo
- javascript
24
GitHub Stars
javascript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ryan0204-github-repo-mcp": {
"command": "npx",
"args": [
"-y",
"github-repo-mcp"
],
"env": {
"GITHUB_TOKEN": "<GITHUB_TOKEN>"
}
}
}
}GitHub Repo MCP lets your AI assistants browse GitHub repositories, explore directories, and view file contents. It supports interactive repository navigation from MCP clients over the standard stdio protocol, making it easy to fetch directory listings and file contents from public repositories without leaving your conversational workspace.
How to use
You connect to the GitHub Repo MCP server through an MCP client that supports the stdio protocol. Once connected, you can ask your assistant to list repository contents, drill into directories, and display file content from public GitHub repositories. The three core tools are designed to help you navigate any repository you specify by URL and path.
How to install
Prerequisites you need on your system are Node.js 18+ and npm or yarn.
# MacOS / other environments using NPX directly
npx github-repo-mcp
# Windows via NPX
cmd /c npx -y github-repo-mcp
# Smithery installation (Claude Desktop)
npx -y @smithery/cli install @Ryan0204/github-repo-mcp --client claude
Step-by-step start options
There are multiple ways to start the MCP server, depending on how you want to integrate it with your workflow. The most straightforward method is to run the NPX command directly in a terminal. If you use your IDE’s MCP file, you can place the appropriate entry in your mcpServers configuration to start it automatically.
// Example mcpServers entry using stdio to run the MCP locally
{
"mcpServers": {
"github_repo_mcp": {
"command": "npx",
"args": ["github-repo-mcp"],
"enabled": true
}
}
}
Environment and tokens
You can optionally provide a GitHub personal access token to increase API rate limits when accessing the GitHub API.
{
"mcpServers": {
"github_repo_mcp": {
"command": "npx",
"args": ["github-repo-mcp"],
"env": {
"GITHUB_TOKEN": "Your_Github_Token"
},
"enabled": true
}
}
}
Available tools
getRepoAllDirectories
Lists all files and directories at the root of a GitHub repository. Parameters: repoUrl.
getRepoDirectories
Lists contents of a specific directory in a GitHub repository. Parameters: repoUrl, path.
getRepoFile
Retrieves and displays the content of a specific file from a GitHub repository. Parameters: repoUrl, path.