GitHub MCP Server
Provides comprehensive GitHub pull request data including comments, labels, CI/CD status, and more, with support for pagination and filtering.
README
GitHub MCP Server
A Model Context Protocol (MCP) server that provides comprehensive GitHub pull request data including comments, labels, pipeline status, and more.
Features
-
Full PR Data: Fetches complete pull request information including:
- PR metadata (title, state, timestamps, draft status)
- Creator/author information
- Assignees and reviewers
- Labels and milestones
- File changes statistics
- Merge status
-
Comments Support: Retrieves all comments on pull requests:
- Issue comments
- Review comments
- Sorted chronologically
-
Pipeline/CI Status: Gets CI/CD pipeline information:
- GitHub Check Runs (Actions, third-party CI)
- Commit statuses
- Completion status and conclusions
-
Pagination Support: Automatically fetches ALL pull requests, not just the first page
-
Flexible Filtering: Filter PRs by state (open, closed, or all)
Installation
npm install
npm run build
Configuration
-
Create a GitHub Personal Access Token:
- Go to https://github.com/settings/tokens
- Generate a new token with
reposcope (for private repos) orpublic_reposcope (for public repos)
-
Set up environment variables:
cp .env.example .env # Edit .env and add your GitHub token
Usage with MCP Client
Add to MCP Settings
Add this server to your MCP client configuration:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["path/to/github-mcp-server/dist/index.js"],
"env": {
"GITHUB_TOKEN": "your_github_token_here"
}
}
}
}
Available Tools
1. github_set_token
Set or update the GitHub authentication token at runtime.
Parameters:
token(string, required): GitHub personal access token
2. github_list_pull_requests
List all pull requests in a repository with comprehensive details.
Parameters:
owner(string, required): Repository owner (user or organization)repo(string, required): Repository namestate(string, optional): Filter by state - "open", "closed", or "all" (default: "all")include_comments(boolean, optional): Include all comments for each PR (default: false)include_checks(boolean, optional): Include CI/CD status for each PR (default: false)
Example Response:
{
"repository": "owner/repo",
"total_count": 25,
"state_filter": "all",
"pull_requests": [
{
"number": 123,
"title": "Add new feature",
"state": "open",
"created_at": "2024-01-01T00:00:00Z",
"user": {
"login": "developer",
"avatar_url": "https://...",
"html_url": "https://github.com/developer"
},
"labels": [
{
"name": "enhancement",
"color": "a2eeef",
"description": "New feature or request"
}
],
"assignees": [...],
"comments": 5,
"review_comments": 3,
"check_runs": [...],
"statuses": [...]
}
]
}
3. github_get_pr_comments
Get all comments for a specific pull request.
Parameters:
owner(string, required): Repository ownerrepo(string, required): Repository namepull_number(number, required): Pull request number
Example Response:
{
"repository": "owner/repo",
"pull_request": 123,
"total_comments": 8,
"comments": [
{
"id": 1234567,
"user": {
"login": "reviewer",
"avatar_url": "https://..."
},
"body": "Great work! Just one suggestion...",
"created_at": "2024-01-02T10:00:00Z",
"html_url": "https://github.com/owner/repo/pull/123#issuecomment-1234567"
}
]
}
4. github_get_pr_checks
Get CI/CD check runs and status for a specific pull request.
Parameters:
owner(string, required): Repository ownerrepo(string, required): Repository namepull_number(number, required): Pull request number
Example Response:
{
"repository": "owner/repo",
"pull_request": 123,
"head_sha": "abc123...",
"check_runs": [
{
"id": 9876543,
"name": "build",
"status": "completed",
"conclusion": "success",
"started_at": "2024-01-02T10:00:00Z",
"completed_at": "2024-01-02T10:05:00Z",
"html_url": "https://github.com/owner/repo/actions/runs/9876543"
}
],
"statuses": [
{
"state": "success",
"context": "continuous-integration/travis-ci",
"description": "The Travis CI build passed",
"target_url": "https://travis-ci.org/owner/repo/builds/12345"
}
]
}
Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run build
# Start production server
npm start
Requirements
- Node.js 18+
- GitHub Personal Access Token
- MCP-compatible client
License
MIT
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.