{"id":26584015,"url":"https://github.com/shuakami/mcp-github","last_synced_at":"2026-04-10T07:03:00.922Z","repository":{"id":283412679,"uuid":"951682171","full_name":"shuakami/mcp-github","owner":"shuakami","description":"🔗 GitHub MCP Tool | 基于MCP协议的GitHub工具，为Cursor编辑器提供AI操作GitHub能力 | AI-powered GitHub operations for Cursor Editor through MCP protocol","archived":false,"fork":false,"pushed_at":"2025-03-27T07:28:50.000Z","size":260,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T08:31:05.947Z","etag":null,"topics":["ai","api","automation","bot","chatgpt","claude","cursor","developer-tools","github","mcp","mcp-protocol","model-context-protocol"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shuakami.png","metadata":{"files":{"readme":"README-EN.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-20T04:32:30.000Z","updated_at":"2025-03-27T07:28:53.000Z","dependencies_parsed_at":"2025-03-20T05:38:09.235Z","dependency_job_id":null,"html_url":"https://github.com/shuakami/mcp-github","commit_stats":null,"previous_names":["shuakami/mcp-github"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shuakami/mcp-github","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2Fmcp-github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2Fmcp-github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2Fmcp-github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2Fmcp-github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shuakami","download_url":"https://codeload.github.com/shuakami/mcp-github/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shuakami%2Fmcp-github/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269981688,"owners_count":24507280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-11T02:00:10.019Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","api","automation","bot","chatgpt","claude","cursor","developer-tools","github","mcp","mcp-protocol","model-context-protocol"],"created_at":"2025-03-23T09:17:42.723Z","updated_at":"2026-04-10T07:03:00.867Z","avatar_url":"https://github.com/shuakami.png","language":"JavaScript","funding_links":[],"categories":["🤖 AI/ML"],"sub_categories":[],"readme":"# GitHub MCP Tool\n\n[![ISC License](https://img.shields.io/badge/License-ISC-4a5568?style=flat-square)](https://opensource.org/licenses/ISC)\n[![Node.js](https://img.shields.io/badge/Node.js-18.x-48bb78?style=flat-square)](https://nodejs.org/)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178c6?style=flat-square)](https://www.typescriptlang.org/)\n\n[中文版本 (README.md)](README.md)\n\n## What is this?\n\nThis is a GitHub toolkit based on MCP (Model Context Protocol) that allows AI models to access GitHub API through standardized interfaces. Simply put, it enables AI assistants to perform various GitHub operations, such as creating repositories, committing code, managing branches, etc., without requiring users to manually input complex API calls.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eSupported Features\u003c/b\u003e (click to expand)\u003c/summary\u003e\n\n- **Repository management**: create, get, list, update, delete\n- **Branch operations**: create, get, list, delete\n- **Pull Request management**: create, get, list, update, merge\n- **Issue management**: create, get, list, update, close\n- **User operations**: view following, interaction statistics\n- **Code management**: file content, commit history\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eFeature Demonstration\u003c/b\u003e (click to expand)\u003c/summary\u003e\n\nHere are some core feature demonstrations of the GitHub MCP tool:\n\n\u003cdiv align=\"center\"\u003e\n\n### Repository Creation Demo\n\u003cimg src=\"demo/image/new-repository.png\" alt=\"Repository Creation Demo\" width=\"95%\" /\u003e\n\n### Branch Operations Demo\n\u003cimg src=\"demo/image/new-branch.png\" alt=\"Branch Operations Demo\" width=\"95%\" /\u003e\n\n### Pull Request Management Demo\n\u003cimg src=\"demo/image/pr.png\" alt=\"Pull Request Management Demo\" width=\"95%\" /\u003e\n\n### Issue Tracking Demo\n\u003cimg src=\"demo/image/issue.png\" alt=\"Issue Tracking Demo\" width=\"95%\" /\u003e\n\n\u003c/div\u003e\n\nWith simple natural language instructions, AI can help you complete all of the above operations without manually writing API calls or operating the GitHub interface in a browser.\n\u003c/details\u003e\n\n## Quick Start\n\n### 0. Environment Setup\n\n\u003cdetails\u003e\n\u003csummary\u003eEnvironment Requirements (click to expand)\u003c/summary\u003e\n\n1. **Python 3.11+ (Required)**\n   - Visit [Python website](https://www.python.org/downloads/)\n   - Download and install Python 3.11 or higher\n   - **Important**: Check \"Add Python to PATH\" during installation\n   - **Restart your computer after installation** to ensure environment variables take effect\n\n2. **Node.js and npm**\n   - Visit [Node.js website](https://nodejs.org/)\n   - Download and install the LTS (Long Term Support) version\n   - Select the default options during installation, which will install both Node.js and npm\n\n3. **Git**\n   - Visit [Git website](https://git-scm.com/)\n   - Download and install Git\n   - Use default options during installation\n\u003c/details\u003e\n\n### 1. Clone and Install\n\n```bash\ngit clone https://github.com/shuakami/mcp-github.git\ncd mcp-github\nnpm install\nnpm run build\n```\n\u003e ⚠️ **Important Note**: Do not delete the cloned or extracted files after installation, as the plugin needs continuous access to these files!\n\n### 2. Build the Project\n\n```bash\nnpm run build\n```\n\n### 3. Configure GitHub Token\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eHow to obtain a GitHub Personal Access Token\u003c/b\u003e (click to expand)\u003c/summary\u003e\n\n1. Visit GitHub's personal access token settings page: https://github.com/settings/tokens\n2. Click \"Generate new token\" → \"Generate new token (classic)\"\n3. Enter a token description, such as \"MCP GitHub Tool\"\n4. For permissions, select at least:\n   - `repo` (full access)\n   - `user` (user information)\n5. Click the \"Generate token\" button at the bottom of the page\n6. **Very important**: Copy the token immediately, as you won't be able to see it again\n\u003c/details\u003e\n\nBased on your operating system, follow these steps to configure MCP:\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWindows Configuration\u003c/b\u003e (click to expand)\u003c/summary\u003e\n\n1. In Cursor, open or create the MCP configuration file: `C:\\Users\\your_username\\.cursor\\mcp.json`\n   - Note: Replace `your_username` with your Windows username (i.e., your computer account name)\n\n2. Add or modify the configuration as follows:\n\n```json\n{\n  \"mcpServers\": {\n    \"github-mcp\": {\n      \"command\": \"pythonw\",\n      \"args\": [\n        \"your_installation_path/mcp-github/bridging_github_mcp.py\"\n      ],\n      \"env\": {\n        \"GITHUB_TOKEN\": \"your_github_token\"\n      }\n    }\n  }\n}\n```\n\n\u003e ⚠️ **Important Note**:\n\u003e - Replace `your_installation_path` with the actual path where you cloned or extracted the project (e.g., `C:/Users/John/mcp-github/...`)\n\u003e - Use forward slashes (/) instead of backslashes (\\) for paths\n\u003e - Replace `your_github_token` with the token you obtained in the previous step\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003emacOS Configuration\u003c/b\u003e (click to expand)\u003c/summary\u003e\n\n1. In Cursor, open or create the MCP configuration file: `/Users/your_username/.cursor/mcp.json`\n   - Note: Replace `your_username` with your macOS username\n\n2. Add or modify the configuration as follows:\n\n```json\n{\n  \"mcpServers\": {\n    \"github-mcp\": {\n      \"command\": \"python3\",\n      \"args\": [\n        \"/Users/your_username/mcp-github/bridging_github_mcp.py\"\n      ],\n      \"env\": {\n        \"GITHUB_TOKEN\": \"your_github_token\"\n      }\n    }\n  }\n}\n```\n\n\u003e ⚠️ **Important Note**:\n\u003e - Replace `your_username` with your macOS username (e.g., `/Users/johndoe/mcp-github/...`)\n\u003e - Replace `your_github_token` with the token you obtained in the previous step\n\u003e - Make sure the path correctly points to your project directory\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLinux Configuration\u003c/b\u003e (click to expand)\u003c/summary\u003e\n\n1. In Cursor, open or create the MCP configuration file: `/home/your_username/.cursor/mcp.json`\n   - Note: Replace `your_username` with your Linux username\n\n2. Add or modify the configuration as follows:\n\n```json\n{\n  \"mcpServers\": {\n    \"github-mcp\": {\n      \"command\": \"python3\",\n      \"args\": [\n        \"/home/your_username/mcp-github/bridging_github_mcp.py\"\n      ],\n      \"env\": {\n        \"GITHUB_TOKEN\": \"your_github_token\"\n      }\n    }\n  }\n}\n```\n\n\u003e ⚠️ **Important Note**:\n\u003e - Replace `your_username` with your Linux username (e.g., `/home/user/mcp-github/...`)\n\u003e - Replace `your_github_token` with the token you obtained in the previous step\n\u003e - Make sure the path correctly points to your project directory\n\u003c/details\u003e\n\n### 4. Start the Service\n\nAfter configuration, your Cursor editor will automatically start the MCP service. Then you can start using it.\n\n\u003cdetails\u003e\n\u003csummary\u003eExample interactions (click to expand)\u003c/summary\u003e\n\nYou can ask the AI to perform operations like:\n- \"Create a private repository named test-project\"\n- \"List all my repositories\"\n- \"Create a PR in my-repo from feature branch to main branch\"\n- \"Get the content of README.md file from my-repo\"\n\u003c/details\u003e\n\n## How it works\n\n\u003cdetails\u003e\n\u003csummary\u003eTechnical implementation details (click to expand)\u003c/summary\u003e\n\nThis tool is built on the **MCP (Model Context Protocol)** standard, serving as a bridge between AI models and the GitHub API. It uses **octokit.js** as the underlying GitHub API client and **Zod** for request validation and type checking.\n\nEach GitHub operation is encapsulated as a standardized MCP tool, receiving structured parameters and returning formatted results. Response data is intelligently processed, automatically removing redundant information, extracting key content, and converting to a **human-readable format**. \n\nThis approach allows AI models to easily understand complex data structures returned by the GitHub API and interact with users in a more natural way.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCommon API call examples (click to expand)\u003c/summary\u003e\n\nCreate Repository:\n```javascript\n{\n  name: \"awesome-project\",\n  description: \"My awesome project\",\n  isPrivate: true\n}\n```\n\nCreate Pull Request:\n```javascript\n{\n  owner: \"shuakami\",\n  repo: \"awesome-project\",\n  title: \"Add new feature\",\n  head: \"feature-branch\",\n  base: \"main\",\n  body: \"This PR adds a new cool feature\"\n}\n```\n\nGet File Content:\n```javascript\n{\n  owner: \"shuakami\",\n  repo: \"awesome-project\",\n  path: \"README.md\"\n}\n```\n\u003c/details\u003e\n\n## License\n\nISC ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuakami%2Fmcp-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuakami%2Fmcp-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuakami%2Fmcp-github/lists"}