MCP PR Workflow Server
This MCP server lets AI assistants safely interact with GitHub PRs, CI, and Slack through typed, guarded tools.
Analyze GitHub PR file changes and classify them (features, fixes, docs, etc.)
Suggest a PR template based on change analysis
Summarize GitHub Actions CI results for a PR
Post sanitized status comments/updates on a PR
Send validated Slack notifications to allowed channels
Notify Slack about deployment success/failure
Create follow-up GitHub issues from PR context
Access team PR guidelines and CI escalation policy resources
Analyze PR diffs, suggest templates, update PR status, and create follow-up issues.
Summarize CI runs and update PR status based on GitHub Actions results.
Send deployment status and custom alerts via Slack.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP PR Workflow Server Analyze PR #42 and notify Slack on CI failure"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP PR Workflow Server
MCP server that connects AI assistants to GitHub PRs, CI, and Slack — with guardrails. Built in TypeScript for teams that want automated PR triage and deployment notifications without giving an LLM unbounded access to repos or chat.
At a glance
Problem | PR review, CI follow-up, and Slack alerts are repetitive; AI can help, but only if integrations are scoped and safe. |
Solution | An MCP server that exposes PR/CI/Slack actions as typed tools, with validation, allowlists, and secret redaction on every outbound path. |
Stack | TypeScript · MCP SDK · Octokit · Slack Web API · Zod |
Quality | 84 unit tests across 11 files · Vitest · typed tool dispatch |
Run locally |
|
Related MCP server: Agentic MCP Server
What this demonstrates
Integration design — Third-party APIs (GitHub, Slack) wrapped as a small, testable tool surface for LLM clients.
Security-by-default — Repo allowlists, channel allowlists, input validation, prompt-injection checks, and secret redaction before anything leaves the process.
Reliable server behavior — Unknown tools and validation failures return MCP errors (
isError: true) instead of crashing the server.Separation of concerns — Tool registration, request dispatch, security, and resources live in focused modules with dedicated tests.
MCP fluency — Tools, resources, and prompts implemented against the Model Context Protocol spec.
Architecture
flowchart LR
Client[AI Client / Claude Desktop] -->|stdio MCP| Server[MCP Server]
Server --> Dispatch[runtime.dispatchToolCall]
Dispatch --> PR[PR Tools]
Dispatch --> CI[CI Tools]
Dispatch --> Slack[Slack Tools]
Dispatch --> Issues[Issue Tools]
PR --> GitHub[GitHub API]
CI --> GitHub
Issues --> GitHub
Slack --> SlackAPI[Slack Web API]
Dispatch --> Security[validation · allowlist · sanitize]
Security --> DispatchRequest flow: Client calls a tool → input is validated → repo/channel allowlists are enforced → external API runs → response is sanitized → result returned (or structured error).
Security model
Designed for least privilege when an LLM can trigger side effects:
Control | Behavior |
Repository allowlist | GitHub tools only run against repos in |
Slack channel allowlist | Posts are limited to |
Input validation | Owner, repo, PR numbers, titles, and message lengths validated before use. |
Prompt injection defense | User-supplied PR text, issue bodies, Slack messages, and prompt args scanned for instruction-override patterns. |
Secret redaction | Tokens and sensitive patterns stripped from PR comments, Slack messages, and tool responses. |
No credential leakage | Env vars and channel IDs are never returned via tools or resources. |
Startup fails fast if required configuration is missing or invalid.
Tools & resources
Tool | Purpose |
| Classify PR diff (features, fixes, docs, etc.) |
| Recommend a PR template from analysis |
| Summarize GitHub Actions run status |
| Post a sanitized comment on a PR |
| Send a validated Slack message |
| Deployment success/failure alert |
| Open a GitHub issue from PR context |
Resource | Purpose |
| Team PR guidelines |
| CI failure escalation policy |
Quick start
git clone <repo-url>
cd MCP-PR-Workflow-Server
npm install
cp .env.example .env # fill in tokens and allowlists
npm test # 84 tests
npm run build
npm startEnvironment
Retrieve GITHUB_TOKEN from https://github.com/settings/personal-access-tokens. Repository permissions: Read access to actions, code, and metadata Read and Write access to deployments, issues, and pull requests
GITHUB_TOKEN=github...
SLACK_BOT_TOKEN=xoxb-...
SLACK_CHANNEL_ID=C12345678
ALLOWED_REPOS=your-org/your-repo,another-org/another-repoClaude Desktop
Open Claude Desktop and click your profile name or the menu to open Settings.
Go to the Developer tab and click Edit Config. This opens the claude_desktop_config.json file.
Add your MCP server details inside the mcpServers JSON object.
{
"mcpServers": {
"pr-workflow": {
"command": "node",
"args": ["/absolute/path/to/MCP-PR-Workflow-Server/dist/index.js"],
"env": {
"GITHUB_TOKEN": "your_github_token",
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_CHANNEL_ID": "C12345678",
"ALLOWED_REPOS": "your-org/your-repo"
}
}
}
}Project layout
src/
├── index.ts # MCP server + handler registration
├── runtime.ts # Startup checks + tool dispatch
├── tools/ # GitHub, CI, Slack, issue tools
├── resources/ # Team config resources
├── prompts/ # Workflow prompts
└── security/ # Validation, allowlists, sanitizationAvailable Tools
7 toolsanalyze_ci_resultsB
Analyzes GitHub Actions workflow runs for a PR and provides a formatted summary.
Inputs: repo (required), owner (required), pull_number (required).
analyze_file_changesA
Analyzes file changes in a GitHub PR to determine the type of changes made.
Inputs: repo (required), owner (required), pull_number (required).
create_follow_up_issueA
Creates a follow-up GitHub issue for tasks identified during the PR process.
Inputs: repo (required), owner (required), title (required), body.
notify_deployment_statusB
Sends a formatted deployment status message (success/failure) to Slack.
Inputs: status (required), project (required), details.
send_slack_notificationC
Sends a generic notification message to a Slack channel.
Inputs: message (required), channel_id.
suggest_templateA
Suggests an optimal PR template based on the analysis of file changes.
Inputs: analysis (required), project_context.
update_pr_statusC
Updates a pull request with CI results or other process updates.
Inputs: repo (required), owner (required), message (required), pull_number (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes: analyzing file changes, analyzing CI, updating PR status, and creating issues are distinct. However, send_slack_notification and notify_deployment_status both send Slack messages, which could cause confusion for an agent despite the latter being more specific.
All tool names follow a consistent verb_noun pattern using snake_case (e.g., analyze_file_changes, suggest_template, create_follow_up_issue). There are no mixed conventions or vague verbs, making the pattern predictable.
Seven tools is within the ideal 3-15 range and each tool serves a distinct step in the PR workflow. The count feels well-scoped without being excessive or too thin.
The tool set covers the main PR workflow: analyzing changes, suggesting templates, analyzing CI, updating status, sending notifications, and creating follow-ups. Minor gaps exist, such as no direct way to fetch PR details or comment on a PR, but the core lifecycle is reasonably covered.
Maintenance
Related MCP Connectors
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
Related MCP Servers
- -licenseCqualityNot gradedmaintenanceEnables comprehensive GitHub PR reviews through Cursor's AI by fetching PR diffs, running static analysis tools (ESLint, Prettier, TypeScript, Semgrep), executing tests, and generating detailed code review reports with inline comments.92,128 npm1-
- -licenseBqualityNot gradedmaintenanceEnables AI-driven orchestration of GitHub development workflows including automated issue analysis, code generation, code review, and PR creation through multiple specialized agents. Integrates with GitHub Actions to automate the complete development process from issue to pull request.7-
- FlicenseNot gradedqualityDmaintenanceEnables the analysis of GitHub Pull Requests to extract metadata, commits, and code changes for structured AI insights. It also supports the optional creation of Notion pages to store and organize the resulting analysis.-
- FlicenseNot gradedqualityDmaintenanceAutomates CI/CD pipeline control, PR review, Git operations, and monitoring/alerting with role-based access control.-