GitHub MCP Server
Enables GitHub operations via MCP, providing tools for issues, pull requests, and Actions workflows through a Streamable HTTP transport.
README
MCP Demo Server
This repository is a minimal Model Context Protocol (MCP) server that exposes GitHub issue, pull request, and Actions operations as tools over a Streamable HTTP transport.
Overview
The server uses:
@modelcontextprotocol/sdkfor MCP server and transport supportexpressto expose a/mcpHTTP endpointoctokitto communicate with GitHubzodto define tool input schemas
The server organizes code into two domains:
src/github/: GitHub helper functions grouped by domain (client,issues,pullRequests,actions)src/tools/: MCP tool registration for issues, pull requests, and actions
Project structure
src/main.ts: MCP server setup, Express app, and tool registrationsrc/github/client.ts: Octokit client initialization and token validationsrc/github/issues.ts: GitHub issue helperssrc/github/pullRequests.ts: GitHub pull request helperssrc/github/actions.ts: GitHub Actions workflow helperssrc/tools/issues.ts: issue-related MCP toolssrc/tools/pullRequests.ts: pull-request-related MCP toolssrc/tools/actions.ts: action-related MCP tools.env: local environment variables (ignored in git).env.example: example environment variables.github/important-files.mdc: important file list for repo metadata
Requirements
- Node.js 20+ (recommended)
corepack/pnpm- GitHub Personal Access Token with repo and workflow permissions
Setup
-
Install dependencies:
pnpm install -
Copy the example environment file:
cp .env.example .env -
Set your GitHub token in
.env:GITHUB_TOKEN=your_github_token_here
Run locally
Start the development server:
pnpm dev
Build the project:
pnpm build
Server endpoint
The MCP server listens on the port set by PORT or 8080 by default.
- HTTP endpoint:
POST /mcp
This route accepts MCP requests from a compatible client and forwards them to the Streamable HTTP transport.
Connecting from VS Code
Create .vscode/mcp.json:
{
"servers": {
"github": { "type": "http", "url": "http://localhost:8080/mcp" }
}
}
Ensure the server is running (pnpm dev) first, then start it via:
Command Palette → MCP: List Servers → Restart.
Available tools
Issues
getIssuecreateIssueCommentupdateIssuelistIssues
Pull Requests
getPullRequestcreatePullRequestCommentupdatePullRequestlistPullRequests
Actions
listActionsgetActionStatusgetActionDetailscancelActionretryAction
How it works
src/main.tscreates anMcpServerinstance.- Domain-specific tool registrars attach GitHub tools to the server.
- Express exposes
/mcpand each request creates a freshStreamableHTTPServerTransport. - The transport handles the incoming request and sends the MCP response back to the client.
- GitHub functions use Octokit with
GITHUB_TOKENfrom.env.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.