github-mcp
GitHub MCP 서버
안전한 GitHub 개발자 워크플로우를 위한 로컬 OpenCode MCP 서버: main 가져오기, 기능 브랜치 생성, 푸시, 그리고 검토 준비가 완료된 풀 리퀘스트 열기.
환경
쉘에서 다음 변수를 설정하세요. 실제 비밀 정보를 커밋하지 마세요.
export GH_TOKEN="your_github_token_here"
export GITHUB_MCP_ALLOWED_ROOTS="/Users/matiasbinagora/Projects"
export GITHUB_MCP_DEFAULT_BASE_BRANCH="main"
export GITHUB_MCP_DEFAULT_REMOTE="origin"
export GITHUB_MCP_REQUIRE_CLEAN_WORKTREE="true"GH_TOKEN 사용을 권장합니다. 설정되지 않은 경우, gh가 로컬에서 이미 인증된 상태라면 서버가 정상적으로 작동할 수 있습니다.
Related MCP server: GitHub MCP Server
빌드
npm install
npm run build스모크 테스트
이 테스트는 임시 로컬 베어 리포지토리를 생성하고, main을 가져오고, 테스트 브랜치를 생성하고, 파일을 커밋하고, 브랜치를 푸시한 다음 원격 브랜치가 존재하는지 확인합니다.
npm run smokeGitHub 통합 테스트
이 테스트는 구성된 테스트 리포지토리에 실제 브랜치와 검토 준비가 완료된 PR을 생성합니다.
export GITHUB_MCP_SMOKE_REPO_PATH="/Users/matiasbinagora/Projects/binagora"
npm run smoke:githubOpenCode 설정
~/.config/opencode/opencode.json에 있는 전역 OpenCode 설정에 다음을 추가하세요.
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"github": {
"type": "local",
"command": ["node", "/Users/matiasbinagora/Projects/github-mcp/dist/index.js"],
"enabled": true,
"environment": {
"GH_TOKEN": "{env:GH_TOKEN}",
"GITHUB_MCP_ALLOWED_ROOTS": "/Users/matiasbinagora/Projects",
"GITHUB_MCP_DEFAULT_BASE_BRANCH": "main",
"GITHUB_MCP_DEFAULT_REMOTE": "origin",
"GITHUB_MCP_REQUIRE_CLEAN_WORKTREE": "true"
}
}
}
}쉘에서 GH_TOKEN을 내보내기 전에 OpenCode가 실행되는 경우, MCP 서버가 시작되기 전에 ~/.zshrc를 소싱하도록 다음 명령어를 대신 사용하세요:
"command": [
"zsh",
"-lc",
"source \"$HOME/.zshrc\" >/dev/null 2>&1; exec node \"/Users/matiasbinagora/Projects/github-mcp/dist/index.js\""
]도구
github_repo_statusgithub_pull_maingithub_create_feature_branchgithub_push_feature_branchgithub_create_pull_requestgithub_prepare_feature_workflow
안전 참고 사항
리포지토리는 반드시
GITHUB_MCP_ALLOWED_ROOTS내부에 있어야 합니다.일반적인 쉘 실행 도구는 노출되지 않습니다.
main또는master브랜치로의 직접 푸시는 거부됩니다.강제 푸시(force push) 및 브랜치 삭제는 구현되어 있지 않습니다.
기본적으로 브랜치를 가져오거나 생성하고 PR을 생성하기 전에 깨끗한 작업 트리(worktree)가 필요합니다.
브랜치 이름은
git check-ref-format --branch를 통해 검증됩니다.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceStandalone MCP server for GitHub that enables repository management, branch operations, pull request handling, and commit retrieval via tools listed in the README.1
- AlicenseBqualityBmaintenanceSimple MCP server for GitHub operations, currently supports creating repositories.5111MIT
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP server that handles git operations on behalf of AI coding assistants, running as a local HTTP service without external network exposure by default.MIT
- FlicenseBqualityBmaintenanceA lightweight MCP server that acts as a secure proxy for AI assistants to run local Git operations and GitHub API macros simultaneously.1
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
An MCP server that gives your AI access to the source code and docs of all public github repos
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/matiasnjacob/github-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server