halkutkar/pr-checker-mcp
If you are the rightful owner of pr-checker-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The PR Checker MCP Server is a tool designed to streamline the process of checking GitHub Pull Request build statuses and analyzing Buildkite CI failures using natural language commands.
PR Checker MCP Server
A Model Context Protocol (MCP) server that enables Claude to check GitHub Pull Request build status and analyze Buildkite CI failures.
Features
- 🔍 Check PR Build Status: Automatically check if your PRs passed CI
- 📋 List Open PRs: View all your open pull requests
- 🔧 Buildkite Integration: Fetch and analyze logs from failed Buildkite jobs
- 🤖 Natural Language: Just ask Claude "Check my PR status" and it works!
Prerequisites
- Node.js 18 or higher
- GitHub CLI (
gh) installed and authenticated jqfor JSON parsing:brew install jq- GitHub Personal Access Token with repo access
- Buildkite API token (if using Buildkite)
Installation
1. Clone the repository
git clone https://github.com/halkutkar/pr-checker-mcp.git
cd pr-checker-mcp
Or if you're in a DoorDash organization and this has been transferred:
git clone https://github.com/doordash/pr-checker-mcp.git
cd pr-checker-mcp
2. Install dependencies
npm install
3. Set up environment variables
Create a .env file or export these variables:
export GITHUB_TOKEN="your_github_token_here"
export BUILDKITE_TOKEN="your_buildkite_token_here"
export GITHUB_REPO="your-org/your-repo" # Optional, defaults to doordash/android
Or add them to your shell profile (~/.zshrc, ~/.bashrc, etc.):
# GitHub and Buildkite tokens
export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"
export BUILDKITE_TOKEN="bkua_xxxxxxxxxxxx"
4. Configure Claude Code
Add the MCP server to your Claude Code configuration file at ~/.claude/config.json:
{
"mcpServers": {
"pr-checker": {
"command": "node",
"args": ["/absolute/path/to/pr-checker-mcp/index.js"],
"env": {
"GITHUB_TOKEN": "your_github_token",
"BUILDKITE_TOKEN": "your_buildkite_token",
"GITHUB_REPO": "your-org/your-repo"
}
}
}
}
Important: Replace /absolute/path/to/pr-checker-mcp/index.js with the actual path where you cloned the repo.
5. Restart Claude Code
After adding the configuration, restart Claude Code to load the MCP server.
Usage
Once configured, you can use natural language with Claude:
Check PR Status
Check my PR status
Did my PR build pass?
What failed in my PR?
Check Specific PR
Check PR #12345
List All Open PRs
List my open PRs
Available Tools
The MCP server exposes two tools:
1. check_pr_status
Checks the build status of a GitHub PR and fetches Buildkite logs if there are failures.
Parameters:
pr_number(optional): Specific PR number to checkinclude_full_logs(optional): Whether to include full logs (default: true)
2. list_my_prs
Lists all open pull requests created by you in the configured repository.
Parameters: None
Configuration Options
You can customize the behavior using environment variables:
| Variable | Description | Default |
|---|---|---|
GITHUB_TOKEN | GitHub Personal Access Token | Required |
BUILDKITE_TOKEN | Buildkite API Token | Required |
GITHUB_REPO | GitHub repository in format org/repo | doordash/android |
PR_CHECKER_SCRIPT | Path to the PR checker script | ./check-pr-failures.sh |
How It Works
- PR Detection: Uses GitHub CLI to list your open PRs
- Status Checks: Retrieves CI status from GitHub's status checks API
- Buildkite Integration: For failed Buildkite jobs, fetches detailed logs via Buildkite API
- Analysis: Parses logs and presents failure information in a structured format
Repository Structure
pr-checker-mcp/
├── index.js # Main MCP server
├── check-pr-failures.sh # Bash script for PR checking
├── package.json # Node.js dependencies
├── README.md # This file
└── .gitignore # Git ignore rules
Troubleshooting
"No open PRs found"
- Check that you have open PRs in the configured repository
- Verify your GitHub token has access to the repository
- For organization repos, ensure your token is authorized for SSO
"BUILDKITE_TOKEN not set"
- Make sure you've exported the
BUILDKITE_TOKENenvironment variable - The token must be set in your shell profile or Claude Code config
MCP Server Not Loading
- Check that the path in
~/.claude/config.jsonis correct and absolute - Verify Node.js is installed:
node --version - Check Claude Code logs for errors
Development
Testing Locally
Run the MCP server directly to test:
node index.js
The server communicates via stdio, so you'll need an MCP client to interact with it.
Adding New Features
The MCP server is built using the @modelcontextprotocol/sdk. To add new tools:
- Add tool definition in
ListToolsRequestSchemahandler - Implement tool logic in
CallToolRequestSchemahandler - Update README with new tool documentation
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Support
For issues or questions:
- Open an issue on GitHub
- Contact the Android team at DoorDash
Credits
Built with the Model Context Protocol SDK by Anthropic.