{"_id":"@iflow-mcp/github-repo-mcp","name":"@iflow-mcp/github-repo-mcp","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@iflow-mcp/github-repo-mcp","version":"1.0.1","description":"MCP server for fetching GitHub repository code","main":"dist/index.js","type":"module","scripts":{"inspect":"tsc && npx @modelcontextprotocol/inspector node -- dist/index.js","inspect-live":"npx @modelcontextprotocol/inspector npx -- github-repo-mcp","build":"tsc","start":"tsc && node dist/index.js","dev":"nodemon --exec ts-node-esm index.ts"},"repository":{"type":"git","url":"git+https://github.com/Ryan0204/github-repo-mcp.git"},"keywords":["mcp","github","modelcontextprotocol","repository","code","fetch","ai","agent","mcp-server"],"author":{"name":"Ryan Chan"},"license":"MIT","dependencies":{"@modelcontextprotocol/sdk":"^1.10.2","octokit":"^3.1.2","zod":"^3.22.4"},"devDependencies":{"@types/node":"^20.10.5","nodemon":"^3.0.2","ts-node":"^10.9.2","typescript":"^5.3.3"},"bin":{"github-repo-mcp":"dist/index.js","mcp-github":"dist/index.js"},"_id":"@iflow-mcp/github-repo-mcp@1.0.1","gitHead":"724db078e177399904af0710c3a0abf0388065bb","bugs":{"url":"https://github.com/Ryan0204/github-repo-mcp/issues"},"homepage":"https://github.com/Ryan0204/github-repo-mcp#readme","_nodeVersion":"24.8.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-roR99AdJYHvBUgmFkrbB6HbI+GQMbI0RS4n/gzxXGvDUzTth3cYTg5alMo2ll4uHpKYCEFEnzKZKY/ShS9CX2Q==","shasum":"fea93c1f3f0c48d9dfc6ed1a3be48efde27fd361","tarball":"https://registry.npmjs.org/@iflow-mcp/github-repo-mcp/-/github-repo-mcp-1.0.1.tgz","fileCount":9,"unpackedSize":19496,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCJJK6neJavg1i0V4iB+Jzo/qNx1T7iYpIx6zNxoYuiBgIgN1VshOklGTpeCf05nP3lZ9U6R15HUpaluDj+JrHb1jM="}]},"_npmUser":{"name":"chatflowdev","email":"chatflowdev@gmail.com"},"directories":{},"maintainers":[{"name":"chatflowdev","email":"chatflowdev@gmail.com"},{"name":"qystart","email":"987472953@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/github-repo-mcp_1.0.1_1761731868332_0.9590409177010195"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-29T09:57:48.257Z","1.0.1":"2025-10-29T09:57:48.544Z","modified":"2025-10-29T09:57:48.810Z"},"maintainers":[{"name":"chatflowdev","email":"chatflowdev@gmail.com"},{"name":"qystart","email":"987472953@qq.com"}],"description":"MCP server for fetching GitHub repository code","homepage":"https://github.com/Ryan0204/github-repo-mcp#readme","keywords":["mcp","github","modelcontextprotocol","repository","code","fetch","ai","agent","mcp-server"],"repository":{"type":"git","url":"git+https://github.com/Ryan0204/github-repo-mcp.git"},"author":{"name":"Ryan Chan"},"bugs":{"url":"https://github.com/Ryan0204/github-repo-mcp/issues"},"license":"MIT","readme":"# GitHub Repo MCP\n\n[![smithery badge](https://smithery.ai/badge/@Ryan0204/github-repo-mcp)](https://smithery.ai/server/@Ryan0204/github-repo-mcp)\n\n<p class=\"center-text\">\n  <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>\n</p>\n\n<a href=\"https://glama.ai/mcp/servers/@Ryan0204/github-repo-mcp\">\n  <img width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/@Ryan0204/github-repo-mcp/badge\" alt=\"github-repo-mcp MCP server\" />\n</a>\n\n## Table of contents\n\n<p class=\"center-text\">\n  <a href=\"#getting-started\">Getting started</a> •\n  <a href=\"#feature-overview\">Feature overview</a>\n</p>\n\n## ✨ Key features\n\n- 💻 Compatible with Cursor, Windsurf, Claude Desktop, and other MCP clients supporting `stdio` protocol\n- 🔎 Browse the contents of any public GitHub repository\n- 📂 Navigate through repository directories and subdirectories\n- 📝 View the content of code and text files\n- 📦 Easy installation via package manager\n\n## Getting Started\n\n### Prerequisites\n\nInstalling the server requires the following on your system:\n- Node.js 18+\n- npm or yarn\n\n### Step 1. Installation\n\nYou can install and run GitHub Repo MCP using Smithery, NPX, or setting in mcp.json of your IDE:\n\n#### MacOS\n\n```bash\nnpx github-repo-mcp\n```\n\n#### Windows NPX\n\n```bash\ncmd /c npx -y github-repo-mcp\n```\n\n#### Windows NPX via .cursor/mcp.json\n\n```json\n{\n  \"mcpServers\": {\n    \"github-repo-mcp\": {\n      \"command\": \"wsl\",\n      \"args\": [\n        \"bash\",\n        \"-c\",\n        \"cmd /c npx -y github-repo-mcp\"\n      ],\n      \"enabled\": true\n    }\n  }\n}\n```\n\n#### Windows NPX via .cursor/mcp.json (if path not set)\n\n```bash\n# Find the full path to npx first\nwhich npx\n```\n\n```json\n{\n  \"mcpServers\": {\n    \"github-repo-mcp\": {\n      \"command\": \"wsl\",\n      \"args\": [\n        \"bash\",\n        \"-c\",\n        \"'/home/[username]/.nvm/versions/node/v20.18.0/bin/npx github-repo-mcp'\"\n      ],\n      \"enabled\": true\n    }\n  }\n}\n```\n\n#### Installing via Smithery\n\nTo install GitHub Repo MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@Ryan0204/github-repo-mcp):\n\n```bash\nnpx -y @smithery/cli install @Ryan0204/github-repo-mcp --client claude\n```\n\n\nWait 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.\n\n### Step 2. Configuration\n\nThe GitHub Repo MCP server can use a GitHub token for higher rate limits when accessing the GitHub API.\n\n#### Environment Variables\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `GITHUB_TOKEN` | No | None | Your GitHub personal access token for higher rate limits |\n\n#### Setting Up a GitHub Token (Optional)\n\nWhile the server works without authentication, GitHub API has rate limits that are much lower for unauthenticated requests. To increase your rate limit:\n\n1. Create a personal access token at https://github.com/settings/tokens\n2. Set the token as an environment variable in mcp.json:\n\n```json\n{\n  \"mcpServers\": {\n    \"github-repo-mcp\": {\n      \"command\": \"...\",\n      \"args\": [\n        ...\n      ],\n      \"env\": {\n        \"GITHUB_TOKEN\": \"Your_Github_Token\"\n      }\n      \"enabled\": true,\n    }\n  }\n}\n```\n\n## Feature Overview\n\n### Repository Browsing Tools\n\nThe server provides three main tools for interacting with GitHub repositories:\n\n#### 1. `getRepoAllDirectories`\n\nLists all files and directories at the root of a GitHub repository.\n\n- **Parameters**:\n  - `repoUrl`: The URL of the GitHub repository (e.g., \"https://github.com/owner/repo\")\n\n#### 2. `getRepoDirectories`\n\nLists contents of a specific directory in a GitHub repository.\n\n- **Parameters**:\n  - `repoUrl`: The URL of the GitHub repository\n  - `path`: The directory path to fetch (e.g., \"src\")\n\n#### 3. `getRepoFile`\n\nRetrieves and displays the content of a specific file from a GitHub repository.\n\n- **Parameters**:\n  - `repoUrl`: The URL of the GitHub repository\n  - `path`: The file path to fetch (e.g., \"src/index.js\")\n\n### Usage Examples\n\nHere are some examples of how to use these tools with an AI assistant:\n\n1. **Browsing a repository root**:\n   Ask your AI assistant to \"Show me the contents of the repository at https://github.com/Ryan0204/github-repo-mcp\"\n\n2. **Exploring a specific directory**:\n   Ask \"What files are in the src directory of https://github.com/Ryan0204/github-repo-mcp?\"\n\n3. **Viewing a file**:\n   Ask \"Show me the README.md file from https://github.com/Ryan0204/github-repo-mcp\"\n\n### Limitations\n\n- **Rate Limiting**: Without authentication, GitHub API has strict rate limits (60 requests per hour)\n- **Private Repositories**: Can only access public repositories unless a token with appropriate permissions is provided\n- **Binary Files**: The server detects common binary file extensions and won't display their contents\n- **Large Files**: GitHub API has limitations on the size of files that can be retrieved\n\n## Troubleshooting\n\nHere are some common issues and their solutions:\n\n- **Rate limit exceeded**: Set up a GitHub token as described in the Configuration section\n- **Command not found**: Ensure the package is installed globally\n- **Connection errors**: Check your internet connection and GitHub API status\n\nIf you encounter any issues, please check the output for error messages or create an issue in the GitHub repository.\n\n---\n\nEnjoy! ☺️ \n","readmeFilename":"README.md","_rev":"1-e8aab501a917487a50793585ee976181"}