G

GitHub MCP Server

GitHub's official MCP server for managing repositories, pull requests, issues, and code reviews directly from Claude Code. Essential for teams using GitHub-based workflows who want AI-assisted repository management and collaboration.

MCPCommunitydevelopmentv1.0.0MIT
0 views0 copies

MCP Server Configuration

{ "mcpServers": { "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-token>" } } } }

Available Tools

ToolDescription
create_or_update_fileCreate or update a single file in a repository
push_filesPush multiple files in a single commit
search_repositoriesSearch for GitHub repositories
create_repositoryCreate a new GitHub repository
get_file_contentsGet contents of a file or directory
create_issueCreate a new issue in a repository
create_pull_requestCreate a new pull request
list_issuesList and filter repository issues
update_issueUpdate an existing issue
add_issue_commentAdd a comment to an issue or PR
search_codeSearch for code across GitHub
list_commitsList commits in a repository
get_issueGet details of a specific issue
get_pull_requestGet details of a specific pull request
list_pull_requestsList pull requests with filters
create_branchCreate a new branch
fork_repositoryFork a repository

Setup

  1. Generate a GitHub Personal Access Token at https://github.com/settings/tokens
  2. Required scopes: repo, read:org, read:user
  3. For fine-grained tokens: select specific repositories and permissions
  4. Replace <your-token> with your actual token

Security Notes

  • Never commit tokens to version control. Use environment variables or .env files
  • Use fine-grained tokens with minimal permissions when possible
  • Rotate tokens periodically (every 90 days recommended)
  • The token grants read/write access to your repositories - review tool actions before approving
  • Add .claude/settings.local.json to .gitignore for local token storage
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates