api-token header and asks for it on the first call that needs it. Self-hosted setups can pass it to the factory instead:
- Read only. Every operation is a read. The plugin does not receive webhooks.
- Naming a repository. Repository and organization operations take
provider(ghfor GitHub,glfor GitLab,bbfor Bitbucket),organization_nameandrepository_nameas they appear on the Git provider, for examplegh/codacy/codacy-analysis-cli. - Paging.
organizations.list,repositories.list,tools.listandpatterns.listtakelimit(default 100) andcursor. Passpagination.cursorfrom the response to get the next page; a response without a cursor is the last page. - Tool UUIDs.
patterns.listandpatterns.gettake a tool’suuidfromtools.listoranalysis.getConfig. - Rate limits. On a 429 the plugin waits for Codacy’s
Retry-Afterand retries up to three times. - Not covered. Issues, commits, pull requests, coverage, security findings and any write (repository settings, tool or pattern configuration).
- 10 typed API operations
- 5 synced entities (
accounts,organizations,patterns,repositories,tools) for fast.search()/.list()
Setup
1
Install
2
Add the plugin
corsair.ts
corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.3
Choose authentication
- API Key (Recommended)
No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.More: API Key
4
Connect a tenant
Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.
Example API calls
List an organization’s repositoriesQuery synced data
repositories.list and repositories.get store each repository by <provider>/<owner>/<name>. Organizations, tools, patterns and your account are stored the same way; analysis.getConfig and repositories.languages are not stored.
accounts, organizations, patterns, repositories, tools. See Database for filters and operators.
What’s next
API reference
Every
codacy.api.* operation with input and output types.Database
Synced entities, search filters, and operators.
Connect / OAuth
createLink, Hub delivery, and tenant connect flows.
Use with agents
Expose this plugin’s operations as MCP tools.