@codacy/codacy-mcp 0.6.7 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/src/cli/MacCodacyCli.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
# Codacy MCP Server
|
|
2
2
|
|
|
3
|
+
[](https://app.codacy.com/gh/codacy/codacy-mcp-server/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
4
|
+
|
|
3
5
|
MCP Server for the Codacy API, enabling access to repositories, files, quality, coverage, security and more.
|
|
4
6
|
|
|
5
7
|
## Features / Tools
|
|
6
8
|
|
|
7
9
|
The following tools are available through the Codacy MCP Server:
|
|
8
10
|
|
|
11
|
+
### Repository Setup and Management
|
|
12
|
+
|
|
13
|
+
- `codacy_setup_repository`: Add or follow a repository in Codacy if not already present. This tool ensures the repository is registered with Codacy, allowing further analysis and management.
|
|
14
|
+
|
|
9
15
|
### Organization and Repository Management
|
|
10
16
|
|
|
11
17
|
- `codacy_list_organizations`: List organizations with pagination support.
|
|
@@ -87,6 +93,8 @@ Ensure your machine has the following tools installed:
|
|
|
87
93
|
- node.js
|
|
88
94
|
- ensure that the `npx` command runs without issues.
|
|
89
95
|
|
|
96
|
+
For local analysis, the MCP Server requires the [Codacy CLI](https://github.com/codacy/codacy-cli-v2) to be installed. If it is not available, the MCP Server will attempt to install it for you. Codacy CLI v2 runs on macOS, Linux, and Windows (only with WSL).
|
|
97
|
+
|
|
90
98
|
### Personal API Access Token
|
|
91
99
|
|
|
92
100
|
Get your Codacy's Account API Token from your [Codacy Account](https://app.codacy.com/account/access-management).
|
|
@@ -96,16 +96,18 @@ export class MacCodacyCli extends CodacyCli {
|
|
|
96
96
|
const apiToken = this._accountToken
|
|
97
97
|
? { 'api-token': this._accountToken }
|
|
98
98
|
: {};
|
|
99
|
+
// Repository params are required for the "api-token" flag to work; it only works all together
|
|
99
100
|
const repositoryAccess = this.repository && this.provider && this.organization
|
|
100
101
|
? {
|
|
101
102
|
provider: this.provider,
|
|
102
103
|
organization: this.organization,
|
|
103
104
|
repository: this.repository,
|
|
105
|
+
...apiToken,
|
|
104
106
|
}
|
|
105
107
|
: {};
|
|
106
108
|
try {
|
|
107
109
|
// initialize codacy-cli
|
|
108
|
-
await this.execAsync(`${this.getCliCommand()} init`, { ...
|
|
110
|
+
await this.execAsync(`${this.getCliCommand()} init`, { ...repositoryAccess });
|
|
109
111
|
}
|
|
110
112
|
catch (error) {
|
|
111
113
|
throw new Error(`Failed to initialize CLI: ${error}`);
|