@mondaydotcomorg/monday-api-mcp 1.12.2 → 1.12.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 +1 -10
- package/dist/domains/atp/atp.consts.js +14 -0
- package/dist/domains/atp/atp.service.js +6 -48
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -51,14 +51,6 @@ ATP (Agent Tool Protocol) mode provides an alternative integration that enables
|
|
|
51
51
|
npx @mondaydotcomorg/monday-api-mcp@latest -t abcd123 -m atp
|
|
52
52
|
```
|
|
53
53
|
|
|
54
|
-
### Configuration
|
|
55
|
-
|
|
56
|
-
| Environment Variable | Description | Required |
|
|
57
|
-
|---------------------|-------------|----------|
|
|
58
|
-
| `MONDAY_ATP_PORT` | Specify a fixed port for the ATP server (1-65535). If not set, a random available port will be used. | No |
|
|
59
|
-
| `NODE_OPTIONS` | Node.js runtime options. Set to `--no-node-snapshot` for compatibility. | Yes |
|
|
60
|
-
| `ATP_JWT_SECRET` | JWT secret for ATP authentication. Must be set but currently not used (e.g., `ignore`). | Yes |
|
|
61
|
-
|
|
62
54
|
### Cursor Integration (ATP Mode)
|
|
63
55
|
|
|
64
56
|
```json
|
|
@@ -74,8 +66,7 @@ npx @mondaydotcomorg/monday-api-mcp@latest -t abcd123 -m atp
|
|
|
74
66
|
"atp"
|
|
75
67
|
],
|
|
76
68
|
"env": {
|
|
77
|
-
"NODE_OPTIONS": "--no-node-snapshot"
|
|
78
|
-
"ATP_JWT_SECRET": "ignore"
|
|
69
|
+
"NODE_OPTIONS": "--no-node-snapshot"
|
|
79
70
|
}
|
|
80
71
|
}
|
|
81
72
|
}
|
|
@@ -25,6 +25,20 @@ exports.TOOL_DESCRIPTIONS = {
|
|
|
25
25
|
- If multiple results match a search, ASK which one they mean
|
|
26
26
|
- If you're missing required information - ASK, don't guess
|
|
27
27
|
|
|
28
|
+
**CRITICAL - Multiple Results Handling:**
|
|
29
|
+
- When searching by name, ALWAYS check if multiple results match
|
|
30
|
+
- If more than one result is found and the user asked for a SPECIFIC entity (not "all" or "every"), STOP and ASK which one they mean
|
|
31
|
+
- Present the options clearly with distinguishing details (ID, relevant properties, etc.)
|
|
32
|
+
- Only proceed with the action AFTER the user confirms which one(s)
|
|
33
|
+
- Exception: If user explicitly says "all", "every", "both", etc., then apply to all matches
|
|
34
|
+
|
|
35
|
+
**NEVER GUESS - STRICT RULES:**
|
|
36
|
+
- NEVER pick "the first one" or any arbitrary result when multiple matches exist
|
|
37
|
+
- NEVER assume which entity the user meant - even if one seems "more likely"
|
|
38
|
+
- NEVER perform write operations (mutations) without explicit user confirmation when ambiguous
|
|
39
|
+
- If you find 2+ matches: DO NOT execute the action, LIST all matches with their IDs and details, WAIT for user to specify
|
|
40
|
+
- Saying "I updated the first one, let me know if you meant the other" is WRONG - you should have asked FIRST
|
|
41
|
+
|
|
28
42
|
**Multi-line Example:**
|
|
29
43
|
\`\`\`typescript
|
|
30
44
|
// 1. Get board with columns and cursor
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.runAtpMcpServer = runAtpMcpServer;
|
|
4
4
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
5
5
|
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
6
|
-
const net_1 = require("net");
|
|
7
6
|
const atp_consts_js_1 = require("./atp.consts.js");
|
|
8
7
|
// Dynamic imports required: ATP packages are ESM, this package is CJS
|
|
9
8
|
async function loadAtpDependencies() {
|
|
@@ -26,46 +25,8 @@ function filterAndEnhanceTools(tools, toolDescriptions) {
|
|
|
26
25
|
description: toolDescriptions[tool.name],
|
|
27
26
|
}));
|
|
28
27
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
* Set MONDAY_ATP_PORT environment variable to use a specific port.
|
|
32
|
-
*/
|
|
33
|
-
function getAtpPort() {
|
|
34
|
-
const envPort = process.env.MONDAY_ATP_PORT;
|
|
35
|
-
if (envPort) {
|
|
36
|
-
const port = parseInt(envPort, 10);
|
|
37
|
-
if (!isNaN(port) && port > 0 && port <= 65535) {
|
|
38
|
-
return port;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return undefined; // Will use dynamic port allocation
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Finds an available port by binding to port 0 and letting the OS assign one.
|
|
45
|
-
*/
|
|
46
|
-
async function findAvailablePort() {
|
|
47
|
-
return new Promise((resolve, reject) => {
|
|
48
|
-
const server = (0, net_1.createServer)();
|
|
49
|
-
server.listen(0, () => {
|
|
50
|
-
const address = server.address();
|
|
51
|
-
if (address && typeof address === 'object') {
|
|
52
|
-
const port = address.port;
|
|
53
|
-
server.close(() => resolve(port));
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
server.close(() => reject(new Error('Failed to get port from server address')));
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
server.on('error', reject);
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
async function initAtpServer(createServer) {
|
|
63
|
-
const server = createServer({ logger: 'none' });
|
|
64
|
-
// Use configured port or find an available one
|
|
65
|
-
const configuredPort = getAtpPort();
|
|
66
|
-
const port = configuredPort ?? (await findAvailablePort());
|
|
67
|
-
await server.listen(port);
|
|
68
|
-
return { server, port };
|
|
28
|
+
function initAtpServer(createServer) {
|
|
29
|
+
return createServer({ logger: 'none' });
|
|
69
30
|
}
|
|
70
31
|
async function loadMondaySchema(server, token, version) {
|
|
71
32
|
const apiVersion = version ?? atp_consts_js_1.DEFAULT_API_VERSION;
|
|
@@ -79,12 +40,9 @@ async function loadMondaySchema(server, token, version) {
|
|
|
79
40
|
queryDepthLimit: atp_consts_js_1.QUERY_DEPTH_LIMIT,
|
|
80
41
|
});
|
|
81
42
|
}
|
|
82
|
-
async function initAtpClient(AgentToolProtocolClient,
|
|
83
|
-
const client = new AgentToolProtocolClient({
|
|
84
|
-
baseUrl: `http://localhost:${port}`,
|
|
85
|
-
});
|
|
43
|
+
async function initAtpClient(AgentToolProtocolClient, server) {
|
|
44
|
+
const client = new AgentToolProtocolClient({ server });
|
|
86
45
|
await client.init({ name: 'monday-api-mcp', version: '1.0.0' });
|
|
87
|
-
await client.connect();
|
|
88
46
|
return client;
|
|
89
47
|
}
|
|
90
48
|
function createMcpServer() {
|
|
@@ -100,9 +58,9 @@ function createMcpServer() {
|
|
|
100
58
|
async function runAtpMcpServer(config) {
|
|
101
59
|
const { token, version } = config;
|
|
102
60
|
const { createServer, AgentToolProtocolClient, ToolNames, registerToolsWithMCP } = await loadAtpDependencies();
|
|
103
|
-
const
|
|
61
|
+
const server = initAtpServer(createServer);
|
|
104
62
|
await loadMondaySchema(server, token, version);
|
|
105
|
-
const client = await initAtpClient(AgentToolProtocolClient,
|
|
63
|
+
const client = await initAtpClient(AgentToolProtocolClient, server);
|
|
106
64
|
const mcpServer = createMcpServer();
|
|
107
65
|
const toolDescriptions = getToolDescriptions(ToolNames);
|
|
108
66
|
const atpTools = filterAndEnhanceTools(client.getATPTools(), toolDescriptions);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondaydotcomorg/monday-api-mcp",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.4",
|
|
4
4
|
"description": "MCP server for using the monday.com API",
|
|
5
5
|
"mcpName": "com.monday/monday.com",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.13.2",
|
|
27
27
|
"@mondaydotcomorg/agent-toolkit": "*",
|
|
28
|
-
"@mondaydotcomorg/atp-client": "^0.19.
|
|
29
|
-
"@mondaydotcomorg/atp-mcp-adapter": "^0.19.
|
|
30
|
-
"@mondaydotcomorg/atp-server": "^0.19.
|
|
28
|
+
"@mondaydotcomorg/atp-client": "^0.19.7",
|
|
29
|
+
"@mondaydotcomorg/atp-mcp-adapter": "^0.19.8",
|
|
30
|
+
"@mondaydotcomorg/atp-server": "^0.19.8",
|
|
31
31
|
"dotenv": "^16.4.7",
|
|
32
32
|
"zod": "^3.25.0"
|
|
33
33
|
},
|