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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@teolin/code-review-agent

v3.0.1

Published

MCP server for automated code reviews with GitHub PR and Jira integration

Readme

Code Review MCP Server

Automated code review server that integrates GitHub PRs with Jira tickets for comprehensive code review automation.

Features

  • 🔄 GitHub PR Integration: Fetches PR diffs and metadata
  • 🎫 Jira Integration: Retrieves requirements and acceptance criteria via Atlassian CLI
  • 🧪 Test Execution: Pulls branch locally and runs tests
  • 🔍 Lint Checking: Runs linting to ensure code quality
  • 💬 AI-Powered Analysis: Generates review comments with file:line references
  • 📝 Formatted Output: Clean markdown report with all findings

Prerequisites

  1. GitHub CLI: gh command must be available and authenticated
  2. Atlassian CLI: acli command must be available and authenticated
  3. Node.js: Version >=25.2.1 required

Installation

Option 1: Install from npm (Recommended)

npm install -g code-review-mcp-server

Option 2: Install locally

npm install code-review-mcp-server

Option 3: Use with npx (no installation)

npx -y code-review-mcp-server

Setup

1. Install Dependencies

npm install

2. Authenticate Required Services

# GitHub CLI
gh auth login

# Atlassian CLI
acli auth login --url https://your-domain.atlassian.net

Usage

In Claude Code

# Review a specific PR (from any repository)
code_review pr_name: "123" working_directory: "/path/to/your/repo"

# Or use the tool directly:
/mcp code_review {"pr_name": "123", "working_directory": "/path/to/your/repo"}

Example Output

# Code Review: 123

## 🎫 Jira Ticket: PAB-2197
**Summary:** Implement user authentication with JWT
**Status:** In Progress
**Description:** Add JWT-based authentication system
**Acceptance Criteria:** Users should be able to login and receive tokens

## 🧪 Test Results
**Status:** ✅ PASSED

## 🔍 Lint Results
**Status:** ✅ PASSED

## 💬 Review Comments

• **src/auth.js:45** → Remove console.log before merging
• **src/types.js:12** → Avoid "any" type, be more specific
• **src/handler.js:89** → Consider error handling for async operation

How It Works

  1. PR Analysis: Extracts PR diff and metadata from GitHub
  2. Jira Integration: Finds associated Jira ticket (from branch name/PR title/body)
  3. Requirements Fetch: Gets ticket details via Atlassian CLI
  4. Branch Testing: Checks out PR branch and runs npm run test
  5. Code Quality: Runs npm run lint for style compliance
  6. Smart Analysis: Scans code changes for common issues:
    • Console.log statements
    • TODO/FIXME comments
    • TypeScript any usage
    • Security concerns
    • Missing error handling
  7. Report Generation: Formats findings into actionable review

Supported Patterns

  • Branch naming: feat/PAB-123-description, fix/ABC-456
  • PR titles: [PAB-123] Add feature
  • PR descriptions: References to Jira tickets

Configuration

The server automatically detects:

  • GitHub repository context
  • Node.js project structure
  • Available npm scripts (test, lint)
  • Jira ticket references

Testing

To test the MCP server:

npm test

Integration with Claude Code

Claude Code supports three scopes for MCP server configuration:

  • User scope (~/.claude.json): Available across all projects
  • Local scope (~/.claude.json): Project-specific, private to you (default)
  • Project scope (.mcp.json in project root): Team-shared, committed to git

Quick Setup with CLI (Recommended)

# User scope (available in all projects)
claude mcp add codereview --scope user

# Project scope (shared with team via git)
claude mcp add codereview --scope project

Manual Configuration

Using npx (Recommended - no installation needed)

Add to .mcp.json (project scope) or ~/.claude.json (user scope):

{
  "mcpServers": {
    "codereview": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "code-review-mcp-server"]
    }
  }
}

Using global installation

{
  "mcpServers": {
    "codereview": {
      "type": "stdio",
      "command": "codereview-mcp"
    }
  }
}

Using local installation

{
  "mcpServers": {
    "codereview": {
      "type": "stdio",
      "command": "node",
      "args": [
        "./node_modules/code-review-mcp-server/src/index.js"
      ]
    }
  }
}

Troubleshooting

  • GitHub auth: Run gh auth status
  • Atlassian auth: Run acli auth list
  • MCP connection: Check Claude Code logs with /logs
  • Permissions: Ensure server has access to repositories

Publishing

Using GitHub Actions (Recommended)

This package uses GitHub Actions for automated publishing. To publish a new version:

  1. Go to GitHub Actions → "Publish @teolin/code-review-agent" → Run workflow
  2. The workflow will automatically:
    • Install dependencies
    • Run the prepublishOnly script to make the bin executable
    • Publish to npm with public access

Manual Publishing

Prerequisites

  1. You need an npm account: https://www.npmjs.com/signup
  2. Login to npm:
    npm login

Publishing Steps

  1. Test the package locally (optional but recommended):

    # Test that it runs
    node src/index.js --help
    
    # Or test with a PR number (requires gh and acli to be authenticated)
    node src/index.js
  2. Publish to npm:

    npm publish

    This will:

    • Run the prepublishOnly script to make the bin executable
    • Only include files specified in the files field
    • Publish to npm with public access (configured in publishConfig)
  3. Verify the package:

    # Test with npx (no installation)
    npx -y @teolin/code-review-agent
    
    # Or install globally and test
    npm install -g @teolin/code-review-agent
    codereview-mcp

Updating the Package

  1. Update the version in package.json:

    npm version patch  # for bug fixes (2.0.2 -> 2.0.3)
    npm version minor  # for new features (2.0.2 -> 2.1.0)
    npm version major  # for breaking changes (2.0.2 -> 3.0.0)
  2. Publish the new version:

    npm publish

Checking Published Package

View your package on npm:

  • https://www.npmjs.com/package/@teolin/code-review-agent

Check what files will be included before publishing:

npm pack --dry-run

Troubleshooting

"You do not have permission to publish"

  • Make sure you're logged in: npm whoami
  • For scoped packages (@teolin/...), ensure you have access to the @teolin organization or use your own scope

"Package name already exists"

  • The package name might be taken. Check: https://www.npmjs.com/package/@teolin/code-review-agent
  • If needed, change the name in package.json

Files missing after installation

  • Check the files field in package.json
  • Use npm pack --dry-run to preview what will be included

Requirements

  • Node.js >=25.2.1
  • GitHub CLI (gh) authenticated
  • Atlassian CLI (acli) authenticated
  • Published on npm: code-review-mcp-server

Extending

The server can be extended to support:

  • Different CI/CD systems
  • Additional code quality tools
  • Custom review rules
  • Multiple Jira instances
  • Slack/Teams notifications