@kadoa/mcp 0.3.5 → 0.3.6-rc.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.
Files changed (2) hide show
  1. package/dist/index.js +82 -29
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -49304,16 +49304,28 @@ function registerTools(server, ctx) {
49304
49304
  entity: exports_external.string().optional().describe("Entity name for extraction (e.g., 'Product', 'Job Posting')"),
49305
49305
  schema: exports_external.preprocess(coerceArray(), exports_external.array(exports_external.object(SchemaFieldShape))).optional().describe("Extraction schema fields. If omitted, the AI agent auto-detects the schema.")
49306
49306
  };
49307
+ const webhookAuthShape = exports_external.object({
49308
+ type: exports_external.enum(["bearer", "basic", "header"]).describe("Authentication type"),
49309
+ token: exports_external.string().optional().describe("Bearer token (required for 'bearer' type)"),
49310
+ username: exports_external.string().optional().describe("Username (required for 'basic' type)"),
49311
+ password: exports_external.string().optional().describe("Password (required for 'basic' type)"),
49312
+ headers: exports_external.object({}).passthrough().optional().describe("Custom headers as key-value pairs (required for 'header' type)")
49313
+ }).optional().describe("Authentication configuration for the webhook endpoint");
49307
49314
  const notificationsInputShape = {
49308
49315
  notifications: exports_external.object({
49309
- email: exports_external.boolean().optional().describe("Send email notifications to the account email when data changes"),
49316
+ email: exports_external.object({
49317
+ recipients: exports_external.array(exports_external.string().email()).optional().describe("Email addresses to notify. Omit to use account default email.")
49318
+ }).optional().describe("Send email notifications. Pass {} for account default email, or {recipients: [...]} for custom addresses."),
49310
49319
  webhook: exports_external.object({
49311
49320
  url: exports_external.string().url().describe("Webhook endpoint URL"),
49312
- httpMethod: exports_external.enum(["POST", "GET", "PUT", "PATCH"]).optional().describe("HTTP method (defaults to POST)")
49321
+ httpMethod: exports_external.enum(["POST", "GET", "PUT", "PATCH"]).optional().describe("HTTP method (defaults to POST)"),
49322
+ auth: webhookAuthShape
49313
49323
  }).optional().describe("Send notifications via HTTP webhook"),
49314
49324
  slack: exports_external.object({
49315
- webhookUrl: exports_external.string().url().describe("Slack incoming webhook URL")
49316
- }).optional().describe("Send notifications to a Slack channel"),
49325
+ webhookUrl: exports_external.string().url().optional().describe("Slack incoming webhook URL (legacy)"),
49326
+ slackChannelId: exports_external.string().optional().describe("Slack channel ID from OAuth integration (e.g. C01ABCDEF)"),
49327
+ slackChannelName: exports_external.string().optional().describe("Slack channel name (e.g. #alerts)")
49328
+ }).optional().describe("Send notifications to a Slack channel. Use slackChannelId/slackChannelName for OAuth integration, or webhookUrl for legacy incoming webhooks."),
49317
49329
  websocket: exports_external.boolean().optional().describe("Enable WebSocket notifications for programmatic real-time consumption")
49318
49330
  }).optional().describe("Notification channels to alert when data changes.")
49319
49331
  };
@@ -49334,22 +49346,34 @@ function registerTools(server, ctx) {
49334
49346
  }
49335
49347
  function buildNotificationChannels(n) {
49336
49348
  const channels = {};
49337
- if (n.email)
49338
- channels.EMAIL = true;
49349
+ if (n.email) {
49350
+ if (typeof n.email === "object" && n.email.recipients?.length) {
49351
+ channels.EMAIL = { name: "mcp-email", recipients: n.email.recipients };
49352
+ } else {
49353
+ channels.EMAIL = true;
49354
+ }
49355
+ }
49339
49356
  if (n.websocket)
49340
49357
  channels.WEBSOCKET = true;
49341
49358
  if (n.webhook) {
49342
- channels.WEBHOOK = {
49359
+ const webhookChannel = {
49343
49360
  name: "mcp-webhook",
49344
49361
  webhookUrl: n.webhook.url,
49345
49362
  httpMethod: n.webhook.httpMethod || "POST"
49346
49363
  };
49364
+ if (n.webhook.auth)
49365
+ webhookChannel.auth = n.webhook.auth;
49366
+ channels.WEBHOOK = webhookChannel;
49347
49367
  }
49348
49368
  if (n.slack) {
49349
- channels.SLACK = {
49350
- name: "mcp-slack",
49351
- webhookUrl: n.slack.webhookUrl
49352
- };
49369
+ const slackChannel = { name: "mcp-slack" };
49370
+ if (n.slack.webhookUrl)
49371
+ slackChannel.webhookUrl = n.slack.webhookUrl;
49372
+ if (n.slack.slackChannelId)
49373
+ slackChannel.slackChannelId = n.slack.slackChannelId;
49374
+ if (n.slack.slackChannelName)
49375
+ slackChannel.slackChannelName = n.slack.slackChannelName;
49376
+ channels.SLACK = slackChannel;
49353
49377
  }
49354
49378
  return channels;
49355
49379
  }
@@ -49358,11 +49382,17 @@ function registerTools(server, ctx) {
49358
49382
  return [];
49359
49383
  const channels = [];
49360
49384
  if (n.email) {
49361
- const user = await ctx.client.user.getCurrentUser();
49362
- channels.push(`email (${user.email})`);
49385
+ if (typeof n.email === "object" && n.email.recipients?.length) {
49386
+ channels.push(`email (${n.email.recipients.join(", ")})`);
49387
+ } else {
49388
+ const user = await ctx.client.user.getCurrentUser();
49389
+ channels.push(`email (${user.email})`);
49390
+ }
49391
+ }
49392
+ if (n.slack) {
49393
+ const slackDesc = n.slack.slackChannelName || n.slack.slackChannelId || n.slack.webhookUrl || "default";
49394
+ channels.push(`slack (${slackDesc})`);
49363
49395
  }
49364
- if (n.slack)
49365
- channels.push(`slack (${n.slack.webhookUrl})`);
49366
49396
  if (n.webhook)
49367
49397
  channels.push(`webhook (${n.webhook.url})`);
49368
49398
  if (n.websocket)
@@ -49697,15 +49727,24 @@ function registerTools(server, ctx) {
49697
49727
  });
49698
49728
  }));
