> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Codacy in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/codacy
Last updated: 2026-11-24

Share Codacy with your team in Claude, ChatGPT and Cursor through Metorial: account API token sign-in, 23 tools (18 read-only).

---

To give your team Codacy in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Codacy integration in a Metorial portal, and each person connects with an account API token. Review repository, commit, pull request, and file analysis. The integration has 23 tools, 18 read-only, 1 write and 4 destructive, plus 3 triggers.

**What you will learn**

- How an admin shares Codacy in a portal and how each person connects
- What Codacy asks for when you connect, and where to find it
- How to keep the 18 read-only tools and reject the other 5

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account API token from Codacy for each person, or one for a shared connection
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/cli), signed in to your portal

## Sign-in method

| Method | Type | What a person provides |
| --- | --- | --- |
| **Account API Token** | API token | `apiToken` |

### Account API Token

To connect, a person enters:

- `apiToken`: Codacy Account API Token. Generate one from your Codacy account under Account > Access management > Create API token.

### Setup settings

Setup also asks for:

- `baseUrl` (optional): Codacy API base URL. Use the default for Codacy Cloud, or provide your self-hosted instance URL (e.g. https://codacy.example.com/api/v3).
- `provider` (optional): Git provider identifier: gh (GitHub Cloud), ghe (GitHub Enterprise), gl (GitLab Cloud), gle (GitLab Enterprise), bb (Bitbucket Cloud), bbe (Bitbucket Server). One of "gh", "ghe", "gl", "gle", "bb", "bbe".
- `organization`: Organization name on the Git provider (e.g. your GitHub org name).

## Admin: share Codacy in a portal

### In the dashboard

1. **Open Shared Resources**

   Open **Workforce**, choose the portal, and select **Shared Resources** under **Access**.

2. **Share a new integration**

   Select **Share a Resource**, then **New Integration**, and choose Codacy. For how members connect, choose **Each person connects** so everyone enters their own account API token, or **Shared connection** to enter one account API token for everyone.

3. **Limit the tools**

   Under **Tool Filters**, set the write and destructive groups to **Reject** if agents should only read from Codacy.

4. **Choose who gets it**

   Add the access groups that should see Codacy. When a person asks for access from the portal, the request appears under **Access Requests**.

### With the CLI

The CLI cannot create the per-user Codacy integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search codacy
```

## Employee: connect Codacy

### In the portal

1. **Open Codacy in the catalog**

   Sign in to your portal and open Codacy. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. In the setup window, enter your account API token (apiToken).

3. **Confirm**

   The status changes to **Configured**. If it later reads **Needs reconnect**, select **Reconnect** and sign in again.

### With the CLI

```bash
metorial catalog search codacy
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. 

### Add it to your AI client

`metorial install` adds your Codacy connection to a local MCP client such as Claude Code, Cursor or Codex. `metorial list` prints the integration ID and `metorial client list` the client identifiers.

```bash
metorial list codacy
metorial client list
metorial install <client-identifier> <integration-id>
```

For a client that takes a server URL, such as ChatGPT, `metorial install custom <integration-id>` creates an installation token and shows the endpoint details.

## Make it read-only

Open the integration's **Tool Filters** and set the write and destructive groups to **Reject**. Agents keep the 18 read-only tools, such as `list_files` and `list_people`, and lose the write tool `add_repository`, and the 4 destructive tools, such as `manage_dast_target` or `configure_analysis_tool`.

Employees see the result on the integration's page in the portal under **Tool access**. For the full walkthrough, see [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
metorial list codacy
metorial tools <integration-id>
metorial call <integration-id> list_people -d '{}'
```

`metorial tools` lists the 23 tools, minus any you rejected. `list_people` takes no input. It lists people associated with the configured Codacy organization, including members and contributors.

To see every input a tool takes, run `metorial schema <integration-id> <tool-key>`.

## Tools

### Read-only tools (18)

- `get_repository_analysis`: Retrieve detailed code analysis results for a specific repository including quality grade, issues, complexity, duplication, coverage, and analysis progress. Needs `repositoryName`.
- `search_sbom_dependencies`: Search software bill of materials (SBOM) dependencies across your organization.
- `list_repositories`: List repositories in the configured organization with their analysis information including quality grade, issue counts, coverage, complexity, and duplication metrics.
- `search_security_items`: Search and filter security findings (SRM items) across your organization.
- `get_pull_request_analysis`: Retrieve detailed analysis results for a specific pull request, including quality gate status, new/fixed issues, coverage metrics, and affected files. Needs `repositoryName` and `pullRequestNumber`.
- `list_coding_standards`: List coding standards configured for the organization.
- `list_pull_requests`: List pull requests for a repository with their analysis status. Needs `repositoryName`.
- `search_issues`: Search and filter code quality issues in a repository. Needs `repositoryName`.
- `get_commit_analysis`: Retrieve analysis results for a specific commit, including quality metrics, issues introduced, and coverage data. Needs `repositoryName`.
- `list_organizations`: List all Codacy organizations the authenticated user belongs to.
- `list_files`: List files in a repository with their code quality metrics including grade, number of issues, complexity, coverage, and duplication. Needs `repositoryName`.
- `list_people`: List people associated with the configured Codacy organization, including members and contributors.
- `list_repository_tools`: List the static analysis tools configured for a repository, including their enabled/disabled status. Needs `repositoryName`.
- `list_tool_patterns`: Discover configured code patterns for a repository analysis tool, including pattern IDs, definitions, enabled state, parameters, and coding standards.
- `get_security_item`: Retrieve a security finding with its full remediation, advisory, dependency, ownership, and ignored-state details.
- `get_quality_settings`: Read a repository’s quality thresholds for issue percentage, duplication, complexity, and coverage.
- `get_current_user`: Get the Codacy account authenticated by the API token, including its ID, email, name, and active status.
- `list_branches`: Discover repository branches and their enabled/default state.

### Write tools (1)

- `add_repository`: Add a repository to Codacy for code analysis. Needs `repositoryFullPath`.

### Destructive tools (4)

- `configure_analysis_tool`: Enable, disable, or configure a static analysis tool for a repository. Needs `repositoryName` and `toolUuid`.
- `manage_repository_token`: Create, list, or delete repository API tokens. Needs `repositoryName` and `action`.
- `manage_dast_target`: Create, list, delete, or trigger scans on DAST (Dynamic Application Security Testing) targets. Needs `action`.
- `set_security_item_ignored`: Ignore or restore a security finding.

## Triggers

Codacy has 3 triggers, which fire on events in Codacy:

- `new_pull_requests`: Triggers when new pull requests are detected in a repository, including their analysis results and quality gate status.
- `new_security_items`: Triggers when new security findings (SRM items) are detected in the organization.
- `inbound_webhook`

## Next steps

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Codacy there
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Codacy on metorial.com](https://metorial.com/integrations/codacy): the integration overview