C

Codacy Plugin

Streamline your workflow with this server, codacy, enabling, access. Includes structured workflows, validation checks, and reusable patterns for devtools.

MCPClipticsdevtoolsv1.0.0MIT
0 views0 copies

Codacy Plugin

Connect Claude Code to the Codacy code quality platform for accessing repository analysis, coverage reports, security findings, and quality metrics through MCP.

When to Use This MCP Server

Connect this server when you need to:

  • Review code quality metrics, coverage percentages, and complexity scores for your repositories without leaving Claude Code
  • Investigate Codacy security findings, code pattern violations, and duplication issues directly alongside the code you are fixing
  • Track quality trends across pull requests and commits to ensure code improvements meet quality gate thresholds

Consider alternatives when:

  • You use SonarQube, CodeClimate, or another code quality platform that has its own integration method
  • You only need to run a one-time code linting check, where local tools like ESLint or Prettier are faster without API access

Quick Start

Configuration

name: codacy-plugin type: mcp category: devtools

Example Connection

claude mcp:connect codacy-plugin

Available Tools

list-repositories:   List all repositories connected to your Codacy organization
get-quality:         Retrieve quality metrics including grade, complexity, and duplication
get-coverage:        Access code coverage data with file-level and line-level detail
get-issues:          List code issues categorized by severity, category, and pattern
get-security:        Retrieve security analysis findings and vulnerability reports

Core Concepts

Codacy MCP Server Overview

AspectDetails
Transportstdio-based process via npx running @codacy/codacy-mcp package
AuthenticationCodacy account API token for accessing organization and repository data
Analysis TypesCode quality, security, duplication, complexity, and coverage metrics
Issue CategoriesError-prone, security, performance, compatibility, and style patterns
IntegrationSupports GitHub, GitLab, and Bitbucket repository connections

Codacy Analysis Architecture

Claude Code IDE
    |
    v
[MCP Client] --stdio--> [Codacy MCP Server]
                              |
                              v
                     [Codacy REST API]
                              |
                    +---------+---------+
                    |         |         |
                    v         v         v
              [Quality   [Security [Coverage
              Analysis]  Scanner]   Reports]
                    \         |         /
                     [Repository Dashboard]
                      Issues | Metrics | Trends

Configuration

ParameterTypeDefaultDescription
CODACY_ACCOUNT_TOKENstringrequiredCodacy account API token from your Codacy account settings
organizationstringauto-detectedCodacy organization name to scope repository access
default_repositorystringnoneDefault repository name to query when not explicitly specified
severity_filterstringallMinimum issue severity to include: info, warning, error, or all
include_patternsbooleantrueInclude pattern rule details with issue listings for guidance

Best Practices

  1. Review Quality Before Pull Requests - Check get-quality metrics before opening a pull request to ensure your changes maintain or improve the repository's quality grade. Addressing issues before review saves time for both you and your reviewers.

  2. Prioritize Security Findings - Use get-security to review security-specific findings first, as these represent the highest-risk issues. Address critical and high severity vulnerabilities before tackling code style or complexity improvements.

  3. Track Coverage Trends - Monitor get-coverage results across commits to ensure test coverage does not decline. Set a coverage threshold that new code must meet and verify coverage before merging changes.

  4. Filter Issues by Severity for Focus - Configure severity_filter to show only warning-level and above issues during active development. This reduces noise from minor style suggestions while keeping important patterns visible.

  5. Use Pattern Details for Learning - Enable include_patterns to receive detailed explanations of why each code pattern is flagged. Understanding the rationale behind quality rules helps you write better code and avoid the same patterns in future work.

Common Issues

  1. Account Token Returns 403 Forbidden - Codacy account tokens are scoped to specific organizations. Verify the token belongs to the organization that owns the repository you are trying to access, and regenerate it if permissions have changed.

  2. Repository Not Found - The repository may not be added to Codacy yet, or it may use a different name than expected. Use list-repositories to see all available repositories and verify the exact name used by Codacy.

  3. Coverage Data Unavailable - Coverage reports require your CI pipeline to upload coverage data to Codacy after test runs. If get-coverage returns empty results, verify that your CI configuration includes the Codacy coverage reporter step.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates