接入你的智能体
發布者自己的指令。不是 PlugMCP 端點。
用我們的金鑰與日誌託管一份副本。
npx -y [email protected]Claude Code 沒有本機指令的安裝連結。複製下方指令並在終端機中執行。
claude mcp add github-repo-mcp -- npx -y github-repo-mcp@1.0.3在終端機中執行。
{ "mcpServers": { "github-repo-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}claude_desktop_config.json
遠端 URL 還是本機指令? 兩種安裝方式的差異
stdio protocolInstalling the server requires the following on your system:
You can install and run GitHub Repo MCP using Smithery, NPX, or setting in mcp.json of your IDE:
npx github-repo-mcp
cmd /c npx -y github-repo-mcp
{
"mcpServers": {
"github-repo-mcp": {
"command": "wsl",
"args": [
"bash",
"-c",
"cmd /c npx -y github-repo-mcp"
],
"enabled": true
}
}
}
# 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
}
}
}
To install GitHub Repo MCP for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @Ryan0204/github-repo-mcp --client claude
Wait 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.
The GitHub Repo MCP server can use a GitHub token for higher rate limits when accessing the GitHub API.
While the server works without authentication, GitHub API has rate limits that are much lower for unauthenticated requests. To increase your rate limit:
{
"mcpServers": {
"github-repo-mcp": {
"command": "...",
"args": [
...
],
"env": {
"GITHUB_TOKEN": "Your_Github_Token"
}
"enabled": true,
}
}
}
The server provides three main tools for interacting with GitHub repositories:
getRepoAllDirectoriesLists all files and directories at the root of a GitHub repository.
repoUrl: The URL of the GitHub repository (e.g., "https://github.com/owner/repo")getRepoDirectoriesLists contents of a specific directory in a GitHub repository.
repoUrl: The URL of the GitHub repositorypath: The directory path to fetch (e.g., "src")getRepoFileRetrieves and displays the content of a specific file from a GitHub repository.
repoUrl: The URL of the GitHub repositorypath: The file path to fetch (e.g., "src/index.js")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"
Here are some common issues and their solutions:
If you encounter any issues, please check the output for error messages or create an issue in the GitHub repository.
Enjoy! ☺️
{ "mcpServers": { "github-repo-mcp": { "command": "npx", "args": [ "-y", "[email protected]" ] } }}工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Github Repo 透過 stdio 在本機執行。
上次檢查時間:2026-11-16。 MCP server for fetching GitHub repository code