github-local-mcp
v1.0.0
Published
MCP server wrapping the GitHub CLI (gh)
Readme
GitHub CLI MCP Server
An MCP (Model Context Protocol) server that exposes GitHub operations through the GitHub CLI (gh). It runs as an STDIO-based server, allowing AI assistants to manage repositories, pull requests, issues, releases, workflows, and more via your existing gh authentication.
Requirements
- Node.js 18 or later
- GitHub CLI (
gh) installed and authenticated
Install GitHub CLI
- macOS:
brew install gh - Windows:
winget install GitHub.clior download - Linux: See gh installation docs
Then authenticate:
gh auth loginInstallation
From source
Clone this repository and install dependencies:
git clone https://github.com/YOUR_USERNAME/github-stdio-mcp.git
cd github-stdio-mcp
npm install
npm run buildGlobal install (optional)
npm install -g .Configuration
Cursor / Claude Desktop
Add to your MCP configuration (e.g. Cursor's ~/.cursor/mcp.json or Claude's claude_desktop_config.json):
Using local path:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/path/to/github-stdio-mcp/dist/index.js"]
}
}
}VS Code
Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run MCP: Open User Configuration, then add:
{
"servers": {
"github": {
"command": "node",
"args": ["/path/to/github-stdio-mcp/dist/index.js"]
}
}
}Replace /path/to/github-stdio-mcp with the actual path to this project.
Note: This package is not yet published to npm. Use the local path configuration above.
Available Tools
| Category | Tools |
|-----------|-------|
| Auth | gh_auth_status |
| Repo | gh_repo_list, gh_repo_view, gh_repo_create, gh_repo_clone, gh_repo_fork |
| PRs | gh_pr_list, gh_pr_view, gh_pr_diff, gh_pr_create, gh_pr_merge, gh_pr_comment, gh_pr_review, gh_pr_checks, gh_pr_close |
| Issues | gh_issue_list, gh_issue_view, gh_issue_create, gh_issue_comment, gh_issue_close, gh_issue_reopen, gh_issue_edit |
| Releases | gh_release_list, gh_release_view, gh_release_create |
| Workflows | gh_workflow_list, gh_workflow_run, gh_run_list, gh_run_view, gh_run_cancel, gh_run_rerun |
| Search | gh_search_repos, gh_search_issues, gh_search_prs |
| Gists | gh_gist_list, gh_gist_view, gh_gist_create |
| Labels | gh_label_list |
| API | gh_api (REST + GraphQL passthrough) |
Each tool maps directly to gh subcommands. For repo-specific tools, omit repo when run from inside a Git repository to use the current repo. Many tools support json: true to return raw JSON.
Development
npm install
npm run dev # Run with tsx (no build)
npm run build # Compile TypeScript to dist/
npm run start # Run compiled outputDebugging
Use the MCP Inspector to inspect the server:
npx @modelcontextprotocol/inspector node dist/index.jsOr with the dev script:
npx @modelcontextprotocol/inspector npm run devLicense
MIT
