GitHub MCP Server
Provides tools for interacting with GitHub repositories, enabling AI agents to read, write, and manage files, branches, commits, pull requests, and repository information.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GitHub MCP ServerCreate a new branch called feature/add-logging"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GitHub MCP Server
Connect Claude directly to your GitHub repositories as an intelligent copilot for code changes, commits, and PRs.
Use Claude to:
✅ Read & explore code
✅ Update files with auto-commits
✅ Create branches & manage PRs
✅ Commit multiple files at once
✅ Search & analyze code patterns
✅ All with proper git messages & co-author attribution
Works anywhere: Claude Desktop → Web Dashboard → Mobile → Local VPS
🎯 What This Does
Before (Manual)
"Claude, how do I fix this error?"
→ Claude explains in chat
→ You manually edit files
→ You manually commit & pushAfter (GitHub MCP)
"Claude, fix the MACD signal calculation and commit"
→ Claude reads the code
→ Makes the fix
→ Commits with a proper message
→ Shows you the commit linkRelated MCP server: GitHub MCP Server
🚀 Quick Start
1. One-Time Setup (5 min)
# Clone the MCP server
git clone https://github.com/techybiky/github-mcp.git
cd github-mcp
# Install dependencies
npm install
# Build for production
npm run build2. Get GitHub Token
Create "Personal Access Token (Classic)"
Select scopes:
repo,read:user,workflowCopy the token (you won't see it again)
3. Configure Claude Desktop
macOS/Linux:
cat > ~/.config/Claude/claude_desktop_config.json << 'EOF'
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/path/to/github-mcp/dist/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_paste_your_token",
"GITHUB_OWNER": "techybiky",
"GITHUB_REPO": "niftybot"
}
}
}
}
EOFWindows:
Create %APPDATA%\Claude\claude_desktop_config.json with the same content above.
4. Restart Claude Desktop
Close and reopen Claude. GitHub tools appear in the sidebar.
💡 Usage Examples
Read Code
YOU: "Show me the current trading signal logic"
CLAUDE: ✓ Fetches src/signals.js
✓ Explains the MACD/RSI calculation
✓ Points out potential improvementsUpdate & Commit
YOU: "Update MACD threshold to 0.35 and commit"
CLAUDE: ✓ Reads current file (gets SHA)
✓ Updates the threshold
✓ Commits with message: "refactor: adjust MACD threshold to 0.35"
✓ Shows commit linkCreate Feature Branch
YOU: "Create a branch for fixing the Groww API symbol mapping"
CLAUDE: ✓ Creates branch: feature/groww-symbol-fix
✓ Switches you there
✓ Ready to make changesBatch Commit
YOU: "Add error handling to both index.js and api.js"
CLAUDE: ✓ Reads both files
✓ Adds error handling to both
✓ Single commit: "feat: add comprehensive error handling"Create PR
YOU: "Create a PR for the telegram-alerts branch"
CLAUDE: ✓ Opens PR with auto-generated title & description
✓ Links to Telegram implementation details
✓ Shows PR URL🛠 Tools Available
Tool | Purpose |
read_file | Read file contents (get SHA for editing) |
write_file | Create/update file (auto-commits) |
delete_file | Delete file (auto-commits) |
list_files | Browse repo structure |
create_branch | Create new branch from main/other |
list_branches | List all branches |
get_branch_info | Branch details & protection status |
commit_multiple | Batch commit multiple files |
create_pull_request | Open PR (auto-description) |
list_commits | View commit history |
get_repo_info | Repo metadata (stars, language, etc) |
search_files | Find files by pattern/name |
📋 Multi-Repo Setup
Manage multiple repos in one Claude instance:
{
"mcpServers": {
"github-niftybot": {
"command": "node",
"args": ["/path/to/github-mcp/dist/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_xxx",
"GITHUB_REPO": "niftybot"
}
},
"github-coexist": {
"command": "node",
"args": ["/path/to/github-mcp/dist/index.js"],
"env": {
"GITHUB_TOKEN": "ghp_xxx",
"GITHUB_REPO": "coexist"
}
}
}
}Then in Claude: "Switch to github-coexist and show me the migrations"
🐳 Deployment
Docker
docker build -t github-mcp .
docker run -e GITHUB_TOKEN=ghp_xxx \
-e GITHUB_REPO=niftybot \
-e GITHUB_OWNER=techybiky \
github-mcpVercel
vercel --env GITHUB_TOKEN=ghp_xxx --env GITHUB_REPO=niftybotRailway
railway link
railway upLocal VPS
git clone https://github.com/techybiky/github-mcp.git
cd github-mcp
npm install && npm run build
GITHUB_TOKEN=ghp_xxx GITHUB_REPO=niftybot npm start🌐 HTTP Server (Optional)
If you want to access this from web/mobile (not just Claude):
npm run http
# Runs on http://localhost:3000
# API Key printed to consoleExample API call:
curl -X POST http://localhost:3000/api/call \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"tool": "read_file",
"params": {"path": "package.json"}
}'🔐 Security
Token Management
Create token: https://github.com/settings/tokens/new
Scopes needed:
repo,read:user,workflowStorage: Keep in
~/.config/Claude/(not committed to git)Rotation: Regenerate monthly in Settings
Best Practices
✅ Use environment variables (never hardcode)
✅ Store config in
~/.config/(local machine only)✅ Use fine-grained tokens for enterprise
✅ Rotate tokens regularly
✅ Never commit
claude_desktop_config.jsonwith real tokens
🚨 Troubleshooting
GitHub tools not showing in Claude
Solution 1: Check config file syntax
# macOS/Linux
cat ~/.config/Claude/claude_desktop_config.json | jq .
# Windows - open in text editor and validate JSONSolution 2: Verify node path
which node # macOS/Linux
where node # Windows
# Use full path in config: /usr/bin/node or /opt/homebrew/bin/nodeSolution 3: Restart Claude Desktop
Close completely
Reopen
Check sidebar for tools
"401 Unauthorized"
Token is invalid/expired → Generate new at https://github.com/settings/tokens
Token missing scopes → Regenerate with
repo+read:user+workflow
"404 Not Found"
Wrong repo name → Check
GITHUB_REPOin configWrong owner → Check
GITHUB_OWNERin config (default:techybiky)Token can't access repo → Must have
reposcope
"409 Conflict"
File SHA is stale → Claude auto-retries by re-reading file
Branch was updated → Try again
📦 Project Structure
github-mcp/
├── src/
│ ├── index.js # MCP server entry (stdio transport)
│ ├── mcp-server.js # Tool definitions & handlers
│ ├── github.js # GitHub REST API wrapper
│ └── http-server.js # Optional HTTP server
├── dist/ # Built files (generated)
├── package.json
├── Dockerfile # For containerized deployment
├── .env.example # Environment variables template
├── claude_desktop_config.template.json
├── SETUP.md # Detailed setup instructions
└── README.md # This file🎓 How It Works
You talk to Claude in Claude Desktop
Claude calls tools from this MCP server (via stdio)
MCP server calls GitHub API to read/write code
Results come back as text to Claude
Claude shows you what was changed + commit links
Claude Desktop
↓ (stdio)
GitHub MCP Server (this repo)
↓ (HTTP)
GitHub REST API📚 Learning Resources
Model Context Protocol: https://modelcontextprotocol.io
GitHub REST API: https://docs.github.com/en/rest
Claude Documentation: https://docs.claude.com
💬 Support & Feedback
Discussions: https://github.com/techybiky/github-mcp/discussions
Claude Help: https://support.claude.com
📄 License
MIT
🙏 Thanks
Built for KK Das (@techybiky) — SDET, Test Automation Architect, Open Source Builder
Your repos made easier: niftybot • coexist • youtube-bot • job-tracker
Ready to get started? → SETUP.md 🚀
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- 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/techybiky/git_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server