Summary
Add a production-ready MCP (Model Context Protocol) server integration that mirrors the CLI workflow exactly, enabling PR Agent to work with any MCP-compatible tool (Claude Code, Cursor, Windsurf, Cline, etc.).
Motivation
The MCP server allows PR Agent to be used with any LLM-powered tool that supports the Model Context Protocol, without requiring users to configure AI provider API keys. The calling tool's LLM performs the analysis, making PR Agent truly LLM-agnostic.
Implementation Details
New Files
src/mcp/server.ts - Main MCP server implementation
src/mcp/index.ts - Module exports
src/mcp/README.md - MCP-specific documentation
server.json - MCP Registry configuration
smithery.json - Smithery marketplace configuration
docs/MCP-SERVER.md - Comprehensive documentation
Features
- Two MCP Tools:
analyze - Mirrors pr-agent analyze CLI command exactly
dashboard - Starts web dashboard for analysis history
- Same Configuration - Uses
.pragent.config.json like CLI
- Full Feature Parity - Jira peer review, arch-docs, risk detection, complexity scoring
- Database Storage - Saves to
pr-agent.db for dashboard
- Publishing Ready - Configured for npm, MCP Registry, and Smithery
Publishing Configuration
- npm package:
@techdebtgpt/pr-agent
- MCP Registry name:
io.github.techdebtgpt/pr-agent
- Smithery: Ready for deployment
Testing
Tested with:
- Claude Code MCP integration
- PR analysis on external repositories
- Dashboard functionality
Checklist
Assignee
@ipanov-ritech
Related
This implements MCP server support as discussed in the project roadmap.
Summary
Add a production-ready MCP (Model Context Protocol) server integration that mirrors the CLI workflow exactly, enabling PR Agent to work with any MCP-compatible tool (Claude Code, Cursor, Windsurf, Cline, etc.).
Motivation
The MCP server allows PR Agent to be used with any LLM-powered tool that supports the Model Context Protocol, without requiring users to configure AI provider API keys. The calling tool's LLM performs the analysis, making PR Agent truly LLM-agnostic.
Implementation Details
New Files
src/mcp/server.ts- Main MCP server implementationsrc/mcp/index.ts- Module exportssrc/mcp/README.md- MCP-specific documentationserver.json- MCP Registry configurationsmithery.json- Smithery marketplace configurationdocs/MCP-SERVER.md- Comprehensive documentationFeatures
analyze- Mirrorspr-agent analyzeCLI command exactlydashboard- Starts web dashboard for analysis history.pragent.config.jsonlike CLIpr-agent.dbfor dashboardPublishing Configuration
@techdebtgpt/pr-agentio.github.techdebtgpt/pr-agentTesting
Tested with:
Checklist
Assignee
@ipanov-ritech
Related
This implements MCP server support as discussed in the project roadmap.