49699
49729
  server.registerTool("create_notification_channel", {
49700
- description: "Create a notification channel (email, webhook, or slack). The channel can then be linked to notification settings for specific events.",
49730
+ description: "Create a notification channel (email, webhook, slack, or websocket). The channel can then be linked to notification settings for specific events. " + "For SLACK: use slackChannelId + slackChannelName for OAuth integration, or webhookUrl for legacy incoming webhooks. " + "For WEBHOOK: auth is optional and supports bearer, basic, or header authentication.",
49701
49731
  inputSchema: {
49702
- channelType: exports_external.enum(["EMAIL", "WEBHOOK", "SLACK"]).describe("Type of notification channel"),
49732
+ channelType: exports_external.enum(["EMAIL", "WEBHOOK", "SLACK", "WEBSOCKET"]).describe("Type of notification channel"),
49703
49733
  name: exports_external.string().optional().describe("Name for the channel (defaults to 'default')"),
49704
49734
  config: exports_external.object({
49705
49735
  recipients: exports_external.array(exports_external.string()).optional().describe("Email recipients (required for EMAIL channels)"),
49706
- webhookUrl: exports_external.string().optional().describe("Webhook/Slack endpoint URL (required for WEBHOOK and SLACK channels)"),
49707
- httpMethod: exports_external.enum(["POST", "GET", "PUT", "PATCH"]).optional().describe("HTTP method for WEBHOOK channels (defaults to POST)")
49708
- }).optional().describe("Channel-specific configuration. For EMAIL: provide recipients. For WEBHOOK: provide webhookUrl. For SLACK: provide webhookUrl.")
49736
+ webhookUrl: exports_external.string().optional().describe("Webhook/Slack endpoint URL (required for WEBHOOK, optional for SLACK)"),
49737
+ httpMethod: exports_external.enum(["POST", "GET", "PUT", "PATCH"]).optional().describe("HTTP method for WEBHOOK channels (defaults to POST)"),
49738
+ slackChannelId: exports_external.string().optional().describe("Slack channel ID from OAuth integration (for SLACK channels, e.g. C01ABCDEF)"),
49739
+ slackChannelName: exports_external.string().optional().describe("Slack channel name (for SLACK channels, e.g. #alerts)"),
49740
+ auth: exports_external.object({
49741
+ type: exports_external.enum(["bearer", "basic", "header"]).describe("Authentication type"),
49742
+ token: exports_external.string().optional().describe("Bearer token (for 'bearer' type)"),
49743
+ username: exports_external.string().optional().describe("Username (for 'basic' type)"),
49744
+ password: exports_external.string().optional().describe("Password (for 'basic' type)"),
49745
+ headers: exports_external.object({}).passthrough().optional().describe("Custom headers as key-value pairs (for 'header' type)")
49746
+ }).optional().describe("Authentication for WEBHOOK channels")
49747
+ }).optional().describe("Channel-specific configuration. " + "EMAIL: provide recipients. " + "WEBHOOK: provide webhookUrl, httpMethod, and optionally auth. " + "SLACK: provide slackChannelId + slackChannelName (OAuth) or webhookUrl (legacy). " + "WEBSOCKET: no config needed.")
49709
49748
  },
