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

codeprot-mcp-server

v1.1.4

Published

MCP Server for Code Protection with Agent Tools and Third-party API Integration

Downloads

404

Readme

CodeProt MCP Server

MCP Server provides secure API interfaces for IDEs that support the MCP protocol (such as Cursor), allowing you to view and resolve code issues directly in your IDE.

Quick Start Guide

1. Entry Setup

  • Go to the user settings page: Click the Settings button near your user avatar in the lower right corner
  • Find the 'MCP Server' option in the left navigation bar and click on it
  • First-time use requires creating an MCP application to obtain access credentials
  • After creating the application, you will receive an AppID and Secret for API authentication

2. Create MCP Server Application in CodeProt

  • Create Application: Click the 'Create New Application' button
  • Application Information: Fill in the application name and description (we recommend using meaningful names such as 'Cursor IDE Integration')
  • Obtain Credentials: After successful creation, the system will display AppID and Secret
  • Save Credentials: Please immediately copy and securely save these credentials. The Secret will only be displayed once.
  • Application Status: You can enable or disable the application at any time
  • Permission Management: You can set the access permission scope for the application

3. Configure in IDEs that Support MCP Server

Cursor IDE Configuration

  1. Open Cursor settings and select Tools & Integrations
  2. Find the MCP Server configuration section
  3. Configure the following parameters:
{
  "mcpServers": {
    "codeprot-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "codeprot-mcp-server"
      ],
      "env": {
        "CODE_PROT_APP_ID": "YOUR_APP_ID",
        "CODE_PROT_APP_SECRET": "YOUR_APP_SECRET"
      }
    }
  }
}

Note: Replace YOUR_APP_ID and YOUR_APP_SECRET with your actual application credentials.

Other IDEs

Configure according to the specific IDE's MCP support documentation.


Available Tools (exported)

The current server exports four tools (see src/tools/agentTools.ts):

  1. review_diff_changes
  • Purpose: IDE-integrated pre-commit review for the current Git branch. Collects diffs and runs Code-Prot analysis to detect issues before committing.
  • Auto params: workspace_path is auto-injected.
  • Inputs (all optional unless noted):
    • workspace_path: string (path)
    • projects_path: string[]
    • project_path: string (path)
    • file_paths: string[] (limit analysis to these files)
    • exclude_globs: string[] (e.g. ["/.test.", "/tests/", "/.spec."])
    • direct_run_mode: 'plan' | 'run' (internal; use 'run' with project_path for immediate analysis)
  • Typical prompts in Cursor:
    • "Review current branch diffs"
    • "Review only these files: src/a.ts, src/b.ts"
    • "Review this project now (force run)"
  • Behavior: When called without parameters, it returns a planning flow to first discover original project paths and then run analysis. When called with { project_path, direct_run_mode: 'run' } it executes immediately.
  1. get_open_pr_issues
  • Purpose: Find open PR review issues for a repository or specific files.
  • Inputs:
    • repo_name?: string (required for direct fetch; if omitted, returns instructions to obtain it)
    • branch_name?: string
    • file_paths?: string | string[]
  • Typical prompts in Cursor:
    • "Find open PR review issues for repo my-project"
    • "Find open issues for these files: src/a.ts, src/b.ts"
    • "List open issues on branch feature/login for repo my-project"
  • Notes: If repo_name is omitted, the tool returns a plan instructing how to detect repo_name (via git remote.origin.url or fallback to repo root directory name).
  1. resolve_open_pr_issues
  • Purpose: Resolve/mark/update issue status in batch.
  • Inputs:
    • issue_ids: string[] (required)
    • status: 'pending' | 'accepted' | 'completed' | 'rejected' (required)
  • Typical prompts in Cursor:
    • "Mark these issues as accepted: , "
    • "Set status completed for issue "
  1. health_check
  • Purpose: Ping Code-Prot API health/connectivity and verify credentials.
  • Inputs: none
  • Typical prompt: "Health Check"

Credentials required for API-backed tools: set environment variables CODE_PROT_APP_ID and CODE_PROT_APP_SECRET.


Using Tools in Cursor Chat

  • Health Check

    • Prompt: "Health Check"
    • What it does: Verifies service health and connectivity.
  • Get Current Code File Issue List (via get_open_pr_issues)

    • Open a file, then prompt examples:
      • "Find open PR review issues for these files: <relative/path/to/file>"
      • "Find open PR review issues for repo <REPO_NAME>"
  • Update Issue Status (via resolve_open_pr_issues)

    • Prompt: "Update Issue Status: mark , as accepted"
  • Pre-commit Diff Review (via review_diff_changes)

    • Prompt: "Review current branch diffs"
    • Optional: "Review only these files: src/tools/agentTools.ts, src/utils/logger.ts"
    • Optional: "Exclude test files when reviewing"

Example Interaction

In Cursor AI Chat:

User: "Review current branch diffs" System: "Generated instructions to discover original project paths and run analysis. Then executes review and returns issues and guidance."

User: "Find open PR review issues for repo codeprot-mcp-server" System: "✅ Successfully retrieved 15 issues from repository codeprot-mcp-server"


Troubleshooting

Connection Issues

  • Verify that your AppID and Secret are correct
  • Check that the MCP server is properly configured in your IDE
  • Run Health Check to verify service connectivity

Issue Detection Problems

  • Ensure you're in a Git repository
  • Verify that the repository name matches your CodeProt project
  • Check that you have proper permissions for the application

Status Update Failures

  • Confirm that issue IDs are valid
  • Verify that you have write permissions
  • Check the application status is active

Support

For issues, questions, or feature requests, please contact our support team at [email protected] or visit our documentation portal.

License

MIT License