@mondaydotcomorg/monday-api-mcp 0.1.3 → 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/README.md +22 -2
- package/dist/index.js +2 -0
- package/dist/utils/args/args.config.js +1 -1
- package/dist/utils/args/args.service.js +13 -0
- package/package.json +3 -2
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` |
|
|
@@ -50,6 +52,24 @@ A server implementation for the [Model Context Protocol (MCP)](https://modelcont
|
|
|
50
52
|
}
|
|
51
53
|
```
|
|
52
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
|
+
|
|
53
73
|
## License
|
|
54
74
|
|
|
55
|
-
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
|
|
@@ -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.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "MCP server for using the monday.com API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.7.0",
|
|
27
|
-
"@mondaydotcomorg/agent-toolkit": "workspace:*"
|
|
27
|
+
"@mondaydotcomorg/agent-toolkit": "workspace:*",
|
|
28
|
+
"dotenv": "^16.4.7"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@types/jest": "^29.5.12",
|