A tool for interacting with GitHub API through MCP.
- List repositories and get repository details
- List and manage pull requests
- Create and comment on pull requests
- List, view, and manage issues
- Get file content from GitHub repositories
There are several ways to install the GitHub Tool:
- Visit the GitHub Releases page
- Download the binary for your platform:
github-mcp_linux_amd64for Linuxgithub-mcp_darwin_amd64for macOSgithub-mcp_windows_amd64.exefor Windows
- Make the binary executable (Linux/macOS):
chmod +x github-mcp_* - Move it to your PATH (Linux/macOS):
sudo mv github-mcp_* /usr/local/bin/github-mcp
go install github.com/nguyenvanduocit/github-mcp
- Set up environment variables in
.envfile:
GITHUB_TOKEN=your_github_token
{
"mcpServers": {
"github": {
"command": "/path-to/github-mcp",
"args": ["-env", "path-to-env-file"]
}
}
}
In addition to the MCP server, github-mcp ships a standalone CLI binary (github-cli) for direct terminal use — no MCP client needed.
just install-cli
# or
go install github.com/nguyenvanduocit/github-mcp/cmd/github-cli@latestexport GITHUB_TOKEN=your-github-token
# or
github-cli --env .env <command> [flags]| Command | Description |
|---|---|
list-repos |
List repositories for a user/org |
get-repo |
Get repository details |
list-prs |
List pull requests |
get-pr |
Get pull request details |
create-pr |
Create a pull request |
create-pr-comment |
Comment on a pull request |
get-file |
Get file content from a repo |
list-issues |
List issues |
get-issue |
Get issue details |
comment-issue |
Comment on an issue |
issue-action |
Close or reopen an issue |
approve-pr |
Approve a pull request |
# List repos
github-cli list-repos --owner myorg --type public
# List open PRs
github-cli list-prs --owner myorg --repo myrepo --state open
# Create a PR
github-cli create-pr --owner myorg --repo myrepo \
--title "My PR" --head feature-branch --base main
# Get file content
github-cli get-file --owner myorg --repo myrepo --path src/main.go
# JSON output
github-cli list-issues --owner myorg --repo myrepo --output json | jq '.[].title'Every command accepts:
--env string— Path to.envfile--output string— Output format:text(default) orjson
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
brew install nguyenvanduocit/tap/github-mcp