@mondaydotcomorg/monday-api-mcp 0.1.1 → 0.1.4

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/CHANGELOG.md ADDED
File without changes
package/README.md CHANGED
@@ -8,11 +8,13 @@ A server implementation for the [Model Context Protocol (MCP)](https://modelcont
8
8
  @mondaydotcomorg/monday-api-mcp -t abcd123
9
9
  ```
10
10
 
11
+ The Monday API token can also be provided via the `monday_token` environment variable.
12
+
11
13
  ### Command Line Arguments
12
14
 
13
15
  | Argument | Flags | Description | Required | Default |
14
16
  |----------|-------|-------------|----------|---------|
15
- | Monday API Token | `--token`, `-t` | Monday.com API token | Yes | - |
17
+ | Monday API Token | `--token`, `-t` | Monday.com API token (can also be provided via `monday_token` environment variable) | Yes | - |
16
18
  | API Version | `--version`, `-v` | Monday.com API version | No | `current` |
17
19
  | Read Only Mode | `--read-only`, `-ro` | Enable read-only mode | No | `false` |
18
20
  | Dynamic API Tools | `--enable-dynamic-api-tools`, `-edat` | (Beta) Enable dynamic API tools (Mode that includes the whole API schema, not supported when using read-only mode) | No | `false` |
@@ -33,6 +35,41 @@ A server implementation for the [Model Context Protocol (MCP)](https://modelcont
33
35
  }
34
36
  ```
35
37
 
38
+ ### Example Integration with Claude Desktop
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "monday-api-mcp": {
44
+ "command": "npx",
45
+ "args": [
46
+ "@mondaydotcomorg/monday-api-mcp",
47
+ "-t",
48
+ "abcd123"
49
+ ]
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### Example Using Environment Variable
56
+
57
+ ```json
58
+ {
59
+ "mcpServers": {
60
+ "monday-api-mcp": {
61
+ "command": "npx",
62
+ "args": [
63
+ "@mondaydotcomorg/monday-api-mcp"
64
+ ],
65
+ "env": {
66
+ "monday_token": "abcd123"
67
+ }
68
+ }
69
+ }
70
+ }
71
+ ```
72
+
36
73
  ## License
37
74
 
38
- MIT
75
+ MIT
package/dist/index.js CHANGED
@@ -2,6 +2,8 @@
2
2
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
3
  import { MondayAgentToolkit } from '@mondaydotcomorg/agent-toolkit/mcp';
4
4
  import { parseArgs, validateArgs } from './utils/args/args.service.js';
5
+ import dotenv from 'dotenv';
6
+ dotenv.config();
5
7
  /**
6
8
  * Initializes and starts the MCP server with the Monday Agent Toolkit
7
9
  * Uses stdio for transport
@@ -10,7 +10,7 @@ export const ARG_CONFIGS = [
10
10
  flags: ['--version', '-v'],
11
11
  description: 'Monday API version',
12
12
  required: false,
13
- defaultValue: 'current',
13
+ defaultValue: undefined,
14
14
  },
15
15
  {
16
16
  name: 'readOnlyMode',
@@ -1,6 +1,7 @@
1
1
  import { ARG_CONFIGS } from './args.config.js';
2
2
  /**
3
3
  * Parse command line arguments based on the defined configurations
4
+ * Also checks environment variables if command line args are not provided
4
5
  * @param args Command line arguments (process.argv.slice(2))
5
6
  * @returns Object with parsed arguments
6
7
  */
@@ -8,6 +9,7 @@ export function parseArgs(args) {
8
9
  const result = {};
9
10
  ARG_CONFIGS.forEach((config) => {
10
11
  let argValue;
12
+ // Try to get value from command line arguments
11
13
  for (const flag of config.flags) {
12
14
  const flagIndex = args.findIndex((arg) => arg === flag);
13
15
  if (flagIndex !== -1 && flagIndex + 1 < args.length) {
@@ -15,6 +17,17 @@ export function parseArgs(args) {
15
17
  break;
16
18
  }
17
19
  }
20
+ // If not found in command line args, try environment variables
21
+ if (argValue === undefined) {
22
+ const envVarName = `MONDAY_${config.name.toUpperCase()}`;
23
+ if (process.env[envVarName]) {
24
+ argValue = process.env[envVarName];
25
+ }
26
+ }
27
+ // If still not found, use default value if provided
28
+ if (argValue === undefined && config.defaultValue !== undefined) {
29
+ argValue = String(config.defaultValue);
30
+ }
18
31
  result[config.name] = argValue;
19
32
  });
20
33
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/monday-api-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.4",
4
4
  "description": "MCP server for using the monday.com API",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -13,7 +13,10 @@
13
13
  "scripts": {
14
14
  "build": "tsc && shx chmod +x dist/*.js",
15
15
  "watch": "tsc --watch",
16
- "start": "npm run build && node dist/index.js"
16
+ "start": "yarn build && node dist/index.js",
17
+ "test": "node --experimental-vm-modules ../../node_modules/jest/bin/jest.js --config jest.config.js",
18
+ "prettier": "prettier --write \"lib/**/*.ts\" --ignore-path \"../../.prettierignore\"",
19
+ "lint": "eslint --fix \"lib/**/*.ts\" --ignore-path \"../../.eslintignore\""
17
20
  },
18
21
  "repository": {
19
22
  "type": "git",
@@ -21,10 +24,16 @@
21
24
  },
22
25
  "dependencies": {
23
26
  "@modelcontextprotocol/sdk": "^1.7.0",
24
- "@mondaydotcomorg/agent-toolkit": "^0.1.2"
27
+ "@mondaydotcomorg/agent-toolkit": "workspace:*",
28
+ "dotenv": "^16.4.7"
25
29
  },
26
30
  "devDependencies": {
31
+ "@types/jest": "^29.5.12",
32
+ "eslint": "^8.56.0",
33
+ "jest": "^29.7.0",
34
+ "prettier": "^3.2.4",
27
35
  "shx": "^0.3.4",
36
+ "ts-jest": "^29.3.1",
28
37
  "typescript": "^5.6.2"
29
38
  }
30
39
  }