github-mcp-bridge
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-bridgelist open pull requests for my-org/my-repo"
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-bridge
A lightweight TypeScript MCP (Model Context Protocol) server for GitHub. It exposes GitHub operations as MCP tools over HTTP, so any MCP-compatible client can interact with GitHub repositories without needing a built-in GitHub connector.
The GitHub PAT lives server-side only. Clients authenticate to the bridge using a shared CONNECTOR_SECRET.
How it works
MCP Client ──bearer token──▶ github-mcp-bridge ──GitHub PAT──▶ GitHub APIThe client sends a JSON-RPC 2.0
tools/callrequest to the bridge with a bearer token.The bridge validates the token against
CONNECTOR_SECRET(timing-safe, with rate limiting).The bridge selects the correct PAT for the request owner (with fallback to the default) and calls the GitHub API.
The bridge also exposes tools/list so any client can discover all available tools and their input schemas at runtime — no manual tool configuration needed.
Available tools
Repositories
Tool | Description |
| List repositories accessible to the configured PAT |
| Get details of a single repository |
Branches
Tool | Description |
| List branches for a repository |
| Get branch details including latest commit SHA, message, and protection status |
| Create a branch from an existing base branch |
Files
Tool | Description |
| Get the contents of a file in a repository. Files larger than 3.5 MB are truncated — check the |
| Get the raw decoded text content of a file in a repository |
| Get the contents of multiple files in a repository. Results are paginated — when |
| List files and directories at a repository path |
| Create or update a file in a repository branch |
| Create or update multiple files in a repository branch in a single commit |
| Create a single commit that writes multiple files to a repository branch |
| Apply targeted text patches to a file without replacing the entire content. Supports |
| Delete a single file from a branch |
Pull Requests
Tool | Description |
| List open pull requests for a repository |
| List pull requests filtered by state ( |
| Get a pull request by number |
| List files changed in a pull request, including patches |
| List general conversation comments on a pull request |
| Post a general conversation comment on a pull request |
| List reviews submitted on a pull request |
| Get the full unified diff for a pull request |
| Create a pull request |
| Update a pull request (title, body, state, base branch) |
Issues
Tool | Description |
| List issues for a repository, filtered by state ( |
| Get a single issue by number |
| Create a new issue |
| Update an existing issue (title, body, state, labels, assignees) |
| Link an issue to a PR using a closing keyword ( |
| List all comments on an issue |
| Post a comment on an issue |
Commits
Tool | Description |
| List commits for a repository, optionally filtered by branch or file path |
| Get full commit detail by SHA or ref, including changed files and diff stats |
Actions
Tool | Description |
| List workflow runs for a repository, optionally filtered by branch, event, or status |
| Get details of a workflow run, including its jobs and steps |
Search
Tool | Description |
| Search for code within a repository — returns file paths and match fragments |
| Search for files by name or path pattern using the git tree (no query limits) |
Getting started
Prerequisites
Node.js >= 24
A GitHub Personal Access Token with
reposcope (or a fine-grained PAT scoped to the repositories you need)
Local development
# 1. Clone the repo
git clone https://github.com/SamNewhouse/github-mcp-bridge.git
cd github-mcp-bridge
# 2. Install dependencies
npm install
# 3. Set up environment variables
cp .env.example .env
# Edit .env and fill in GITHUB_PAT and CONNECTOR_SECRET
# 4. Start the dev server (hot-reloads on change)
npm run devThe server starts on http://localhost:3000 by default (configurable via PORT in .env).
Environment variables
Variable | Required | Description |
| ✅ | Default GitHub PAT — used for any owner that has no dedicated entry |
| ✗ | Owner-specific PAT. The owner name is uppercased and hyphens replaced with underscores to form the key — e.g. |
| ✅ | Shared secret used to authenticate requests to the bridge. Minimum 32 characters — generate with |
| ✗ | HTTP port (default: |
Deploying
The bridge is a standard Node.js HTTP server. It can be deployed anywhere that runs Node.js.
Set the three environment variables (GITHUB_PAT, CONNECTOR_SECRET, and optionally PORT) in your hosting environment, then run:
npm run build
npm startOnce deployed, use the root URL as the MCP endpoint and point your client at it.
Verifying the server
Health check
curl -H "Authorization: Bearer $CONNECTOR_SECRET" http://localhost:3000/health
# {"ok":true}Discover all tools
curl -s -X POST http://localhost:3000 \
-H "Authorization: Bearer $CONNECTOR_SECRET" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Call a tool
curl -s -X POST http://localhost:3000 \
-H "Authorization: Bearer $CONNECTOR_SECRET" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_branches",
"arguments": {
"owner": "your-org",
"repo": "your-repo"
}
}
}'Connecting an MCP client
Configure your MCP client with:
Setting | Value |
URL | Your deployment URL |
Auth type | Bearer token / API key |
Secret | Your |
The client can call tools/list at any time to discover all available tools and their input schemas dynamically.
Security
Authentication
Every request (including /health and HEAD /) requires a valid CONNECTOR_SECRET provided as:
Authorization: Bearer <secret>header, orX-Api-Key: <secret>header
Secret comparison uses crypto.timingSafeEqual to prevent timing side-channel attacks.
Secret rotation
CONNECTOR_SECRET supports zero-downtime rotation via a comma-separated list:
CONNECTOR_SECRET="newSecret,oldSecret"A request is authorised if it matches any entry. Once all clients have rotated to the new secret, remove the old one.
Rate limiting
Failed authentication attempts are tracked per IP in-memory. After 10 failures within a 15-minute window, the IP is blocked for 15 minutes. The counter resets on successful authentication.
Note: The rate limiter is per-process. On serverless runtimes (Vercel), each cold start gets a fresh counter. For persistent cross-instance enforcement, swap the in-memory store for Vercel KV or Redis.
Security headers
The public splash page (GET /) is served with:
Content-Security-PolicyX-Content-Type-Options: nosniffX-Frame-Options: DENYReferrer-Policy: no-referrer
Best practices
Keep
GITHUB_PATserver-side only — never expose it to clientsUse a fine-grained PAT with the minimum repository permissions needed
Use a minimum 32-character random
CONNECTOR_SECRET— generate withopenssl rand -hex 32Rotate
CONNECTOR_SECRETimmediately if it is ever exposedRotate
GITHUB_PATimmediately if it is ever exposedNever log or commit secrets
Scripts
Command | Description |
| Start dev server with hot-reload |
| Compile TypeScript to |
| Run compiled server from |
| Run all tests (unit + integration) |
| Run unit tests only |
| Run integration tests only |
| Type-check without emitting |
| Format code with Prettier |
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
- 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/SamNewhouse/github-mcp-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server