@codacy/codacy-mcp 0.4.1 → 0.4.3
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/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,9 +6,15 @@ import { OpenAPI } from './src/api/client/index.js';
|
|
|
6
6
|
import * as Tools from './src/tools/index.js';
|
|
7
7
|
import * as Handlers from './src/handlers/index.js';
|
|
8
8
|
import { validateOrganization } from './src/middleware/validation.js';
|
|
9
|
+
// Check for API key
|
|
10
|
+
const CODACY_ACCOUNT_TOKEN = process.env.CODACY_ACCOUNT_TOKEN;
|
|
11
|
+
if (!CODACY_ACCOUNT_TOKEN) {
|
|
12
|
+
console.error('Error: CODACY_ACCOUNT_TOKEN environment variable is required');
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
9
15
|
OpenAPI.BASE = 'https://app.codacy.com/api/v3';
|
|
10
16
|
OpenAPI.HEADERS = {
|
|
11
|
-
'api-token':
|
|
17
|
+
'api-token': CODACY_ACCOUNT_TOKEN || '',
|
|
12
18
|
'X-Codacy-Origin': 'mcp-server',
|
|
13
19
|
};
|
|
14
20
|
const server = new Server({
|
|
@@ -116,7 +122,7 @@ const toolDefinitions = {
|
|
|
116
122
|
tool: Tools.listRepositoryToolsTool,
|
|
117
123
|
handler: Handlers.listRepositoryToolsHandler,
|
|
118
124
|
},
|
|
119
|
-
|
|
125
|
+
codacy_list_organizations: {
|
|
120
126
|
tool: Tools.listOrganizationsTool,
|
|
121
127
|
handler: Handlers.listOrganizationsHandler,
|
|
122
128
|
},
|