GitHub SSH MCP Server - 智能访问检测版
@pyz11
增强版GitHub MCP Server,支持智能SSH访问检测和自动访问方式切换
Overview
What is GitHub SSH MCP Server - 智能访问检测版?
This is an enhanced GitHub MCP (Model Context Protocol) server designed for Cursor IDE and other MCP-compatible tools. It adds a smart SSH access detection feature that automatically detects and selects the best method (SSH or HTTPS) for connecting to GitHub.
How to use GitHub SSH MCP Server - 智能访问检测版?
Install Go 1.21+, Git, and a GitHub Personal Access Token. Compile the server from source using go build then configure it in Cursor IDE’s MCP settings by specifying the executable path, the stdio argument, and the GITHUB_PERSONAL_ACCESS_TOKEN environment variable. Use the built‑in tools such as get_github_access_info, test_github_access, and convert_github_url to manage access or convert URLs.
Key features of GitHub SSH MCP Server - 智能访问检测版
- Automatic SSH key detection (RSA, Ed25519, ECDSA, DSA)
- SSH configuration verification and real‑time connection testing
- Smart access switching: SSH preferred, fallback to HTTPS
- 5‑minute result caching to avoid repeated checks
- Dedicated MCP tools for access info, testing, and URL conversion
- Full GitHub operations: repos, issues, PRs, code scanning, notifications, files
Use cases of GitHub SSH MCP Server - 智能访问检测版
- Check the current GitHub access method (SSH or HTTPS) from an MCP client
- Test SSH connectivity to GitHub and force‑refresh the cache
- Convert GitHub repository URLs between SSH and HTTPS formats
- Manage GitHub repositories, issues, and pull requests via MCP tools
- Automate GitHub operations with intelligent fallback when SSH is unavailable
FAQ from GitHub SSH MCP Server - 智能访问检测版
What are the prerequisites?
Go 1.21+, a Git client, and a GitHub Personal Access Token are required. SSH keys are optional but recommended for SSH access.
Does the server read private key content?
No. It only checks for the existence of key files (e.g., ~/.ssh/id_rsa) and verifies SSH connectivity; it never reads private key data.
What transport and authentication does the server use?
It uses the MCP stdio transport (argument "stdio"). Authentication is done via the GITHUB_PERSONAL_ACCESS_TOKEN environment variable.
How are SSH detection results cached?
Detection results are cached for 5 minutes to improve performance. Use test_github_access with force_refresh: true to bypass the cache.
What are common connection issues?
SSH detection may fail if key files are missing or have incorrect permissions. Connection timeouts can occur due to network or firewall settings. An invalid token will prevent GitHub API access.