@codacy/codacy-mcp 0.4.1 → 0.4.2

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -1
  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': process.env.CODACY_ACCOUNT_TOKEN || '',
17
+ 'api-token': CODACY_ACCOUNT_TOKEN || '',
12
18
  'X-Codacy-Origin': 'mcp-server',
13
19
  };
14
20
  const server = new Server({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/codacy-mcp",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Codacy MCP server",
5
5
  "license": "MIT",
6
6
  "author": "Codacy",