CodeRabbit MCP Server for Mastra AI 9 tools — connect in under 2 minutes
Mastra AI is a TypeScript-native agent framework built for modern web stacks. Connect CodeRabbit through Vinkius and Mastra agents discover all tools automatically. type-safe, streaming-ready, and deployable anywhere Node.js runs.
ASK AI ABOUT THIS MCP SERVER
Vinkius supports streamable HTTP and SSE.
import { Agent } from "@mastra/core/agent";
import { createMCPClient } from "@mastra/mcp";
import { openai } from "@ai-sdk/openai";
async function main() {
// Your Vinkius token. get it at cloud.vinkius.com
const mcpClient = await createMCPClient({
servers: {
"coderabbit": {
url: "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
},
},
});
const tools = await mcpClient.getTools();
const agent = new Agent({
name: "CodeRabbit Agent",
instructions:
"You help users interact with CodeRabbit " +
"using 9 tools.",
model: openai("gpt-4o"),
tools,
});
const result = await agent.generate(
"What can I do with CodeRabbit?"
);
console.log(result.text);
}
main();
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About CodeRabbit MCP Server
Connect your CodeRabbit organization to any AI agent and take full control of your AI-powered code review operations through natural conversation.
Mastra's agent abstraction provides a clean separation between LLM logic and CodeRabbit tool infrastructure. Connect 9 tools through Vinkius and use Mastra's built-in workflow engine to chain tool calls with conditional logic, retries, and parallel execution. deployable to any Node.js host in one command.
What you can do
- User Management — List all organization members, filter by seat assignment or role, and inspect individual profiles
- Seat Control — Bulk assign or unassign CodeRabbit seats to enable or disable AI code reviews for team members
- Role Administration — Promote members to admin or demote admins to member role in bulk operations
- PR Review Metrics — Retrieve complexity scores, review times, and comment breakdowns for merged pull requests across any date range
- Compliance Audit Logs — Access tamper-resistant records of administrative actions for SIEM integration and compliance reporting
- Configuration — View and update seat assignment modes (automatic vs. manual)
The CodeRabbit MCP Server exposes 9 tools through the Vinkius. Connect it to Mastra AI in under two minutes — no API keys to rotate, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
How to Connect CodeRabbit to Mastra AI via MCP
Follow these steps to integrate the CodeRabbit MCP Server with Mastra AI.
Install dependencies
Run npm install @mastra/core @mastra/mcp @ai-sdk/openai
Replace the token
Replace [YOUR_TOKEN_HERE] with your Vinkius token
Run the agent
Save to agent.ts and run with npx tsx agent.ts
Explore tools
Mastra discovers 9 tools from CodeRabbit via MCP
Why Use Mastra AI with the CodeRabbit MCP Server
Mastra AI provides unique advantages when paired with CodeRabbit through the Model Context Protocol.
Mastra's agent abstraction provides a clean separation between LLM logic and tool infrastructure. add CodeRabbit without touching business code
Built-in workflow engine chains MCP tool calls with conditional logic, retries, and parallel execution for complex automation
TypeScript-native: full type inference for every CodeRabbit tool response with IDE autocomplete and compile-time checks
One-command deployment to any Node.js host. Vercel, Railway, Fly.io, or your own infrastructure
CodeRabbit + Mastra AI Use Cases
Practical scenarios where Mastra AI combined with the CodeRabbit MCP Server delivers measurable value.
Automated workflows: build multi-step agents that query CodeRabbit, process results, and trigger downstream actions in a typed pipeline
SaaS integrations: embed CodeRabbit as a first-class tool in your product's AI features with Mastra's clean agent API
Background jobs: schedule Mastra agents to query CodeRabbit on a cron and store results in your database automatically
Multi-agent systems: create specialist agents that collaborate using CodeRabbit tools alongside other MCP servers
CodeRabbit MCP Tools for Mastra AI (9)
These 9 tools become available when you connect CodeRabbit to Mastra AI via MCP:
assign_seats
Up to 500 user IDs per request. Assign CodeRabbit seats to users
demote_users
Demote users from admin to member role
get_audit_logs
Ideal for compliance reporting. Retrieve organization audit logs
get_metrics
Useful for engineering productivity analysis. Retrieve PR review metrics for a date range
get_seat_mode
Get the current seat assignment mode
list_users
Optionally filter by seat assignment status or role. List all users in the CodeRabbit organization
promote_users
Promote users to admin role
unassign_seats
Does not delete user accounts. Remove CodeRabbit seats from users
update_seat_mode
Requires Enterprise plan. Update the seat assignment mode
Example Prompts for CodeRabbit in Mastra AI
Ready-to-use prompts you can give your Mastra AI agent to start working with CodeRabbit immediately.
"Show me all team members who don't have a CodeRabbit seat assigned."
"What were our code review metrics for March 2026?"
"Show me the audit trail of admin actions from last week."
Troubleshooting CodeRabbit MCP Server with Mastra AI
Common issues when connecting CodeRabbit to Mastra AI through the Vinkius, and how to resolve them.
createMCPClient not exported
npm install @mastra/mcpCodeRabbit + Mastra AI FAQ
Common questions about integrating CodeRabbit MCP Server with Mastra AI.
How does Mastra AI connect to MCP servers?
MCPClient with the server URL and pass it to your agent. Mastra discovers all tools and makes them available with full TypeScript types.Can Mastra agents use tools from multiple servers?
Does Mastra support workflow orchestration?
Connect CodeRabbit with your favorite client
Step-by-step setup guides for every MCP-compatible client and framework:
Anthropic's native desktop app for Claude with built-in MCP support.
AI-first code editor with integrated LLM-powered coding assistance.
GitHub Copilot in VS Code with Agent mode and MCP support.
Purpose-built IDE for agentic AI coding workflows.
Autonomous AI coding agent that runs inside VS Code.
Anthropic's agentic CLI for terminal-first development.
Python SDK for building production-grade OpenAI agent workflows.
Google's framework for building production AI agents.
Type-safe agent development for Python with first-class MCP support.
TypeScript toolkit for building AI-powered web applications.
TypeScript-native agent framework for modern web stacks.
Python framework for orchestrating collaborative AI agent crews.
Leading Python framework for composable LLM applications.
Data-aware AI agent framework for structured and unstructured sources.
Microsoft's framework for multi-agent collaborative conversations.
Connect CodeRabbit to Mastra AI
Get your token, paste the configuration, and start using 9 tools in under 2 minutes. No API key management needed.
