npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codepeelai/mcp-server

v1.0.2

Published

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

Readme

CodePeel MCP Server

npm version License: MIT MCP Compatible

A Model Context Protocol (MCP) server for AI-powered code review. Enables LLMs to review code diffs, generate fixes, and ask code questions — using the same engine that runs on 527+ GitHub PRs.

Features

  • Code Review: Review diffs for bugs, security issues, and best practice violations
  • Auto-Fix: Generate fixes for specific issues with code snippets and explanations
  • Ask CodePeel: Query code patterns, architecture decisions, and improvement suggestions
  • Check Credits: Monitor your review quota and usage (free — does not consume a review)
  • Reusable Prompts: Pre-built workflows for pre-commit review, security audit, and explain-and-fix

Quick Start

Installation (NPX - Recommended)

No installation required! Run directly with npx:

npx -y @codepeelai/mcp-server

Prerequisites

  1. CodePeel API Token: Create at codepeel.com → Settings → API Tokens
    • Token starts with cpk_ and does not expire until revoked
  2. Node.js 18+: Required for running the server

Configuration

Claude Desktop Configuration

Configuration file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Add the CodePeel MCP server:

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

Restart Claude Desktop after saving.

Claude Code Configuration

Create or edit .claude/settings.json in your project:

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

Pro tip: Use environment variables instead of hardcoding the token:

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

Then set the CODEPEEL_TOKEN environment variable in your shell before starting Claude Code.

VS Code / Cursor / Cline / Roo

Add an MCP server with:

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

Usage

Automated Workflow Prompts

Use built-in MCP prompts for complete review workflows:

review-staged-changes — Pre-commit review

Review my staged changes before I commit them.
1. Run `git diff --cached` to get the staged diff
2. Pass the diff to the `review_code` tool
3. Report all findings and suggest fixes for any issues

security-audit — Security-focused review

Perform a security-focused code review.
1. Get the current diff with `git diff`
2. Pass it to the `review_code` tool
3. Prioritize: injection vulnerabilities, hardcoded secrets, auth flaws, insecure data handling
4. For critical/high findings, use `fix_code` to generate concrete fixes

explain-and-fix — Full review cycle

Review code, explain each finding in detail, and generate fixes for all issues found.
1. Run `git diff` to get changes
2. Pass to `review_code`
3. For each finding: explain the issue, describe impact, use `fix_code`, apply the fix
4. Summarize all changes made

Manual Tool Usage

1. review_code

Review a diff for bugs, security issues, and best practice violations.

{
  "diff": "--- a/src/auth.ts\n+++ b/src/auth.ts\n@@ -10,7 +10,7 @@\n-  const token = req.headers.authorization;\n+  const token = req.headers.authorization?.split(' ')[1];",
  "repo": "my-app"
}

2. fix_code

Generate a fix for a specific code issue.

{
  "file": "src/auth.ts",
  "issue": "Token extraction from Authorization header is unsafe — crashes if header is missing",
  "problemCode": "const token = req.headers.authorization;",
  "line": 12,
  "severity": "high"
}

3. ask_codepeel

Ask a question about code patterns, architecture, or improvements.

{
  "question": "Is this JWT validation approach secure enough for production?",
  "diff": "--- a/src/middleware.ts\n+++ b/src/middleware.ts\n..."
}

4. check_credits

Check your account balance, plan tier, and usage.

{}

Development Installation

For development or local customization:

git clone https://github.com/hexivine/codepeel.git
cd codepeel/codepeel-mcp
npm install
npm run build

Development Commands

# Build TypeScript
npm run build

# Run the server in dev mode
npm run dev

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | CODEPEEL_TOKEN | Yes | Your API token from Settings (starts with cpk_) |

Create a .env file (optional, loaded automatically):

CODEPEEL_TOKEN=cpk_your_token_here

Troubleshooting

Common Issues

Server not loading (NPX):

  • Verify Node.js 18+ is installed: node --version
  • Test npx execution manually: npx -y @codepeelai/mcp-server
  • Check your internet connection (npx downloads the latest version)

"CODEPEEL_TOKEN not set":

  • Set the CODEPEEL_TOKEN environment variable in your MCP config (see Configuration above)

"Token expired" / "Invalid token":

  • You're using a Firebase ID token instead of an API token. Create a cpk_ token in Settings → API Tokens.

"No credits remaining":

Rate limit exceeded:

  • Wait the indicated time and retry. Free: 3/hour, Pro: 6/hour, Max: 12/hour.

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"].

Debug Mode

Enable debug logging:

DEBUG=* npx -y @codepeelai/mcp-server

Integration Requirements

Supported AI Clients

  • Claude Desktop: Full support with configuration
  • Claude Code: Project-level MCP integration with built-in prompts
  • VS Code / Cursor / Cline / Roo: Any MCP-compatible editor

Authentication

API tokens are created at codepeel.com → Settings → API Tokens. Tokens start with cpk_ and do not expire until revoked.

Architecture

  • TypeScript: Fully typed implementation with Zod validation
  • MCP SDK: Built on the official Model Context Protocol SDK
  • Modular Design: Each tool is implemented in its own module
  • MCP Prompts: Automated workflows available as slash commands

API Rate Limits

The server respects CodePeel's API rate limits:

  • Free: 3 reviews/hour
  • Pro: 6 reviews/hour
  • Max: 12 reviews/hour

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and add tests
  4. Run the build: npm run build
  5. Submit a pull request

License

MIT

Support