@mondaydotcomorg/monday-api-mcp 1.0.1 → 1.0.3

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/dist/index.js CHANGED
@@ -1,18 +1,23 @@
1
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
- import dotenv from 'dotenv';
6
- dotenv.config();
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
8
+ const mcp_1 = require("@mondaydotcomorg/agent-toolkit/mcp");
9
+ const args_service_js_1 = require("./utils/args/args.service.js");
10
+ const dotenv_1 = __importDefault(require("dotenv"));
11
+ dotenv_1.default.config();
7
12
  /**
8
13
  * Initializes and starts the MCP server with the Monday Agent Toolkit
9
14
  * Uses stdio for transport
10
15
  */
11
16
  async function runServer() {
12
17
  const args = process.argv.slice(2);
13
- const parsedArgs = parseArgs(args);
14
- const validatedArgs = validateArgs(parsedArgs);
15
- const toolkit = new MondayAgentToolkit({
18
+ const parsedArgs = (0, args_service_js_1.parseArgs)(args);
19
+ const validatedArgs = (0, args_service_js_1.validateArgs)(parsedArgs);
20
+ const toolkit = new mcp_1.MondayAgentToolkit({
16
21
  mondayApiToken: validatedArgs.token,
17
22
  mondayApiVersion: validatedArgs.version,
18
23
  mondayApiRequestConfig: {},
@@ -21,7 +26,7 @@ async function runServer() {
21
26
  enableDynamicApiTools: validatedArgs.enableDynamicApiTools,
22
27
  },
23
28
  });
24
- const transport = new StdioServerTransport();
29
+ const transport = new stdio_js_1.StdioServerTransport();
25
30
  await toolkit.connect(transport);
26
31
  }
27
32
  runServer().catch((error) => {
@@ -1,4 +1,7 @@
1
- export const ARG_CONFIGS = [
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ARG_CONFIGS = void 0;
4
+ exports.ARG_CONFIGS = [
2
5
  {
3
6
  name: 'token',
4
7
  flags: ['--token', '-t'],
@@ -1,13 +1,17 @@
1
- import { ARG_CONFIGS } from './args.config.js';
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseArgs = parseArgs;
4
+ exports.validateArgs = validateArgs;
5
+ const args_config_js_1 = require("./args.config.js");
2
6
  /**
3
7
  * Parse command line arguments based on the defined configurations
4
8
  * Also checks environment variables if command line args are not provided
5
9
  * @param args Command line arguments (process.argv.slice(2))
6
10
  * @returns Object with parsed arguments
7
11
  */
8
- export function parseArgs(args) {
12
+ function parseArgs(args) {
9
13
  const result = {};
10
- ARG_CONFIGS.forEach((config) => {
14
+ args_config_js_1.ARG_CONFIGS.forEach((config) => {
11
15
  let argValue;
12
16
  // Try to get value from command line arguments
13
17
  for (const flag of config.flags) {
@@ -37,8 +41,8 @@ export function parseArgs(args) {
37
41
  * @param parsedArgs The parsed arguments to validate
38
42
  * @returns Strongly typed validated arguments
39
43
  */
40
- export function validateArgs(parsedArgs) {
41
- const missingArgs = ARG_CONFIGS.filter((config) => config.required && !parsedArgs[config.name]);
44
+ function validateArgs(parsedArgs) {
45
+ const missingArgs = args_config_js_1.ARG_CONFIGS.filter((config) => config.required && !parsedArgs[config.name]);
42
46
  if (missingArgs.length > 0) {
43
47
  console.error('Error: The following required arguments are missing:');
44
48
  missingArgs.forEach((config) => {
@@ -50,7 +54,7 @@ export function validateArgs(parsedArgs) {
50
54
  process.exit(1);
51
55
  }
52
56
  const typedArgs = { ...parsedArgs };
53
- ARG_CONFIGS.forEach((config) => {
57
+ args_config_js_1.ARG_CONFIGS.forEach((config) => {
54
58
  if (typeof config.defaultValue === 'boolean' && parsedArgs[config.name] !== undefined) {
55
59
  const stringValue = parsedArgs[config.name];
56
60
  typedArgs[config.name] = stringValue.toLowerCase() === 'true';
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/monday-api-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "MCP server for using the monday.com API",
5
5
  "license": "MIT",
6
- "type": "module",
7
6
  "bin": {
8
7
  "mcp-server-monday-api": "dist/index.js"
9
8
  },