github-mcp-bridge
Provides tools for interacting with the GitHub API, enabling operations on repositories, branches, files, pull requests, issues, and commits.
Click on "Deploy 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 server for GitHub. It exposes GitHub operations as MCP tools over HTTP while keeping GitHub credentials server-side.

Quick Start
1. Install dependencies
npm install2. Create local configuration
Copy the example environment file:
cp .env.example .env3. Create your connector token
CONNECTOR_SECRET is a secret token that you generate yourself. It has two purposes:
You add it to your local
.envfile and to your Vercel project environment variables.Your MCP client sends it when connecting to the bridge, using either an
Authorization: Bearerheader or anX-Api-Keyheader.
It is not supplied by GitHub, Vercel, or Upstash Redis.
Generate a token:
openssl rand -hex 64Copy the generated value into .env with your GitHub token:
# Required for local development
GITHUB_PAT=ghp_xxx
CONNECTOR_SECRET=your-generated-token
# Optional
PORT=3000Keep both values private. GITHUB_PAT authenticates the bridge to GitHub. CONNECTOR_SECRET authenticates an MCP client to your local or Vercel-hosted bridge.
4. Start the server
npm run devThe local server listens on http://localhost:3000 by default.
Related MCP server: epik-gh
Environment Variables
Variable | Required | Description |
| Yes | Default GitHub Personal Access Token used when no owner-specific token exists |
| No | Owner-specific GitHub token. The owner is uppercased and hyphens become underscores; for example, |
| Yes | Self-generated connector token. Add it to Vercel and use the same value when authenticating an MCP client to the hosted bridge |
| No | HTTP port. Defaults to |
Owner-specific token selection falls back to GITHUB_PAT when no matching GITHUB_PAT_<OWNER> variable is configured.
Deployment
1. Create a Vercel project
Import this repository into Vercel and configure the production branch.
2. Add Upstash Redis
In the Vercel project, open Storage, add Upstash Redis, and connect it to the project.
The Vercel integration supplies the Upstash Redis connection variables automatically. Do not copy Redis credentials into .env, GitHub Actions, or MCP client configuration.
3. Add Vercel environment variables
Add these variables in Vercel → Project → Settings → Environment Variables:
GITHUB_PAT
CONNECTOR_SECRETUse your GitHub Personal Access Token as GITHUB_PAT.
Generate CONNECTOR_SECRET locally:
openssl rand -hex 64Add the generated value to Vercel as CONNECTOR_SECRET. This exact value becomes the token required by every MCP client connecting to your hosted bridge.
4. Deploy
Push the branch to GitHub or deploy from the Vercel dashboard.
The deployment uses Upstash Redis for session continuity across Vercel’s serverless instances. Local development and CI use in-memory sessions and do not contact Redis.
Sessions
Sessions are bound to the authenticated caller; they provide request continuity and do not replace authentication.
Sessions expire after 2 hours without a valid request.
Sessions cannot live longer than 12 hours from creation.
Each valid request refreshes the idle window without extending the maximum lifetime.
initialize,notifications/initialized, andpingare supported.The server can maintain session continuity without requiring every client to manage an
Mcp-Session-Idheader manually.
Available Tools
The bridge currently exposes 37 tools. Call tools/list to obtain the authoritative tool definitions and input schemas at runtime.
Repositories
Tool | Description |
| List repositories accessible to the configured GitHub token |
| Get details of a repository |
Branches
Tool | Description |
| List repository branches |
| Get branch details, including its latest commit |
| Create a branch from an existing branch |
Files
Tool | Description |
| Read a file with metadata; content larger than 3.5 MB is truncated |
| Read decoded raw text from a file |
| Read multiple files with cursor pagination |
| List a repository directory |
| Create or replace a file in a branch |
| Create or replace multiple files in one commit |
| Write multiple files in one commit |
| Apply targeted text patches without replacing the entire file |
| Delete a file from a branch |
Pull Requests
Tool | Description |
| List open pull requests |
| List pull requests by state |
| Get pull request details |
| List files changed by a pull request |
| List pull request conversation comments |
| List pull request reviews |
| Get a pull request’s unified diff |
| Create a pull request |
| Update a pull request’s title, body, state, or base branch |
| Add a conversation comment to a pull request |
Issues
Tool | Description |
| List issues by state, excluding pull requests |
| Get issue details |
| Create an issue |
| Update an issue’s title, body, state, labels, or assignees |
| Add a closing keyword that links an issue to a pull request |
| List comments on an issue |
| Add a comment to an issue |
Commits
Tool | Description |
| List commits, optionally filtered by branch or path |
| Get commit details, including changed files and diff stats |
Actions
Tool | Description |
| List workflow runs, optionally filtered by branch, event, or status |
| Get workflow-run details, including jobs and steps |
Search
Tool | Description |
| Search code and return matching file paths and fragments |
| Search file names and paths through the repository tree |
Tool Requests
All repository-scoped tools require owner and repo. list_repositories is the exception because it lists repositories available to the configured token.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_branches",
"arguments": {
"owner": "SamNewhouse",
"repo": "github-mcp-bridge"
}
}
}Connecting an MCP Client
Use your local server URL or Vercel deployment URL as the MCP endpoint.
Authenticate every request with the same CONNECTOR_SECRET value that you added to .env locally or to Vercel in production.
Authorization: Bearer <CONNECTOR_SECRET>Alternatively:
X-Api-Key: <CONNECTOR_SECRET>For example, if Vercel contains:
CONNECTOR_SECRET=abc123...your MCP client must send:
Authorization: Bearer abc123...The bridge validates the connector token using timing-safe comparison and rate-limits repeated failed authentication attempts.
Testing
npm test
npm run test:unit
npm run test:integration
npm run typecheckThe project currently has 19 test suites and 238 passing tests.
Scripts
Command | Description |
| Start the development server with hot reload |
| Compile TypeScript to |
| Run the compiled server |
| Run unit and integration tests |
| Run unit tests |
| Run integration tests |
| Type-check without emitting files |
| Format the project with Prettier |
Security
Keep
GITHUB_PATserver-side only.Do not expose Upstash Redis credentials to MCP clients.
Do not commit
.envfiles, GitHub tokens, Redis credentials, orCONNECTOR_SECRET.Use the minimum GitHub PAT permissions required.
Rotate
CONNECTOR_SECRETandGITHUB_PATimmediately if either is exposed.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Create, deploy, and operate MCP servers directly from your GitHub repositories.
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
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseBqualityCmaintenanceMCP server that exposes GitHub operations as tools for AI agents, enabling code search, issue management, and PR review.12MIT
- FlicenseNot gradedqualityAmaintenanceA GitHub MCP server that wraps the gh CLI to expose GitHub operations like issues, pull requests, branches, labels, repositories, CI actions, and Projects V2 as tools for MCP clients.-
- AlicenseNot gradedqualityBmaintenanceMCP server providing maximum practical control over GitHub via REST and GraphQL APIs, exposing 22 tools for repository management, file operations, issues, PRs, Actions, and more.MIT
- AlicenseAqualityCmaintenanceA lightweight MCP server that exposes GitHub tools for searching repositories, listing issues, and reading file contents.3379 npmISC