بنقرة واحدة
github-mcp
Complete guide to all GitHub MCP server tools for repository management, issues, pull requests, and more.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Complete guide to all GitHub MCP server tools for repository management, issues, pull requests, and more.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | github-mcp |
| description | Complete guide to all GitHub MCP server tools for repository management, issues, pull requests, and more. |
| homepage | https://github.com/modelcontextprotocol/server-github |
| metadata | {"openclaw":{"emoji":"🐙","requires":{"bins":["mcporter"]},"install":[{"id":"node","kind":"node","package":"mcporter","bins":["mcporter"],"label":"Install mcporter (node)"}]}} |
Complete guide to all GitHub MCP server tools for repository management, issues, pull requests, and more.
First, always use --help to explore commands:
mcporter call github.search_repositories --help
mcporter list github --schema
Basic examples:
mcporter call github.search_repositories query="mcporter"
mcporter call github.list_issues owner="facebook" repo="react"
mcporter call github.create_repository --help
Create a new repository:
mcporter call github.create_repository name="my-new-repo" description="My awesome repo" private=false auto-init=true
Required parameters:
name: Repository nameOptional parameters:
description: Repository descriptionprivate: Whether repository should be private (true|false)auto-init: Initialize with README.md (true|false)mcporter call github.search_repositories --help
Search for repositories:
mcporter call github.search_repositories query="mcporter" perPage=10 page=1
Required parameters:
query: Search query (see GitHub search syntax)Optional parameters:
page: Page number for pagination (default: 1)perPage: Number of results per page (default: 30, max: 100)mcporter call github.fork_repository --help
Fork a repository:
mcporter call github.fork_repository owner="facebook" repo="react" organization="my-org"
Required parameters:
owner: Repository owner (username or organization)repo: Repository nameOptional parameters:
organization: Organization to fork to (defaults to your personal account)mcporter call github.create_or_update_file --help
Create a new file:
mcporter call github.create_or_update_file owner="facebook" repo="react" path="README.md" content="# My Repo" message="Initial commit" branch="main"
Create file with commit message from Markdown file:
mcporter call github.create_or_update_file owner="facebook" repo="react" path="README.md" content="# My Repo" message="$(cat path/to/commit.md)" branch="main"
Update existing file:
mcporter call github.create_or_update_file owner="facebook" repo="react" path="README.md" content="# Updated Repo" message="Update README" branch="main" sha="abc123def456"
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepath: Path where to create/update filecontent: Content of filemessage: Commit message (read from Markdown file: message="$(cat file.md)")branch: Branch to create/update file inOptional parameters:
sha: SHA of file being replaced (required when updating existing files)mcporter call github.get_file_contents --help
Get file contents:
mcporter call github.get_file_contents owner="facebook" repo="react" path="README.md" branch="main"
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepath: Path to file or directoryOptional parameters:
branch: Branch to get contents frommcporter call github.push_files --help
Push multiple files:
mcporter call github.push_files owner="facebook" repo="react" branch="main" files='[{"path":"README.md","content":"# My Repo"},{"path":"src/index.js","content":"console.log(\"hello\")"}]' message="Add files"
Required parameters:
owner: Repository owner (username or organization)repo: Repository namebranch: Branch to push to (e.g., 'main' or 'master')files: Array of files to push (each with path and content)message: Commit messagemcporter call github.create_branch --help
Create a new branch:
mcporter call github.create_branch owner="facebook" repo="react" branch="feature/new-feature" from_branch="main"
Required parameters:
owner: Repository owner (username or organization)repo: Repository namebranch: Name for the new branchOptional parameters:
from_branch: Source branch to create from (defaults to repository's default branch)mcporter call github.list_commits --help
List commits:
mcporter call github.list_commits owner="facebook" repo="react"
Required parameters:
owner: Repository owner (username or organization)repo: Repository nameFor long messages (commit messages, issue bodies, PR descriptions), read from Markdown files:
# Read body from Markdown file
mcporter call github.create_issue owner="facebook" repo="react" title="Bug Report" body="$(cat path/to/issue.md)"
# Read commit message from file
mcporter call github.create_or_update_file owner="facebook" repo="react" path="README.md" content="# Updated" message="$(cat path/to/commit.md)" branch="main"
# Read PR body from file
mcporter call github.create_pull_request owner="facebook" repo="react" title="New Feature" head="feature" base="main" body="$(cat path/to/pr.md)"
Why use Markdown files?
`code()`cmd.exe does NOT support cat command. Use one of these alternatives:
REM Option 1: Use PowerShell from cmd
powershell -Command "mcporter call github.create_issue owner=\"facebook\" repo=\"react\" title=\"Bug\" body=\"$(cat path/to/issue.md)\""
REM Option 2: Use direct JSON string (escape backticks as ``)
mcporter call github.create_issue owner="facebook" repo="react" title="Bug" body="Code example: ``print('hello')``"
REM Option 3: Create a temporary PowerShell script
echo mcporter call github.create_issue owner="facebook" repo="react" title="Bug" body="$(cat path/to/issue.md)" > temp.ps1
powershell -ExecutionPolicy Bypass -File temp.ps1
Terminal Compatibility Table:
| Terminal | cat Command | Command Replacement $(...) | Recommended |
|---|---|---|---|
| PowerShell | ✅ Yes (alias for Get-Content) | ✅ Yes | ⭐⭐⭐⭐⭐ |
| Bash | ✅ Yes | ✅ Yes | ⭐⭐⭐⭐⭐ |
| Zsh | ✅ Yes | ✅ Yes | ⭐⭐⭐⭐⭐ |
| Fish | ✅ Yes | ✅ Yes | ⭐⭐⭐⭐⭐ |
| cmd.exe | ❌ No | ❌ No | ⭐⭐ |
mcporter call github.create_issue --help
Create a new issue:
mcporter call github.create_issue owner="facebook" repo="react" title="Bug in component" body="Steps to reproduce..." assignees='["user1","user2"]' labels='["bug","high-priority"]' milestone=1
Create issue with body from Markdown file (Recommended):
mcporter call github.create_issue owner="facebook" repo="react" title="Bug in component" body="$(cat path/to/issue.md)"
Required parameters:
owner: Repository owner (username or organization)repo: Repository nametitle: Issue titleOptional parameters:
body: Issue body/description (read from Markdown file: body="$(cat file.md)")assignees: Array of users to assignmilestone: Milestone numberlabels: Array of labelsmcporter call github.list_issues --help
List all issues:
mcporter call github.list_issues owner="facebook" repo="react"
Required parameters:
owner: Repository owner (username or organization)repo: Repository namemcporter call github.get_issue --help
Get specific issue:
mcporter call github.get_issue owner="facebook" repo="react" issue_number=123
Required parameters:
owner: Repository owner (username or organization)repo: Repository nameissue_number: Issue numbermcporter call github.update_issue --help
Update an issue:
mcporter call github.update_issue owner="facebook" repo="react" issue_number=123 state="closed" title="Updated title"
Update issue with body from Markdown file:
mcporter call github.update_issue owner="facebook" repo="react" issue_number=123 body="$(cat path/to/update.md)"
Required parameters:
owner: Repository owner (username or organization)repo: Repository nameissue_number: Issue numberOptional parameters:
state: Issue state (open|closed)title: Updated issue titlebody: Updated issue body (read from Markdown file: body="$(cat file.md)")mcporter call github.add_issue_comment --help
Add comment to issue:
mcporter call github.add_issue_comment owner="facebook" repo="react" issue_number=123 body="This looks great!"
Required parameters:
owner: Repository owner (username or organization)repo: Repository nameissue_number: Issue numberbody: Comment textmcporter call github.search_issues --help
Search for issues:
mcporter call github.search_issues query="is:issue is:open label:bug repo:facebook/react"
Required parameters:
query: Search query (see GitHub search syntax)mcporter call github.search_code --help
Search for code:
mcporter call github.search_code query="useState repo:facebook/react"
Required parameters:
query: Search query (see GitHub search syntax)mcporter call github.search_users --help
Search for users:
mcporter call github.search_users query="john"
Required parameters:
query: Search querymcporter call github.create_pull_request --help
Create a new PR:
mcporter call github.create_pull_request owner="facebook" repo="react" title="Add new feature" head="feature-branch" base="main" body="Description of changes" draft=false
Create PR with body from Markdown file (Recommended):
mcporter call github.create_pull_request owner="facebook" repo="react" title="Add new feature" head="feature-branch" base="main" body="$(cat path/to/pr.md)" draft=false
Required parameters:
owner: Repository owner (username or organization)repo: Repository nametitle: Pull request titlehead: Branch where your changes are implementedbase: Branch you want changes pulled intoOptional parameters:
body: Pull request body/description (read from Markdown file: body="$(cat file.md)")draft: Create as draft (true|false)maintainer_can_modify: Whether maintainers can modify PR (true|false)mcporter call github.get_pull_request --help
Get PR details:
mcporter call github.get_pull_request owner="facebook" repo="react" pull_number=123
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepull_number: Pull request numbermcporter call github.list_pull_requests --help
List all PRs:
mcporter call github.list_pull_requests owner="facebook" repo="react"
Required parameters:
owner: Repository owner (username or organization)repo: Repository namemcporter call github.get_pull_request_files --help
Get files changed in PR:
mcporter call github.get_pull_request_files owner="facebook" repo="react" pull_number=123
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepull_number: Pull request numbermcporter call github.get_pull_request_status --help
Get PR status checks:
mcporter call github.get_pull_request_status owner="facebook" repo="react" pull_number=123
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepull_number: Pull request numbermcporter call github.update_pull_request_branch --help
Update PR with latest changes:
mcporter call github.update_pull_request_branch owner="facebook" repo="react" pull_number=123 expected_head_sha="abc123def456"
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepull_number: Pull request numberOptional parameters:
expected_head_sha: Expected SHA of PR's HEAD refmcporter call github.merge_pull_request --help
Merge a PR:
mcporter call github.merge_pull_request owner="facebook" repo="react" pull_number=123 commit_title="Merge feature" commit_message="Fixes #123" merge_method="merge"
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepull_number: Pull request numberOptional parameters:
commit_title: Title for automatic commit messagecommit_message: Extra detail to append to commit messagemerge_method: Merge method (merge|squash|rebase)mcporter call github.create_pull_request_review --help
Create a PR review:
mcporter call github.create_pull_request_review owner="facebook" repo="react" pull_number=123 body="LGTM!" event="APPROVE" comments='[{"path":"src/app.js","position":10,"body":"Great code!"}]'
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepull_number: Pull request numberbody: Review body textevent: Review action (APPROVE|REQUEST_CHANGES|COMMENT)Optional parameters:
comments: Array of review comments (specify either position or line, not both)mcporter call github.get_pull_request_comments --help
Get PR comments:
mcporter call github.get_pull_request_comments owner="facebook" repo="react" pull_number=123
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepull_number: Pull request numbermcporter call github.get_pull_request_reviews --help
Get PR reviews:
mcporter call github.get_pull_request_reviews owner="facebook" repo="react" pull_number=123
Required parameters:
owner: Repository owner (username or organization)repo: Repository namepull_number: Pull request numberAll GitHub MCP tools require authentication via GITHUB_PERSONAL_ACCESS_TOKEN environment variable.
Setup:
# Set environment variable
$env:GITHUB_PERSONAL_ACCESS_TOKEN = "ghp_xxxxxxxxxxxxxxxx"
# Or add to mcporter config with empty string
mcporter config add github --command "npx" --arg "-y" --arg "@modelcontextprotocol/server-github" --env GITHUB_PERSONAL_ACCESS_TOKEN=""
Owner and Repo:
Most tools require owner and repo parameters:
owner: Repository owner (username or organization)repo: Repository nameExample:
mcporter call github.create_issue owner="facebook" repo="react" title="Bug"
For complex parameters, use JSON payload:
mcporter call github.push_files --args '{
"owner": "facebook",
"repo": "react",
"branch": "main",
"files": [
{"path": "README.md", "content": "# My Repo"},
{"path": "src/index.js", "content": "console.log(\"hello\")"}
],
"message": "Add files"
}'
Control output format:
# JSON output (machine-readable)
mcporter call github.search_repositories query="mcporter" --output json
# Markdown output
mcporter call github.search_repositories query="mcporter" --output markdown
# List all tools
mcporter list github --schema
# Get help for specific tool
mcporter call github.<tool_name> --help
# Get help with all parameters
mcporter call github.<tool_name> --help
For complete GitHub MCP server documentation, visit: https://github.com/modelcontextprotocol/server-github
create_repository - Create a new repositorysearch_repositories - Search for repositoriesfork_repository - Fork a repositorycreate_or_update_file - Create or update a fileget_file_contents - Get file contentspush_files - Push multiple filescreate_branch - Create a new branchlist_commits - List commitscreate_issue - Create a new issuelist_issues - List all issuesget_issue - Get specific issueupdate_issue - Update an issueadd_issue_comment - Add comment to issuesearch_issues - Search for issuessearch_code - Search for codesearch_users - Search for userscreate_pull_request - Create a new PRget_pull_request - Get PR detailslist_pull_requests - List all PRsget_pull_request_files - Get files changed in PRget_pull_request_status - Get PR status checksupdate_pull_request_branch - Update PR with latest changesmerge_pull_request - Merge a PRcreate_pull_request_review - Create a PR reviewget_pull_request_comments - Get PR commentsget_pull_request_reviews - Get PR reviews