@codacy/codacy-mcp 0.6.16 → 0.6.18
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 +13 -1
- package/dist/src/cli/MacCodacyCli.js +3 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -236,7 +236,19 @@ npm run update-api
|
|
|
236
236
|
npm run build
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
### Testing with Inspector
|
|
240
|
+
|
|
241
|
+
You can test the MCP server using the inspector tool. You can either set a `CODACY_ACCOUNT_TOKEN` environment variable or pass it inline:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
CODACY_ACCOUNT_TOKEN=your_token_here npm run inspect
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
This will build the project and launch the MCP inspector with your Codacy token.
|
|
248
|
+
|
|
249
|
+
### Testing with an Agent
|
|
250
|
+
|
|
251
|
+
You can test your local instance configuring the MCP Server as follows:
|
|
240
252
|
|
|
241
253
|
```
|
|
242
254
|
"codacy": {
|
|
@@ -14,19 +14,9 @@ export class MacCodacyCli extends CodacyCli {
|
|
|
14
14
|
this.setCliCommand(this._cliVersion ? `CODACY_CLI_V2_VERSION=${this._cliVersion} ${localPath}` : localPath);
|
|
15
15
|
return;
|
|
16
16
|
}
|
|
17
|
-
//
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
this.setCliCommand(this._cliVersion ? `CODACY_CLI_V2_VERSION=${this._cliVersion} codacy-cli` : 'codacy-cli');
|
|
21
|
-
await this.execAsync(`${this.getCliCommand()} --help`);
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
catch {
|
|
25
|
-
// CLI not found, clear it, and attempt to install it
|
|
26
|
-
this.setCliCommand('');
|
|
27
|
-
await this.install();
|
|
28
|
-
return undefined;
|
|
29
|
-
}
|
|
17
|
+
// CLI not found, attempt to install it
|
|
18
|
+
await this.install();
|
|
19
|
+
return;
|
|
30
20
|
}
|
|
31
21
|
async preflightCodacyCli() {
|
|
32
22
|
// is there a command?
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codacy/codacy-mcp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.18",
|
|
4
4
|
"description": "Codacy MCP server",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Codacy",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"lint:fix": "eslint . --ext .ts --fix",
|
|
29
29
|
"format": "prettier --write \"**/*.{ts,json,md}\"",
|
|
30
30
|
"format:check": "prettier --check \"**/*.{ts,json,md}\"",
|
|
31
|
-
"inspect": "npm run build && npx @modelcontextprotocol/inspector -e CODACY_ACCOUNT_TOKEN
|
|
31
|
+
"inspect": "npm run build && npx @modelcontextprotocol/inspector -e CODACY_ACCOUNT_TOKEN=$CODACY_ACCOUNT_TOKEN node dist/index.js"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@modelcontextprotocol/sdk": "1.0.1",
|