@mondaydotcomorg/monday-api-mcp 0.1.0
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 +38 -0
- package/dist/index.js +28 -0
- package/dist/utils/args/args.config.js +29 -0
- package/dist/utils/args/args.service.js +41 -0
- package/dist/utils/args/args.types.js +1 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Monday.com API MCP Server
|
|
2
|
+
|
|
3
|
+
A server implementation for the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) that provides an interface to interact with Monday.com API.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
@mondaydotcomorg/monday-api-mcp -t abcd123
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
### Command Line Arguments
|
|
12
|
+
|
|
13
|
+
| Argument | Flags | Description | Required | Default |
|
|
14
|
+
|----------|-------|-------------|----------|---------|
|
|
15
|
+
| Monday API Token | `--token`, `-t` | Monday.com API token | Yes | - |
|
|
16
|
+
| API Version | `--version`, `-v` | Monday.com API version | No | `current` |
|
|
17
|
+
| Read Only Mode | `--read-only`, `-ro` | Enable read-only mode | No | `false` |
|
|
18
|
+
| 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` |
|
|
19
|
+
|
|
20
|
+
## Example Integration with Cursor
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"mcpServers": {
|
|
25
|
+
"monday-api-mcp": {
|
|
26
|
+
"command": "npx",
|
|
27
|
+
"args": [
|
|
28
|
+
"@mondaydotcomorg/monday-api-mcp -t abcd123"
|
|
29
|
+
],
|
|
30
|
+
"env": {}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
MIT
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
3
|
+
import { MondayAgentToolkit } from '@mondaydotcomorg/agent-toolkit/mcp';
|
|
4
|
+
import { parseArgs, validateArgs } from './utils/args/args.service.js';
|
|
5
|
+
/**
|
|
6
|
+
* Initializes and starts the MCP server with the Monday Agent Toolkit
|
|
7
|
+
* Uses stdio for transport
|
|
8
|
+
*/
|
|
9
|
+
async function runServer() {
|
|
10
|
+
const args = process.argv.slice(2);
|
|
11
|
+
const parsedArgs = parseArgs(args);
|
|
12
|
+
const validatedArgs = validateArgs(parsedArgs);
|
|
13
|
+
const toolkit = new MondayAgentToolkit({
|
|
14
|
+
mondayApiToken: validatedArgs.token,
|
|
15
|
+
mondayApiVersion: validatedArgs.version,
|
|
16
|
+
mondayApiRequestConfig: {},
|
|
17
|
+
toolsConfiguration: {
|
|
18
|
+
readOnlyMode: validatedArgs.readOnlyMode,
|
|
19
|
+
enableDynamicApiTools: validatedArgs.enableDynamicApiTools,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
const transport = new StdioServerTransport();
|
|
23
|
+
await toolkit.connect(transport);
|
|
24
|
+
}
|
|
25
|
+
runServer().catch((error) => {
|
|
26
|
+
console.error('Fatal error in main():', error);
|
|
27
|
+
process.exit(1);
|
|
28
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const ARG_CONFIGS = [
|
|
2
|
+
{
|
|
3
|
+
name: 'token',
|
|
4
|
+
flags: ['--token', '-t'],
|
|
5
|
+
description: 'Monday API token',
|
|
6
|
+
required: true,
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: 'version',
|
|
10
|
+
flags: ['--version', '-v'],
|
|
11
|
+
description: 'Monday API version',
|
|
12
|
+
required: false,
|
|
13
|
+
defaultValue: 'current',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'readOnlyMode',
|
|
17
|
+
flags: ['--read-only', '-ro'],
|
|
18
|
+
description: 'Enable read-only mode',
|
|
19
|
+
required: false,
|
|
20
|
+
defaultValue: false,
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'enableDynamicApiTools',
|
|
24
|
+
flags: ['--enable-dynamic-api-tools', '-edat'],
|
|
25
|
+
description: '(Beta) Enable dynamic API tools (Mode that includes the whole API schema, not supported when using read-only mode)',
|
|
26
|
+
required: false,
|
|
27
|
+
defaultValue: false,
|
|
28
|
+
},
|
|
29
|
+
];
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ARG_CONFIGS } from './args.config.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parse command line arguments based on the defined configurations
|
|
4
|
+
* @param args Command line arguments (process.argv.slice(2))
|
|
5
|
+
* @returns Object with parsed arguments
|
|
6
|
+
*/
|
|
7
|
+
export function parseArgs(args) {
|
|
8
|
+
const result = {};
|
|
9
|
+
ARG_CONFIGS.forEach((config) => {
|
|
10
|
+
let argValue;
|
|
11
|
+
for (const flag of config.flags) {
|
|
12
|
+
const flagIndex = args.findIndex((arg) => arg === flag);
|
|
13
|
+
if (flagIndex !== -1 && flagIndex + 1 < args.length) {
|
|
14
|
+
argValue = args[flagIndex + 1];
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
result[config.name] = argValue;
|
|
19
|
+
});
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Validates required arguments and displays error messages for missing ones
|
|
24
|
+
* @param parsedArgs The parsed arguments to validate
|
|
25
|
+
* @returns Strongly typed validated arguments
|
|
26
|
+
*/
|
|
27
|
+
export function validateArgs(parsedArgs) {
|
|
28
|
+
const missingArgs = ARG_CONFIGS.filter((config) => config.required && !parsedArgs[config.name]);
|
|
29
|
+
if (missingArgs.length > 0) {
|
|
30
|
+
console.error('Error: The following required arguments are missing:');
|
|
31
|
+
missingArgs.forEach((config) => {
|
|
32
|
+
console.error(` - ${config.name}: ${config.description}`);
|
|
33
|
+
console.error(' You can provide it using:');
|
|
34
|
+
const flagsString = config.flags.join(' or ');
|
|
35
|
+
console.error(` ${flagsString} command line argument`);
|
|
36
|
+
});
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
// At this point, all required args are present, so we can safely cast
|
|
40
|
+
return parsedArgs;
|
|
41
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mondaydotcomorg/monday-api-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MCP server for using the monday.com API",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Anthropic, PBC (https://anthropic.com)",
|
|
7
|
+
"homepage": "https://modelcontextprotocol.io",
|
|
8
|
+
"bugs": "https://github.com/modelcontextprotocol/servers/issues",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"bin": {
|
|
11
|
+
"mcp-server-monday-api": "dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc && shx chmod +x dist/*.js",
|
|
18
|
+
"watch": "tsc --watch",
|
|
19
|
+
"start": "npm run build && node dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://github.com/mondaycom/monday-graphql-api/tree/main/packages/monday-api-mcp"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@modelcontextprotocol/sdk": "^1.7.0",
|
|
27
|
+
"@mondaydotcomorg/agent-toolkit": "^0.1.2",
|
|
28
|
+
"@types/node": "^22",
|
|
29
|
+
"@types/node-fetch": "^2.6.12",
|
|
30
|
+
"node-fetch": "^3.3.2",
|
|
31
|
+
"universal-user-agent": "^7.0.2"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"shx": "^0.3.4",
|
|
35
|
+
"typescript": "^5.6.2"
|
|
36
|
+
}
|
|
37
|
+
}
|