An enhanced GitHub Pull Request management server built on the Model Context Protocol (MCP). This server extends the base @modelcontextprotocol/server-github functionality with rich PR creation features, providing a more structured and comprehensive pull request workflow.
This MCP server enhances GitHub pull request management by providing:
🔄 Complete Base Server Compatibility
🚀 Enhanced PR Creation
.github/pull_request_template.md
(example below)Create .github/pull_request_template.md
with sections that match the enhanced PR features:
## Overview
Summarize the purpose and scope of this PR.
---
## Key Changes
List the key changes made in this PR.
---
## Code Highlights
Identify important code sections that reviewers should focus on.
---
## Testing
Outline testing approach and results.
---
## Links
Include relevant links and references.
---
## Additional Notes
Provide any extra context or notes for reviewers.
---
### Issue Tagging
Link related issues here.
---
You can use this server in two ways:
Run directly using npx:
# Make sure GITHUB_TOKEN environment variable is set
export GITHUB_TOKEN=your_github_personal_access_token
npx @ibraheem4/github-mcp
For development or if you want to modify the server:
Clone the repository:
git clone https://github.com/ibraheem4/github-mcp.git
cd github-mcp
Install dependencies:
npm install
Build the project:
npm run build
The build will create an executable server in the build
directory that can be used by MCP clients.
The server requires both a GitHub Personal Access Token and a Linear API Key. You can provide these in two ways:
Copy .env.example
to .env
in the project root:
cp .env.example .env
Then edit .env
to add your tokens:
# Required for GitHub API access
GITHUB_TOKEN=your_github_personal_access_token
# Required for Linear API access
LINEAR_API_KEY=your_linear_api_key
When using the server through MCP clients (Claude Desktop, VSCode, etc.), configure the tokens in your MCP settings file as shown in the configuration examples below. This is the recommended approach as it keeps your tokens separate from the project files.
To obtain the required tokens:
repo
scopeStart the MCP server:
npm start
For development:
npm run dev
This enhanced GitHub PR server can run alongside the base GitHub server in various environments. Here's how to configure each:
Open Claude Desktop settings:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
Add both servers to the configuration. You can use either the npx version or local build:
{
"mcpServers": {
"github-ibraheem4": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "your_github_personal_access_token"
}
},
// Option 1: Using npx (Recommended)
"github-pr-ibraheem4": {
"command": "npx",
"args": ["-y", "@ibraheem4/github-mcp"],
"env": {
"GITHUB_TOKEN": "your_github_personal_access_token",
"LINEAR_API_KEY": "your_linear_api_key"
},
"disabled": false,
"alwaysAllow": []
}
// Option 2: Using local build
// "github-pr-ibraheem4": {
// "command": "node",
// "args": ["/path/to/github-mcp/build/index.js"],
// "env": {
// "GITHUB_TOKEN": "your_github_personal_access_token",
// "LINEAR_API_KEY": "your_linear_api_key"
// },
// "disabled": false,
// "alwaysAllow": []
// }
}
}
Open VSCode settings:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
%APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Add both servers to the configuration. You can use either the npx version or local build:
{
"mcpServers": {
"github-ibraheem4": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "your_github_personal_access_token"
}
},
// Option 1: Using npx (Recommended)
"github-pr-ibraheem4": {
"command": "npx",
"args": ["-y", "@ibraheem4/github-mcp"],
"env": {
"GITHUB_TOKEN": "your_github_personal_access_token",
"LINEAR_API_KEY": "your_linear_api_key"
},
"disabled": false,
"alwaysAllow": []
}
// Option 2: Using local build
// "github-pr-ibraheem4": {
// "command": "node",
// "args": ["/path/to/github-mcp/build/index.js"],
// "env": {
// "GITHUB_TOKEN": "your_github_personal_access_token",
// "LINEAR_API_KEY": "your_linear_api_key"
// },
// "disabled": false,
// "alwaysAllow": []
// }
}
}
Open Roo Cline settings:
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
%APPDATA%/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
~/.config/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
Add both servers to the configuration. You can use either the npx version or local build:
{
"mcpServers": {
"github-ibraheem4": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "your_github_personal_access_token"
}
},
// Option 1: Using npx (Recommended)
"github-pr-ibraheem4": {
"command": "npx",
"args": ["-y", "@ibraheem4/github-mcp"],
"env": {
"GITHUB_TOKEN": "your_github_personal_access_token"
},
"disabled": false,
"alwaysAllow": []
}
// Option 2: Using local build
// "github-pr-ibraheem4": {
// "command": "node",
// "args": ["/path/to/github-mcp/build/index.js"],
// "env": {
// "GITHUB_TOKEN": "your_github_personal_access_token"
// },
// "disabled": false,
// "alwaysAllow": []
// }
}
}
Restart your application after making changes
Note: Both servers can run simultaneously in all environments. The base github
server provides standard GitHub operations, while the github-pr
server adds enhanced PR creation features. You can use either server based on your needs - use the base server for simple operations or the enhanced server when you need rich PR features.
Create a new pull request with enhanced features
{
// Required fields (base compatibility)
owner: string;
repo: string;
title: string;
head: string;
base: string;
// Optional fields (base compatibility)
body?: string;
draft?: boolean;
maintainer_can_modify?: boolean;
// Enhanced features
overview?: string;
keyChanges?: string[];
codeHighlights?: string[];
testing?: string[];
links?: Array<{ title: string; url: string }>;
additionalNotes?: string;
issueIds?: string[];
checklist?: {
adhereToConventions?: boolean;
testsIncluded?: boolean;
documentationUpdated?: boolean;
changesVerified?: boolean;
screenshotsAttached?: boolean;
};
attachments?: Array<{
type: "image" | "video" | "diagram";
alt: string;
url: string;
width?: number;
}>;
labels?: string[];
reviewers?: string[];
assignees?: string[];
}
List pull requests in a repository
{
owner: string; // Required
repo: string; // Required
state?: "open" | "closed" | "all";
}
Update an existing pull request
{
owner: string; // Required
repo: string; // Required
pull_number: number; // Required
title?: string;
body?: string;
state?: "open" | "closed";
}
src/
├── index.ts # Main MCP server implementation
├── api/ # API routes and middleware
├── config/ # Configuration
└── types/ # TypeScript type definitions
src/types/index.ts
src/index.ts
npm install
npm run dev
npm test
npm run test:unit
npm run test:integration
npm run test:coverage
Authentication Errors
Build Issues
rm -rf build/
rm -rf node_modules && npm install
Runtime Errors
Enable debug logging by setting:
DEBUG=github-pr-mcp:* npm run dev
git checkout -b feature/amazing-feature
)npm test
)git commit -m 'feat: add amazing feature'
)git push origin feature/amazing-feature
)MIT License - see LICENSE file for details
Seamless access to top MCP servers powering the future of AI integration.