{"slug": "running-automated-code-reviews-inside-claude-code-and-cursor-via-stdio-mcp", "title": "Running Automated Code Reviews Inside Claude Code and Cursor via Stdio MCP", "summary": "CodePeel released a local Model Context Protocol server, @codepeelai/codepeel, that plugs automated code review into Claude Code, Cursor, Cline and Roo over stdio via npx, opening no network ports. The server exposes four tools — review_code, fix_code, ask_codepeel and check_credits — plus credit-free queries of past PR reviews, and supports either a cpk_ API token or an interactive OAuth 2.0 PKCE flow bound to 127.0.0.1. The MCP server source is open on GitHub, and the company offers 30 free reviews per month.", "body_md": "Waiting for a GitHub Actions runner or PR webhook after you push slows down your feedback loop. When you work alone, catching a security bug or regression before `git commit` saves you a round-trip.\n\nYou can wire [CodePeel](https://www.codepeel.com) directly into Claude Code, Cursor, Cline, or Roo using its local [Model Context Protocol](https://modelcontextprotocol.io) server (`@codepeelai/codepeel`). The server runs over standard I/O (` stdio`) as a child process via `npx`, so it opens zero network ports on your machine.\n\nYou need Node.js 18+ and a `cpk_` API token from your [CodePeel MCP settings](https://www.codepeel.com/app/settings?tab=api-tokens) (or you can use browser PKCE OAuth, covered below).\n\nOn macOS or Linux:\n\n```\nclaude mcp add codepeel --env CODEPEEL_TOKEN=cpk_your_token_here -- npx -y @codepeelai/codepeel\n```\n\nOn Windows PowerShell:\n\n```\nclaude mcp add codepeel --env CODEPEEL_TOKEN=cpk_your_token_here \"--\" npx -y @codepeelai/codepeel\n```\n\nThat writes a standard `mcpServers` block you can also drop into Cursor or Cline:\n\n```\n{\n  \"mcpServers\": {\n    \"codepeel\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codepeelai/codepeel\"],\n      \"env\": {\n        \"CODEPEEL_TOKEN\": \"cpk_your_token_here\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Code and run `/mcp` to verify the connection.\n\nIf you run automated scripts or CI checks, pass `CODEPEEL_TOKEN` in the `env` block. Invalid or expired tokens fail fast with an explicit error message.\n\nIf you omit `CODEPEEL_TOKEN`, the server runs an interactive OAuth 2.0 PKCE flow on the first tool call:\n\n`S256` challenge.`127.0.0.1:<PORT>` and opens your browser.\nBinding to `127.0.0.1` avoids opening external firewall ports or setting up reverse proxies.\n\nOnce connected, the agent gets four live review tools:\n\n| Tool | Required Input | What It Does | \n|---|---|---|\n| `review_code` | `diff` | Scans a unified diff for bugs, OWASP flaws, and regressions | \n| `fix_code` | `file` ,`issue` | Generates a concrete patch for a flagged issue | \n| `ask_codepeel` | `question` | Answers architecture questions using diff context | \n| `check_credits` | *(none)* | Checks remaining monthly allowance without spending credits | \n\nIn practice, your agent stages a change, runs `git diff --cached`, sends the diff to `review_code`, and reads the structured findings. You can also query past PR reviews across repos without spending credits using `search_reviews`, `get_review`, `search_findings`, and `get_review_analytics`.\n\nThe MCP server source is open at [codepeel/mcp-server](https://github.com/codepeel/mcp-server). You can read the full setup guide on the [CodePeel blog](https://www.codepeel.com/blog/mcp-server-claude-code) or test it on private repos with 30 free reviews/month at [codepeel.com](https://www.codepeel.com).", "url": "https://wpnews.pro/news/running-automated-code-reviews-inside-claude-code-and-cursor-via-stdio-mcp", "canonical_source": "https://dev.to/codepeel_ai_f72084daf2b2b/running-automated-code-reviews-inside-claude-code-and-cursor-via-stdio-mcp-27ff", "published_at": "2026-11-25 15:59:55+00:00", "updated_at": "2026-11-25 16:13:59.469771+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools", "ai-tools"], "entities": ["CodePeel", "Claude Code", "Cursor", "Cline", "Roo", "Model Context Protocol", "GitHub"], "also_reported_by": [], "takeaway": "Adding CodePeel's stdio MCP server via `claude mcp add codepeel --env CODEPEEL_TOKEN=... -- npx -y @codepeelai/codepeel` gives coding agents review_code, fix_code, ask_codepeel and check_credits tools that run locally without opening network ports.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/running-automated-code-reviews-inside-claude-code-and-cursor-via-stdio-mcp", "markdown": "https://wpnews.pro/news/running-automated-code-reviews-inside-claude-code-and-cursor-via-stdio-mcp.md", "text": "https://wpnews.pro/news/running-automated-code-reviews-inside-claude-code-and-cursor-via-stdio-mcp.txt", "jsonld": "https://wpnews.pro/news/running-automated-code-reviews-inside-claude-code-and-cursor-via-stdio-mcp.jsonld"}}