49710
49749
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false }
49711
49750
  }, withErrorHandling("create_notification_channel", async (args) => {
@@ -49755,6 +49794,10 @@ function registerTools(server, ctx) {
49755
49794
  "workflow_failed",
49756
49795
  "workflow_sample_finished",
49757
49796
  "workflow_data_change",
49797
+ "workflow_validation_anomaly_change",
49798
+ "workflow_export_completed",
49799
+ "workflow_health_degraded",
49800
+ "workflow_recovered",
49758
49801
  "system_maintenance",
49759
49802
  "service_degradation",
49760
49803
  "credits_low",
@@ -49785,18 +49828,21 @@ function registerTools(server, ctx) {
49785
49828
  description: "Set up notifications for a workflow or workspace. Creates channels and settings in one step. " + "Specify which events to listen for and which channels to deliver to (email, webhook, slack, websocket).",
49786
49829
  inputSchema: {
49787
49830
  workflowId: exports_external.string().optional().describe("Workflow ID to configure notifications for. Omit for workspace-level notifications."),
49788
- events: exports_external.array(exports_external.string()).describe('Event types to notify on. Pass ["all"] for all events, or pick from: ' + "workflow_started, workflow_finished, workflow_failed, workflow_sample_finished, " + "workflow_data_change, system_maintenance, service_degradation, credits_low, free_trial_ending"),
49831
+ events: exports_external.array(exports_external.string()).describe('Event types to notify on. Pass ["all"] for all events, or pick from: ' + "workflow_started, workflow_finished, workflow_failed, workflow_sample_finished, " + "workflow_data_change, workflow_validation_anomaly_change, workflow_export_completed, " + "workflow_health_degraded, workflow_recovered, " + "system_maintenance, service_degradation, credits_low, free_trial_ending"),
49789
49832
  channels: exports_external.object({
49790
49833
  email: exports_external.object({
49791
49834
  recipients: exports_external.array(exports_external.string().email()).optional().describe("Email addresses to notify. Omit to use the account default email.")
49792
49835
  }).optional().describe("Send email notifications. Pass {} for default email or {recipients: [...]} for custom addresses."),
49793
49836
  webhook: exports_external.object({
49794
49837
  url: exports_external.string().url().describe("Webhook endpoint URL"),
49795
- httpMethod: exports_external.enum(["POST", "GET", "PUT", "PATCH"]).optional().describe("HTTP method (defaults to POST)")
49838
+ httpMethod: exports_external.enum(["POST", "GET", "PUT", "PATCH"]).optional().describe("HTTP method (defaults to POST)"),
49839
+ auth: webhookAuthShape
49796
49840
  }).optional().describe("Send via HTTP webhook"),
49797
49841
  slack: exports_external.object({
49798
- webhookUrl: exports_external.string().url().describe("Slack incoming webhook URL")
49799
- }).optional().describe("Send to Slack channel"),
49842
+ webhookUrl: exports_external.string().url().optional().describe("Slack incoming webhook URL (legacy)"),
49843
+ slackChannelId: exports_external.string().optional().describe("Slack channel ID from OAuth integration (e.g. C01ABCDEF)"),
49844
+ slackChannelName: exports_external.string().optional().describe("Slack channel name (e.g. #alerts)")
49845
+ }).optional().describe("Send to Slack channel. Use slackChannelId/slackChannelName for OAuth integration, or webhookUrl for legacy incoming webhooks."),
49800
49846
  websocket: exports_external.boolean().optional().describe("Enable WebSocket notifications")
49801
49847
  }).describe("At least one channel must be specified")
49802
49848
  },
@@ -49815,17 +49861,24 @@ function registerTools(server, ctx) {
49815
49861
  if (ch.websocket)
49816
49862
  channelSetup.WEBSOCKET = true;
49817
49863
  if (ch.webhook) {
49818
- channelSetup.WEBHOOK = {
49864
+ const webhookChannel = {
49819
49865
  name: "mcp-webhook",
49820
49866
  webhookUrl: ch.webhook.url,
49821
49867
  httpMethod: ch.webhook.httpMethod || "POST"
49822
49868
  };
49869
+ if (ch.webhook.auth)
49870
+ webhookChannel.auth = ch.webhook.auth;
49871
+ channelSetup.WEBHOOK = webhookChannel;
49823
49872
  }
49824
49873
  if (ch.slack) {
49825
- channelSetup.SLACK = {
49826
- name: "mcp-slack",
49827
- webhookUrl: ch.slack.webhookUrl
49828
- };
49874
+ const slackChannel = { name: "mcp-slack" };
49875
+ if (ch.slack.webhookUrl)
49876
+ slackChannel.webhookUrl = ch.slack.webhookUrl;
49877
+ if (ch.slack.slackChannelId)
49878
+ slackChannel.slackChannelId = ch.slack.slackChannelId;
49879
+ if (ch.slack.slackChannelName)
49880
+ slackChannel.slackChannelName = ch.slack.slackChannelName;
49881
+ channelSetup.SLACK = slackChannel;
49829
49882
  }
49830
49883
  if (Object.keys(channelSetup).length === 0) {
49831
49884
  return errorResult("At least one notification channel must be specified (email, webhook, slack, or websocket).");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kadoa/mcp",
3
- "version": "0.3.5",
3
+ "version": "0.3.6-rc.0",
4
4
  "description": "Kadoa MCP Server — manage workflows from Claude Desktop, Cursor, and other MCP clients",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",