{"_id":"github-repo-mcp","_rev":"4-e8bfdd4df66e9ad39e7f79d98afb3bbd","name":"github-repo-mcp","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"github-repo-mcp","version":"1.0.0","keywords":["mcp","github","modelcontextprotocol","repository","code","fetch","ai","agent","mcp-server"],"author":{"name":"Ryan Chan"},"license":"MIT","_id":"github-repo-mcp@1.0.0","maintainers":[{"name":"ryan0204","email":"chanpakhank@gmail.com"}],"homepage":"https://github.com/Ryan0204/github-repo-mcp#readme","bugs":{"url":"https://github.com/Ryan0204/github-repo-mcp/issues"},"bin":{"github-repo-mcp":"index.ts"},"dist":{"shasum":"760564abb96f5a182da7687cc9cd288cf90797b8","tarball":"https://registry.npmjs.org/github-repo-mcp/-/github-repo-mcp-1.0.0.tgz","fileCount":4,"integrity":"sha512-oimE0nBId8dzuQH6G6atB3xHbaGhiZV+5ZtQGiRMI95ntz60BGPlz2UGq0egyUKMxD1IpGRX3CN+fvZecLHYow==","signatures":[{"sig":"MEUCIH5AfCGB53c98tJvqrnXmZrKm+BWb14ueA/6rtu1Pt/YAiEApULx6qXoUZlPrIE1cFbNlSNvZ/pnZ2tfArC2DQkQWuA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11281},"main":"dist/index.js","type":"module","gitHead":"b96ea3d6a294f4afbcdc4a030eb00825dcb2a6c3","scripts":{"dev":"nodemon --exec ts-node-esm index.ts","build":"tsc","start":"tsc && node dist/index.js","inspect":"tsc && npx @modelcontextprotocol/inspector node -- dist/index.js"},"_npmUser":{"name":"ryan0204","email":"chanpakhank@gmail.com"},"repository":{"url":"git+https://github.com/Ryan0204/github-repo-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for fetching GitHub repository code","directories":{},"_nodeVersion":"22.11.0","dependencies":{"zod":"^3.22.4","octokit":"^3.1.2","@modelcontextprotocol/sdk":"^1.10.2"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.2","ts-node":"^10.9.2","typescript":"^5.3.3","@types/node":"^20.10.5"},"_npmOperationalInternal":{"tmp":"tmp/github-repo-mcp_1.0.0_1745556742775_0.09798786730299014","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"github-repo-mcp","version":"1.0.1","keywords":["mcp","github","modelcontextprotocol","repository","code","fetch","ai","agent","mcp-server"],"author":{"name":"Ryan Chan"},"license":"MIT","_id":"github-repo-mcp@1.0.1","maintainers":[{"name":"ryan0204","email":"chanpakhank@gmail.com"}],"homepage":"https://github.com/Ryan0204/github-repo-mcp#readme","bugs":{"url":"https://github.com/Ryan0204/github-repo-mcp/issues"},"bin":{"mcp-github":"dist/index.js","github-repo-mcp":"dist/index.js"},"dist":{"shasum":"2759d341c5b892696fba4119334661e35f376c43","tarball":"https://registry.npmjs.org/github-repo-mcp/-/github-repo-mcp-1.0.1.tgz","fileCount":4,"integrity":"sha512-eIQWwq30l1qVeLfnu3yJLXZ6Ay9d+yjxQgSrEpzyyTAHfFtZFyOlZvtv47tPMR61aZV1PBkLgW2M1fBJbUQ8vg==","signatures":[{"sig":"MEUCIQCQeCaQDC7wN5F/Xzz407OjTMDUHmmRe6T0L0BvGLyCNwIgJfDdG4P3zS7ZVTAPk+HDFUxe1Vjz8sjyHquAmXqMmQg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11344},"main":"dist/index.js","type":"module","gitHead":"02ec4549c886351389d32a08fe39e726aebc3aa0","scripts":{"dev":"nodemon --exec ts-node-esm index.ts","build":"tsc","start":"tsc && node dist/index.js","inspect":"tsc && npx @modelcontextprotocol/inspector node -- dist/index.js"},"_npmUser":{"name":"ryan0204","email":"chanpakhank@gmail.com"},"repository":{"url":"git+https://github.com/Ryan0204/github-repo-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for fetching GitHub repository code","directories":{},"_nodeVersion":"22.11.0","dependencies":{"zod":"^3.22.4","octokit":"^3.1.2","@modelcontextprotocol/sdk":"^1.10.2"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.2","ts-node":"^10.9.2","typescript":"^5.3.3","@types/node":"^20.10.5"},"_npmOperationalInternal":{"tmp":"tmp/github-repo-mcp_1.0.1_1745557212035_0.5843103716120441","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"github-repo-mcp","version":"1.0.2","keywords":["mcp","github","modelcontextprotocol","repository","code","fetch","ai","agent","mcp-server"],"author":{"name":"Ryan Chan"},"license":"MIT","_id":"github-repo-mcp@1.0.2","maintainers":[{"name":"ryan0204","email":"chanpakhank@gmail.com"}],"homepage":"https://github.com/Ryan0204/github-repo-mcp#readme","bugs":{"url":"https://github.com/Ryan0204/github-repo-mcp/issues"},"bin":{"mcp-github":"dist/index.js","github-repo-mcp":"dist/index.js"},"dist":{"shasum":"82495b3721f3130a0906096d06a4c627829c6f45","tarball":"https://registry.npmjs.org/github-repo-mcp/-/github-repo-mcp-1.0.2.tgz","fileCount":6,"integrity":"sha512-chxoxc2zTv6ZjZqHaqBXvMB7ZyJYQJBz30mG9h9ct3dT3HSZlcSSFkyACy2Izu5+iMRpyf2UihC5ZLolRaesnQ==","signatures":[{"sig":"MEYCIQCoKzHuQIX86pBj6GFLQFDj62MvK7mJFDheOH9BAn6U3AIhANVMblkWQYzCL7he2FcGImBUjKkLDd/J5I3QrPkAKlIC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16456},"main":"dist/index.js","type":"module","gitHead":"b237282d6068fcf692d3959820582ffd11a8ddfc","scripts":{"dev":"nodemon --exec ts-node-esm index.ts","build":"tsc","start":"tsc && node dist/index.js","inspect":"tsc && npx @modelcontextprotocol/inspector node -- dist/index.js","inspect-live":"npx @modelcontextprotocol/inspector npx -- github-repo-mcp"},"_npmUser":{"name":"ryan0204","email":"chanpakhank@gmail.com"},"repository":{"url":"git+https://github.com/Ryan0204/github-repo-mcp.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP server for fetching GitHub repository code","directories":{},"_nodeVersion":"22.11.0","dependencies":{"zod":"^3.22.4","octokit":"^3.1.2","@modelcontextprotocol/sdk":"^1.10.2"},"_hasShrinkwrap":false,"devDependencies":{"nodemon":"^3.0.2","ts-node":"^10.9.2","typescript":"^5.3.3","@types/node":"^20.10.5"},"_npmOperationalInternal":{"tmp":"tmp/github-repo-mcp_1.0.2_1745559901706_0.8987609710991129","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"github-repo-mcp","version":"1.0.3","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":"github-repo-mcp@1.0.3","gitHead":"1e36f9881988399469d0a2c571532cd9ebb1dd36","bugs":{"url":"https://github.com/Ryan0204/github-repo-mcp/issues"},"homepage":"https://github.com/Ryan0204/github-repo-mcp#readme","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-5m07Ud7gModxc7e7Jyz8EwHgcB8uTLdHTSPUGT6Tkh2KgzKCkvI3kBulZMqJCH1TWLMsY/18qXEVKL09KyREgA==","shasum":"148b1462a4c3bf714e2d8e9b2ea20c8f26297857","tarball":"https://registry.npmjs.org/github-repo-mcp/-/github-repo-mcp-1.0.3.tgz","fileCount":6,"unpackedSize":16456,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAJju+QRKNFKYMJHTXytiv86s0nhPVBD7cT65+83w3ZHAiBGKoKiKJ9l8AIY0wsnssJ2q4FozE8W7TZOKnlGzcB1+g=="}]},"_npmUser":{"name":"ryan0204","email":"chanpakhank@gmail.com"},"directories":{},"maintainers":[{"name":"ryan0204","email":"chanpakhank@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/github-repo-mcp_1.0.3_1745559959306_0.006817139336608102"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-25T04:52:22.658Z","modified":"2025-04-25T05:45:59.700Z","1.0.0":"2025-04-25T04:52:22.980Z","1.0.1":"2025-04-25T05:00:12.194Z","1.0.2":"2025-04-25T05:45:01.890Z","1.0.3":"2025-04-25T05:45:59.470Z"},"bugs":{"url":"https://github.com/Ryan0204/github-repo-mcp/issues"},"author":{"name":"Ryan Chan"},"license":"MIT","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"},"description":"MCP server for fetching GitHub repository code","maintainers":[{"name":"ryan0204","email":"chanpakhank@gmail.com"}],"readme":"# 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## 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 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\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! ☺️ ","readmeFilename":"README.md"}