coderabbitai-mcp
Version:
MCP server for interacting with CodeRabbit AI reviews on GitHub pull requests. Enables LLMs to analyze, implement, and resolve CodeRabbit suggestions programmatically.
32 lines • 1.1 kB
JavaScript
import { CodeRabbitMCPServer } from "./server.js";
/**
* Main entry point for the CodeRabbit MCP Server
*/
async function main() {
// Ensure GITHUB_PAT is set
if (!process.env.GITHUB_PAT) {
console.error("❌ Error: GITHUB_PAT environment variable is required");
console.error(" Please set your GitHub Personal Access Token as an environment variable");
console.error(" Example: export GITHUB_PAT=ghp_your_token_here");
process.exit(1);
}
const server = new CodeRabbitMCPServer();
await server.run();
}
// Handle unhandled promise rejections
process.on('unhandledRejection', (reason, promise) => {
console.error('Unhandled Rejection at:', promise, 'reason:', reason);
process.exit(1);
});
// Handle uncaught exceptions
process.on('uncaughtException', (error) => {
console.error('Uncaught Exception:', error);
process.exit(1);
});
// Start the server
main().catch((error) => {
console.error('Failed to start CodeRabbit MCP server:', error);
process.exit(1);
});
//# sourceMappingURL=index.js.map