Go-based MCP server for GitHub and local Git operations

Go-based MCP server for GitHub and local Git operations

github-go-server-mcp•byscopweb

A Go MCP server exposing consolidated Git and GitHub tools, including repository, pull request, admin, dashboard and file operations, with a safety system for risky actions.

License: MIT License•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Provides Git tools for status, commits, branches, syncing, stashes, remotes, tags and resets.
  • •Offers hybrid file creation and updates, preferring local Git and falling back to the GitHub API.
  • •Exposes GitHub repository, pull request, dashboard and response operations.
  • •Includes administrative tools for repository settings, branch protection, webhooks and collaborators.

BEST FOR

  • •Performing Git and GitHub repository operations from Claude Desktop.
  • •Managing issues, pull requests, workflows and repository administration through MCP tools.

ABOUT GITHUB-GO-SERVER-MCP

Go-based MCP server for GitHub and local Git operations is cataloged as an MCP server attributed to scopweb. A Go MCP server exposing consolidated Git and GitHub tools, including repository, pull request, admin, dashboard and file operations, with a safety system for risky actions. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Go-based MCP server for GitHub and local Git operations are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server prevent AI confusion from too many tools?

It consolidates 85 operations into 26 tools, with each tool accepting an operation parameter to select the specific action.

Does the server work without Git installed?

Yes, it detects Git absence, filters git tools from the listing, keeps API and file tools operational, and allows cloning via the GitHub API.

How are risky operations handled?

Operations are classified into LOW, MEDIUM, HIGH and CRITICAL risk tiers, with confirmation tokens required for higher-risk actions depending on the safety mode.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 38cdb1a7574a · 采集于 2026-11-13 11:32:55 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

GitHub MCP Server v4.0

Go-based MCP server that connects GitHub to Claude Desktop, enabling direct repository operations from Claude's interface.

Tools: 26 consolidated tools (85 operations) | Architecture: Hybrid (Local Git + GitHub API + Admin Controls)

What's New in v4.0

  • Consolidated Tool Design: 85 operations across just 26 tools — prevents AI confusion from tool-count limits
  • Operation Parameter Pattern: Each tool accepts an operation parameter to select the specific action
  • --toolsets Flag: Start the server exposing only selected tool groups (git, github, admin, files)
  • Real Auto-Backup: Writes a JSON backup before HIGH/CRITICAL operations when enable_auto_backup: true
  • 4-Tier Safety System: Risk classification (LOW/MEDIUM/HIGH/CRITICAL) with confirmation tokens
  • 22 Administrative Operations: Repository settings, branch protection, webhooks, collaborators, teams
  • Audit Logging: JSON-based operation tracking with automatic rotation

Token Permissions Required

Minimum Required

repo        - Full control of private repositories (essential)

Optional (for full functionality)

security_events  - For dismissing security alerts
workflow         - For re-running GitHub Actions workflows
admin:repo_hook  - Enhanced webhook management
admin:org        - For team management in organizations

Generate Token

  1. Go to: GitHub Settings > Personal Access Tokens
  2. Click "Generate new token (classic)"
  3. Select the required scopes
  4. Copy the generated token

Installation

# Install dependencies
go mod tidy

# Compile (using included script)
.\compile.bat          # Windows
./build-mac.bat        # macOS cross-compile

# Or compile manually
go build -o github-mcp-server-v4.exe ./cmd/github-mcp-server/

Testing

# Run all tests
go test ./...

# Run tests with verbose output
go test ./... -v

# Run tests for a specific package
go test ./pkg/git/ -v
go test ./pkg/safety/ -v

Claude Desktop Configuration

{
  "mcpServers": {
    "github-personal": {
      "command": "C:\\path\\to\\github-mcp-server-v4.exe",
      "args": ["--profile", "personal"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_personal_token"
      }
    },
    "github-work": {
      "command": "C:\\path\\to\\github-mcp-server-v4.exe",
      "args": ["--profile", "work"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_work_token"
      }
    }
  }
}

Basic Configuration (Single token)

{
  "mcpServers": {
    "github-mcp": {
      "command": "C:\\path\\to\\github-mcp-server-v4.exe",
      "args": [],
      "env": {
        "GITHUB_TOKEN": "your_token_here"
      }
    }
  }
}

Toolset Filtering (Optional)

Expose only specific tool groups to reduce attack surface:

{
  "args": ["--toolsets", "git,github"]
}

Available groups: git (14 tools), github (4 tools), admin (4 tools), files (4 tools). Default is all.

