AI code review inside Claude Code
Claude Code writes fast — who reviews what it writes? Connect the CodePeel MCP server and your agent can review any change for critical bugs, security issues, and design flaws before it commits.
Updated October 2026 · Written by the CodePeel team · Setup takes minutes; the full MCP details live in the docs.
A reviewer your agent can call mid-task
The MCP server exposes CodePeel’s review engine as tools your agent can use directly — no pasting diffs into a chat window. Three tools cover the loop:
review_code
Send any diff and get findings for critical bugs, security vulnerabilities, and design flaws — with severity and the affected line.
fix_code
Where a finding has a fix, the agent can fetch the suggested change and apply it in your working tree, then you review the edit as usual.
ask_codepeel
Ask why a finding matters or how a change could fail. The agent answers from the review context instead of guessing. A fourth tool, check_credits, reports your plan balance without spending a review.
Setup: four steps
- Create an MCP token in CodePeel — Settings → MCP Tokens (the server runs via
npx -y @codepeelai/codepeel). - Add the server to your Claude Code MCP configuration with
CODEPEEL_TOKENset, or connect through OAuth on first run. - Ask Claude Code to review a change — it calls the CodePeel review tool with the diff.
- Read findings with severity and suggested fixes, then let the agent apply what you approve.
Full configuration, token handling, and troubleshooting live in the MCP setup guide.
What the review catches in agent-written code
The same engine as the GitHub pass, pointed at the diff before it is committed:

Failure paths in generated handlers
Unhandled rejections, missing null checks, retry logic that doubles requests — what generated handlers skip when the prompt only describes the success case.
Injection and secret handling
String-interpolated queries, credentials carried in the prompt context, tokens logged on error. The OWASP-focused pass runs on agent diffs the same as any other.
Refactors that changed behavior
Multi-file agent refactors are reviewed as one diff, so a rename that altered a query filter or dropped a validation is caught — not discovered three commits later.
Honest limits
Stated plainly, so you can plan around it:
It reviews the diff, not your architecture
The agent sends the change; the review reasons about the change and its context. A repo-wide redesign decision is still yours to make.
Findings can be wrong
A model-driven pass can flag code that is actually fine, or miss a subtlety of your framework. Verify findings against your code and tests before acting.
It does not replace your tests
Review and tests answer different questions. The reviewer finds the unhandled failure path; the test suite proves the behavior you care about.
Frequently asked questions
Do I need my own provider API key?
No. CodePeel owns the model integration end to end — you authenticate to CodePeel with a token or OAuth, and reviews draw from your plan allowance.
Which clients does the MCP server work with?
Any MCP-capable client: Claude Code, Cursor, Windsurf, Cline, Roo and others. It runs over stdio via npx and exposes ten tools: four review tools (review_code, fix_code, ask_codepeel, check_credits) and six read-only review-history tools — search saved reviews, findings, and analytics.
Do agent reviews count against my allowance?
Yes — GitHub, VS Code and MCP reviews share one account and one allowance, so there is no separate meter to track.
More comparisons and guides
- Using the CodePeel MCP server with Claude Code — The full setup walkthrough, from token to first review.
- Reviewing AI-generated code: the checklist — What to verify before merging agent-written changes.
- Best AI code review tools (2026) — All eight tools in one pricing table, weaknesses included.
Let the agent write. Let CodePeel review.
Free, on your own repos — one account covers the MCP server, the editor, and every pull request.
