JSPM

@codepeelai/mcp-server

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28
  • Score
    100M100P100Q80453F
  • License MIT

CodePeel MCP Server — AI code review tools for Claude Code, Kiro, Cline, Roo, and other MCP-compatible agents

Package Exports

  • @codepeelai/mcp-server
  • @codepeelai/mcp-server/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@codepeelai/mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm version MIT License Node.js version MCP Compatible

CodePeel MCP Server

Finds the bugs. Opens the fix.

AI code review tools and prompts for Claude Code, Kiro, Cline, Roo, Cursor, and other MCP-compatible agents.
Same review engine that runs on 527+ GitHub PRs — 2,143 issues found in 29s average.


Why

When you're vibe coding with an AI agent, CodePeel acts as a second opinion — reviewing the generated code for bugs, security issues, and bad patterns before you commit.

The AI agent can even review its own output:

You: Build a login form with validation
Agent: [writes code, then calls review_code on its own output]
Agent: I found a potential XSS issue in my implementation. Let me fix that...
Agent: [calls fix_code, applies the fix]
Agent: Here's the login form — I caught and fixed a security issue during generation.

Tools

Tool Description
review_code Review a diff for bugs, security issues, and best practices
fix_code Generate a fix for a specific code issue
ask_codepeel Ask questions about code patterns, architecture, etc.
check_credits Check your account balance and usage (free — does not consume a review)

review_code

Parameter Type Required Description
diff string yes Unified diff. Must be ≥ 10 characters and ≤ 500 KB.
repo string no Repo name for context. Defaults to "local". Accepts "name" or "owner/name".

Consumes 1 review. 90s timeout.

fix_code

Parameter Type Required Description
file string yes File path (e.g. "src/auth.ts")
issue string yes Description of the problem
problemCode string no The problematic snippet
line number no Line number
severity enum no critical / high / medium / low. Default medium.

Consumes 1 review. 60s timeout.

ask_codepeel

Parameter Type Required Description
question string yes Your question about the code
diff string no Optional code context (a diff, file contents, or snippet)

Consumes 1 review. 60s timeout.


Prompts

Reusable workflows the agent can load to guide a review session. Prompts are free — only the tool calls they trigger consume reviews.

Prompt Description
review-staged-changes Pre-commit review: runs git diff --cachedreview_code → reports findings
security-audit Security-focused review with priority on injection, secrets, auth, and unsafe data handling
explain-and-fix Full review cycle: review → explain each finding → generate fixes → apply. Accepts optional language argument.

Setup

1. Get your API token

  1. Sign in at codepeel.com
  2. Go to Settings → API Tokens
  3. Click Create Token and copy the token (starts with cpk_)

API tokens don't expire — they work until you revoke them.

2. Configure your editor

Pick your editor and add the config block:

Claude Desktop

File: claude_desktop_config.json

{
  "mcpServers": {
    "codepeel": {
      "command": "npx",
      "args": ["-y", "@codepeelai/mcp-server"],
      "env": {
        "CODEPEEL_TOKEN": "cpk_your_token_here"
      }
    }
  }
}
Claude Code

File: .claude/settings.json

{
  "mcpServers": {
    "codepeel": {
      "command": "npx",
      "args": ["-y", "@codepeelai/mcp-server"],
      "env": {
        "CODEPEEL_TOKEN": "cpk_your_token_here"
      }
    }
  }
}
Kiro

File: .kiro/settings/mcp.json

{
  "mcpServers": {
    "codepeel": {
      "command": "npx",
      "args": ["-y", "@codepeelai/mcp-server"],
      "env": {
        "CODEPEEL_TOKEN": "cpk_your_token_here"
      }
    }
  }
}
Cline

In Cline settings, add an MCP server:

  • Command: npx
  • Args: -y @codepeelai/mcp-server
  • Env: CODEPEEL_TOKEN=cpk_your_token_here
Roo Code

In Roo Code settings (⚙️), add MCP server config:

{
  "mcpServers": {
    "codepeel": {
      "command": "npx",
      "args": ["-y", "@codepeelai/mcp-server"],
      "env": {
        "CODEPEEL_TOKEN": "cpk_your_token_here"
      }
    }
  }
}
Cursor

In Cursor settings → MCP, add:

{
  "codepeel": {
    "command": "npx",
    "args": ["-y", "@codepeelai/mcp-server"],
    "env": {
      "CODEPEEL_TOKEN": "cpk_your_token_here"
    }
  }
}

3. Use it

The AI agent will automatically have access to CodePeel's review tools and prompts. Ask it to:

  • "Review my recent changes for bugs"
  • "Check this diff for security issues"
  • "Fix the null pointer issue in auth.ts"
  • "How many reviews do I have left?"
  • Use the review-staged-changes prompt before committing

CLI

The package includes a CLI for interactive setup and standalone use:

npx -y @codepeelai/mcp-server init          # Interactive editor setup
npx -y @codepeelai/mcp-server init-config   # Generate .codepeel.yml from dashboard settings
npx -y @codepeelai/mcp-server credits       # Check your balance and plan
git diff | npx -y @codepeelai/mcp-server review  # Review a diff from stdin

When run with no arguments, starts the MCP server on stdio (used by AI editors).


Environment Variables

Variable Required Description
CODEPEEL_TOKEN Yes Your API token from Settings (starts with cpk_)
CODEPEEL_API_URL No API base URL (default: https://www.codepeel.com/api)
CODEPEEL_REVIEW_URL No Review endpoint URL (default: CODEPEEL_API_URL + /ide/review)

Staging

To use the MCP server against staging, set:

export CODEPEEL_API_URL=https://codepeel-staging.vercel.app/api
export CODEPEEL_TOKEN=cpk_your_staging_token

Or create a .env file in your project:

CODEPEEL_API_URL=https://codepeel-staging.vercel.app/api
CODEPEEL_REVIEW_URL=https://idereview-5ytww7s7ta-uc.a.run.app
CODEPEEL_TOKEN=cpk_your_staging_token

Troubleshooting

Error Fix
CODEPEEL_TOKEN not set Set the CODEPEEL_TOKEN environment variable in your MCP config (see Setup above).
"Token expired" You're using a Firebase ID token instead of an API token. Create a cpk_ token in Settings.
"Invalid token" Check that your token starts with cpk_ and hasn't been revoked.
"No credits remaining" Upgrade your plan at codepeel.com/#pricing or wait for credits to reset.
"Rate limit exceeded" Wait the indicated time and retry. Free: 3/hour, Pro: 6/hour, Max: 12/hour.
"Payment failed" Update your payment method at codepeel.com/app/billing.
"Server error (5xx)" CodePeel is temporarily unavailable. Try again in a moment.
Server starts but tools don't appear Restart your AI editor after adding the MCP config. Verify the command is "npx" and args are ["-y", "@codepeelai/mcp-server"].

Full reference with response examples, edge cases, and workflow guides: codepeel.com/docs/mcp

License

MIT