Available Tools (26)

Tools use an operation parameter to expose multiple operations under one name. This reduces the tool count from 85 to 26, preventing AI model confusion.

Git Info (2 tools)

ToolOperations
git_infostatus, file_sha, last_commit, file_content, changed_files, validate_repo, list_files, context, validate_clean
git_set_workspaceSet working directory for all Git operations

Git Basic (3 tools)

ToolDescription
git_initInitialize a new Git repository
git_addStage files for commit
git_commitCommit staged changes

Git Advanced (9 tools)

ToolOperations
git_historylog, diff
git_branchcheckout, checkout_remote, list, merge, rebase, backup
git_syncpush, pull, force_push, push_upstream, sync, pull_strategy
git_conflictstatus, resolve, detect, safe_merge
git_stashlist, push, pop, apply, drop, clear
git_remotelist, add, remove, show, fetch
git_taglist, create, delete, push, show
git_cleanuntracked, untracked_dirs, ignored, all
git_resetUndo commits (soft/mixed/hard)

Hybrid (3 tools)

ToolDescription
gh_create_fileCreate file — Git-first, GitHub API fallback
gh_update_fileUpdate file — Git-first, GitHub API fallback
gh_push_filesWrite multiple files + git add/commit/push in one call

GitHub API (1 tool)

ToolOperations
github_repolist_repos, create_repo, list_prs, create_pr

Dashboard (1 tool)

ToolOperations
github_dashboardfull, notifications, issues, prs_review, security, workflows, mark_read

Response (1 tool)

ToolOperations
github_respondcomment_issue, comment_pr, review_pr

Repair (1 tool)

ToolOperations
github_repairclose_issue, merge_pr, rerun_workflow, dismiss_alert

Admin (4 tools)

ToolOperationsRisk
github_admin_repoget_settings, update_settings, archive, deleteLOW → CRITICAL
github_branch_protectionget, update, deleteLOW → CRITICAL
github_webhookslist, create, update, delete, testLOW → HIGH
github_collaboratorslist, check, add, update_permission, remove, list_invitations, accept_invitation, cancel_invitation, list_teams, add_teamLOW → HIGH

File Operations (1 tool)

ToolOperations
github_fileslist, download, download_repo, pull_repo

Safety System

4-Tier Risk Classification

LevelDescriptionBehavior (moderate mode)
LOWRead-onlyDirect execution
MEDIUMReversible changesOptional dry-run
HIGHImpacts collaborationRequires confirmation token
CRITICALIrreversibleToken + backup recommendation

Safety uses composite keys tool:operation (e.g., github_webhooks:delete) for risk classification.

Safety Modes

ModeConfirms fromRecommended use
strictMEDIUM+Critical production environments
moderateHIGH+General use (default)
permissiveCRITICALLocal development
disabledNeverNot recommended

Safety Configuration

Create safety.json next to the executable (optional):

{
  "mode": "moderate",
  "enable_audit_log": true,
  "require_confirmation_above": 3,
  "audit_log_path": "./mcp-admin-audit.log",
  "audit_log_max_size_mb": 10,
  "audit_log_max_backups": 5
}

If safety.json doesn't exist, defaults to moderate mode with audit logging enabled.

Git-Free Mode

On systems without Git installed, the server:

  1. Automatically detects Git absence
  2. Filters git_* tools from the listing
  3. Keeps all API, admin, dashboard, and file operation tools operational
  4. Returns a friendly error if a Git tool is attempted

The github_files tool (list, download, download_repo, pull_repo) allows cloning and updating repositories using only the GitHub API, without Git.

Security

  • Command injection prevention in all Git operations
  • Path traversal defense
  • SSRF prevention in webhook URLs
  • Cryptographic confirmation tokens for destructive operations
  • Audit logging of all administrative operations

For vulnerability reports, see our Security Policy.

System Requirements

  • Go: 1.26.6 or higher
  • Git: Optional (auto-detected; file/API tools work without it)
  • github.com/google/go-github v88.0.0
  • golang.org/x/oauth2 v0.36.0
  • GitHub Token: Minimum repo permission

Project Status

  • 26 consolidated tools exposing 85 operations
  • Hybrid local Git + GitHub API system
  • 4-tier safety system with confirmation tokens and auto-backup
  • Multi-profile support
  • Complete test suite
  • Production ready (v4.0)

Changelog: See CHANGELOG.md for complete change history.

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

MIT License — see LICENSE for details.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Go-based MCP server for GitHub and local Git operations from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/github-go-server-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools