Siddharth Menon

GitHub MCP Server

开发编程v1.0.0
作者:Siddharth Menon更新于 2026-05-18github-mcp@clawhub_buddhasource/github-mcp
Git 辅助#GitHub#Api Integration#Code Review#Source Code#Repository

据 AlphaMoat 统计,截至 2026-09,GitHub MCP Server 累计下载 3,726 次、获 0 个星标,在全部 5,078 个 AI 技能中排名第 2,867 位,在「开发编程」分类(577 个)中排名第 372 位。

累计安装
136
累计下载
3,726
星标
-
全站排名
#2,867
全站前 57% · 「开发编程」前 65%
平台累计安装累计下载星标评论
ClawHub ↗1083,418--
SkillHub ↗1363,726-—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

该技能说明了创建或克隆仓库、读取或修改文件、搜索代码、管理问题和拉取请求、创建分支与发布等操作,也介绍了代码审查、问题分流和文档同步流程。认证可使用 OAuth 或细粒度令牌。令牌可能具有修改仓库的权限;应优先使用限定仓库且只读的令牌。还需注意,文档中的服务包或来源可能未固定版本、由社区维护或已归档。安装前应核验并审查来源;任何文件写入、合并、发布、问题或拉取请求更改都应先获得用户明确批准。

资料发布于 2026-10-29

可以用来做什么

  • 查找仓库文件、代码片段、问题或拉取请求

什么时候用

  • 在授权范围内进行代码审查、问题分类或文档同步

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

只读浏览时使用最小只读权限;请求写入或发布操作时先取得明确授权

月度数据趋势

累计下载3,726
1,9122,8863,8602026-03 · 累计下载 2,0462026-05 · 累计下载 2,6772026-07 · 累计下载 3,1382026-08 · 累计下载 3,3542026-09 · 累计下载 3,72626-0326-09
星标-
0112026-03 · 星标 -2026-05 · 星标 -2026-07 · 星标 -2026-08 · 星标 -2026-09 · 星标 -26-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,726—-
2026-083,354+6.9%-
2026-073,138—-
2026-052,677—-
2026-032,046—-

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

8.5 KB · ClawHub v1.0.0
---
name: github-mcp
description: GitHub MCP Server for repository management, file operations, PR/issue tracking, branch management, and GitHub API integration. Enable AI agents to clone repos, read code, create/update files, manage issues and pull requests, search code, and interact with the GitHub platform. Essential for development workflows, code review automation, CI/CD management, and repository operations. Use when agents need to work with Git repositories, manage development workflows, automate GitHub tasks, or interact with source code.
---

# GitHub MCP Server

> **Complete GitHub Integration for AI Agents**

Connect AI agents to GitHub for repository management, code operations, issue tracking, pull requests, and the full GitHub API.
展开全部(共 329 行)

## Why GitHub MCP?

### 🤖 Agent-Native GitHub Workflows
Enable agents to perform complex GitHub operations that previously required manual API integration:
- Clone and navigate repositories
- Read and modify files
- Create issues and pull requests
- Review code and discussions
- Manage branches and releases

### 🔐 Secure Authentication
OAuth-based authentication with fine-grained permissions. Agents access only what you authorize.

### 📦 Zero Setup for Common Operations
Pre-configured tools for the most common GitHub workflows. No manual API calls required.

## Installation

### Option 1: Official MCP Server (Archived - Community Maintained)

```bash
# Community-maintained GitHub MCP server
npm install -g @modelcontextprotocol/server-github

# Or build from source
git clone https://github.com/modelcontextprotocol/servers-archived
cd servers-archived/src/github
npm install
npm run build
```

### Option 2: Third-Party Implementations

Several community implementations available. Check the [MCP Registry](https://registry.modelcontextprotocol.io/) for current options.

## Configuration

Add to your MCP client config:

```json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
      }
    }
  }
}
```

### Get GitHub Token

1. Go to https://github.com/settings/tokens
2. Generate new token (classic) or fine-grained token
3. Select scopes:
   - `repo` - Full repository access
   - `read:user` - Read user profile
   - `read:org` - Read organization data (if needed)

**Fine-Grained Token** (recommended):
- Repository permissions: Contents (Read/Write), Issues (Read/Write), Pull Requests (Read/Write)
- Organization permissions: Members (Read) if accessing org repos

## Available Tools

### Repository Operations

#### 1. **Create Repository**
```
Agent: "Create a new repository called 'my-project'"
```

#### 2. **Clone Repository**
```
Agent: "Clone the OpenAI GPT-4 repository"
```

#### 3. **List Repository Files**
```
Agent: "What files are in the src/ directory?"
```

### File Operations

#### 4. **Read File**
```
Agent: "Show me the README.md file"
Agent: "Read the contents of src/index.ts"
```

#### 5. **Create/Update File**
```
Agent: "Create a new file docs/API.md with API documentation"
Agent: "Update the version in package.json to 2.0.0"
```

#### 6. **Search Code**
```
Agent: "Search for files containing 'authentication logic'"
Agent: "Find where the DatabaseConnection class is defined"
```

### Issue & PR Management

#### 7. **Create Issue**
```
Agent: "Create an issue: 'Add dark mode support'"
```

#### 8. **List Issues**
```
Agent: "Show me all open bugs"
Agent: "What issues are assigned to me?"
```

#### 9. **Create Pull Request**
```
Agent: "Create a PR to merge feature/login into main"
```

#### 10. **Review Pull Request**
```
Agent: "Review PR #42 and check for security issues"
```

### Branch Operations

#### 11. **Create Branch**
```
Agent: "Create a new branch called 'feature/user-auth'"
```

#### 12. **List Branches**
```
Agent: "Show all branches in this repo"
```

#### 13. **Merge Branch**
```
Agent: "Merge 'develop' into 'main'"
```

### Advanced Operations

#### 14. **Create Release**
```
Agent: "Create a release v2.0.0 with the latest changes"
```

#### 15. **Search Repositories**
```
Agent: "Find popular React component libraries"
```

#### 16. **Fork Repository**
```
Agent: "Fork the Vue.js repository to my account"
```

## Agent Workflow Examples

### Code Review Automation

```
Human: "Review all PRs and flag security issues"

Agent:
1. list_pull_requests(state="open")
2. For each PR:
   - get_pull_request(pr_number)
   - read_changed_files()
   - analyze for security vulnerabilities
   - create_review_comment(security_findings)
```

### Issue Triage

```
Human: "Label all new issues with 'needs-triage'"

Agent:
1. list_issues(state="open", labels=null)
2. For each unlabeled issue:
   - read_issue(issue_number)
   - add_label("needs-triage")
```

### Release Automation

```
Human: "Prepare v2.0.0 release"

Agent:
1. create_branch("release/v2.0.0")
2. update_file("package.json", version="2.0.0")
3. update_file("CHANGELOG.md", new_release_notes)
4. create_pull_request("release/v2.0.0" -> "main")
5. create_release(tag="v2.0.0", notes=changelog)
```

### Documentation Sync

```
Human: "Update documentation from code comments"

Agent:
1. search_code(query="* @description")
2. extract_docstrings()
3. generate_markdown_docs()
4. update_file("docs/API.md", generated_docs)
5. create_pull_request("Update API documentation")
```

## Use Cases

### 🛠️ Development Assistants
Agents that help developers with repetitive GitHub tasks: creating issues, managing labels, updating documentation, code review.

### 🤖 CI/CD Automation
Build agents that trigger workflows, check build status, create releases, manage deployments.

### 📊 Repository Analytics
Analyze code quality, track issue resolution time, monitor PR velocity, generate reports.

### 🔍 Code Search & Discovery
Find code patterns, identify dependencies, discover similar implementations, locate technical debt.

### 📝 Documentation Automation
Sync code comments to docs, generate API references, update changelogs, maintain README files.

## Security Best Practices

### ✅ Use Fine-Grained Tokens
Prefer fine-grained tokens over classic PATs. Limit scope to specific repositories and permissions.

### ✅ Read-Only When Possible
If the agent only needs to read code/issues, grant read-only access.

### ✅ Environment Variables
Never hard-code tokens. Always use environment variables.

### ✅ Token Rotation
Rotate tokens regularly. Set expiration dates.

### ✅ Audit Agent Actions
Monitor what the agent does. GitHub activity log tracks all API operations.

## Rate Limits

**Authenticated Requests:**
- 5,000 requests/hour (per user)
- Search API: 30 requests/minute

**Best Practices:**
- Cache repository data when possible
- Batch operations where applicable
- Use conditional requests (`If-None-Match` headers)

## vs Manual GitHub API Integration

| Task | Manual API | GitHub MCP |
|------|------------|-----------|
| **Setup Time** | Hours (auth, SDK, error handling) | Minutes (config file) |
| **Code Required** | Yes (HTTP client, auth, parsing) | No (MCP tools auto-discovered) |
| **Agent Integration** | Manual tool definitions | Automatic via MCP |
| **Auth Management** | Custom implementation | Built-in OAuth flow |
| **Error Handling** | Custom retry logic | Handled by server |

## Troubleshooting

### "Bad credentials" Error
- Verify token has not expired
- Ensure token has required scopes (`repo`, `read:user`)
- Check token is correctly set in environment variable

### "Resource not found" Error
- Verify repository name format: `owner/repo`
- Check agent has access to private repositories (if applicable)
- Ensure branch/file path exists

### Rate Limit Errors
- Wait for rate limit reset (check `X-RateLimit-Reset` header)
- Reduce query frequency
- Consider GitHub Apps for higher limits

## Resources

- **MCP Registry**: https://registry.modelcontextprotocol.io/
- **GitHub API Docs**: https://docs.github.com/en/rest
- **Create Token**: https://github.com/settings/tokens
- **Rate Limits**: https://docs.github.com/en/rest/overview/rate-limits-for-the-rest-api

## Advanced Configuration

```json
{
  "mcpServers": {
    "github": {
      "command": "node",
      "args": ["/path/to/github-mcp/build/index.js"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxx",
        "GITHUB_API_URL": "https://api.github.com",
        "DEFAULT_BRANCH": "main",
        "AUTO_PAGINATION": "true"
      }
    }
  }
}
```

---

**The GitHub integration every coding agent needs**: From code review to release automation, GitHub MCP brings the full power of GitHub to AI agents.

「开发编程」分类下的热门技能

Siddharth Menon 的其他技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。