GitHub MCP Server

GitHub MCP Server

Enables GitHub operations via MCP, providing tools for issues, pull requests, and Actions workflows through a Streamable HTTP transport.

Category
Visit Server

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/sdk for MCP server and transport support
  • express to expose a /mcp HTTP endpoint
  • octokit to communicate with GitHub
  • zod to 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 registration
  • src/github/client.ts: Octokit client initialization and token validation
  • src/github/issues.ts: GitHub issue helpers
  • src/github/pullRequests.ts: GitHub pull request helpers
  • src/github/actions.ts: GitHub Actions workflow helpers
  • src/tools/issues.ts: issue-related MCP tools
  • src/tools/pullRequests.ts: pull-request-related MCP tools
  • src/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

  1. Install dependencies:

    pnpm install
    
  2. Copy the example environment file:

    cp .env.example .env
    
  3. 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

  • getIssue
  • createIssueComment
  • updateIssue
  • listIssues

Pull Requests

  • getPullRequest
  • createPullRequestComment
  • updatePullRequest
  • listPullRequests

Actions

  • listActions
  • getActionStatus
  • getActionDetails
  • cancelAction
  • retryAction

How it works

  1. src/main.ts creates an McpServer instance.
  2. Domain-specific tool registrars attach GitHub tools to the server.
  3. Express exposes /mcp and each request creates a fresh StreamableHTTPServerTransport.
  4. The transport handles the incoming request and sends the MCP response back to the client.
  5. GitHub functions use Octokit with GITHUB_TOKEN from .env.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured