@intangle/mcp-server 2.5.5 → 2.6.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/.env.local CHANGED
@@ -1,2 +1,3 @@
1
1
  MCP_API_KEY=mcp_placeholder_key_will_be_replaced_by_user_specific_key
2
2
  NEXT_APP_URL=https://intangle.app
3
+ VERCEL_BYPASS_TOKEN=igXBygPO1T5dWLBaVyQiN9QB7IECZ50O
package/dist/index.js CHANGED
@@ -272,9 +272,44 @@ try {
272
272
  const { id, ids } = args;
273
273
  return makeApiCall("fetch", { id, ids });
274
274
  }
275
+ async function handleFetchConversationMessages(args) {
276
+ const { space_id, conversation_id } = args;
277
+ if (!space_id || !conversation_id) {
278
+ throw new Error("space_id and conversation_id are required");
279
+ }
280
+ return makeApiCall("conversation-messages", args);
281
+ }
282
+ async function handleSubscribeConversation(args) {
283
+ const { space_id, conversation_id } = args;
284
+ if (!space_id || !conversation_id) {
285
+ throw new Error("space_id and conversation_id are required");
286
+ }
287
+ return makeApiCall("conversation-subscribe", args);
288
+ }
289
+ async function handleConversationInbox(args) {
290
+ const { space_id } = args;
291
+ if (!space_id) {
292
+ throw new Error("space_id is required");
293
+ }
294
+ return makeApiCall("conversation-inbox", args);
295
+ }
296
+ async function handleMarkConversationRead(args) {
297
+ const { space_id, conversation_id } = args;
298
+ if (!space_id || !conversation_id) {
299
+ throw new Error("space_id and conversation_id are required");
300
+ }
301
+ return makeApiCall("conversation-read", args);
302
+ }
275
303
  async function handleViewSpaces() {
276
304
  return makeApiCall("list-spaces", {});
277
305
  }
306
+ async function handleViewGroups(args) {
307
+ const { space_id } = args;
308
+ if (!space_id) {
309
+ throw new Error("space_id is required. Use view_spaces to see available options.");
310
+ }
311
+ return makeApiCall("view-groups", { space_id });
312
+ }
278
313
  async function handleViewProjects(args) {
279
314
  const { space_id } = args;
280
315
  if (!space_id) {
@@ -287,11 +322,64 @@ try {
287
322
  if (!project_id && !slug) {
288
323
  throw new Error("Either project_id or slug (with space_id) is required. Use view_projects to get valid IDs.");
289
324
  }
290
- if (slug && !space_id) {
291
- throw new Error("space_id is required when using slug. Use view_spaces to see available options.");
325
+ if (!space_id) {
326
+ throw new Error("space_id is required. Use view_spaces to see available options.");
292
327
  }
293
328
  return makeApiCall("view-project", { project_id, space_id, slug });
294
329
  }
330
+ async function handleCreateGroup(args) {
331
+ const { space_id, name } = args;
332
+ if (!space_id || !name) {
333
+ throw new Error("space_id and name are required");
334
+ }
335
+ return makeApiCall("create-group", { space_id, name });
336
+ }
337
+ async function handleRenameGroup(args) {
338
+ const { space_id, group_id, name } = args;
339
+ if (!space_id || !group_id || !name) {
340
+ throw new Error("space_id, group_id, and name are required");
341
+ }
342
+ return makeApiCall("rename-group", { space_id, group_id, name });
343
+ }
344
+ async function handleDeleteGroup(args) {
345
+ const { space_id, group_id } = args;
346
+ if (!space_id || !group_id) {
347
+ throw new Error("space_id and group_id are required");
348
+ }
349
+ return makeApiCall("delete-group", { space_id, group_id });
350
+ }
351
+ async function handleCreateProject(args) {
352
+ const { space_id, name, group_id } = args;
353
+ if (!space_id || !name) {
354
+ throw new Error("space_id and name are required");
355
+ }
356
+ return makeApiCall("create-project", { space_id, name, group_id });
357
+ }
358
+ async function handleRenameProject(args) {
359
+ const { space_id, project_id, name } = args;
360
+ if (!space_id || !project_id || !name) {
361
+ throw new Error("space_id, project_id, and name are required");
362
+ }
363
+ return makeApiCall("rename-project", { space_id, project_id, name });
364
+ }
365
+ async function handleDeleteProject(args) {
366
+ const { space_id, project_id } = args;
367
+ if (!space_id || !project_id) {
368
+ throw new Error("space_id and project_id are required");
369
+ }
370
+ return makeApiCall("delete-project", { space_id, project_id });
371
+ }
372
+ async function handleAssignProjectToGroup(args) {
373
+ const { space_id, project_id, group_id } = args;
374
+ if (!space_id || !project_id) {
375
+ throw new Error("space_id and project_id are required");
376
+ }
377
+ return makeApiCall("assign-project-to-group", {
378
+ space_id,
379
+ project_id,
380
+ group_id,
381
+ });
382
+ }
295
383
  async function handleCreateSpace(args) {
296
384
  return makeApiCall("create-space", args);
297
385
  }
@@ -329,16 +417,39 @@ try {
329
417
  delete: args.delete,
330
418
  });
331
419
  }
420
+ async function handleUpdateFolders(args) {
421
+ if (!args.space_id) {
422
+ throw new Error("space_id is required. Use view_spaces to see available options.");
423
+ }
424
+ const hasOperation = !!args.list ||
425
+ (Array.isArray(args.create) && args.create.length > 0) ||
426
+ (Array.isArray(args.rename) && args.rename.length > 0) ||
427
+ (Array.isArray(args.move_items) && args.move_items.length > 0) ||
428
+ (Array.isArray(args.delete) && args.delete.length > 0);
429
+ if (!hasOperation) {
430
+ throw new Error("At least one operation is required: list, create, rename, move_items, or delete.");
431
+ }
432
+ return makeApiCall("update-folders", {
433
+ space_id: args.space_id,
434
+ list: args.list,
435
+ create: args.create,
436
+ rename: args.rename,
437
+ move_items: args.move_items,
438
+ delete: args.delete,
439
+ });
440
+ }
332
441
  async function handleMessage(args) {
333
442
  if (!args.space_id || !args.content) {
334
443
  throw new Error("space_id and content are required");
335
444
  }
445
+ // Keep one-turn MCP calls safely under common external tool-call deadlines
446
+ // while still allowing caller override for longer jobs.
336
447
  const timeoutMs = typeof args.timeout_ms === "number" && Number.isFinite(args.timeout_ms)
337
448
  ? Math.max(10_000, Math.min(300_000, Math.trunc(args.timeout_ms)))
338
- : undefined;
449
+ : 100_000;
339
450
  // Give backend a little extra headroom beyond requested assistant timeout.
340
- const requestTimeout = timeoutMs ? timeoutMs + 10_000 : undefined;
341
- return makeApiCall("message", args, requestTimeout);
451
+ const requestTimeout = timeoutMs + 10_000;
452
+ return makeApiCall("message", { ...args, timeout_ms: timeoutMs }, requestTimeout);
342
453
  }
343
454
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
344
455
  const { name, arguments: args } = request.params;
@@ -351,16 +462,51 @@ try {
351
462
  case "fetch_items":
352
463
  result = await handleFetch(args);
353
464
  break;
465
+ case "fetch_conversation_messages":
466
+ result = await handleFetchConversationMessages(args);
467
+ break;
468
+ case "subscribe_conversation":
469
+ result = await handleSubscribeConversation(args);
470
+ break;
471
+ case "list_conversation_inbox":
472
+ result = await handleConversationInbox(args);
473
+ break;
474
+ case "mark_conversation_read":
475
+ result = await handleMarkConversationRead(args);
476
+ break;
354
477
  case "view_spaces":
355
478
  result = await handleViewSpaces();
356
479
  break;
357
- // PROJECTS DISABLED - Projects have been disabled. May be re-enabled later.
358
- // case "view_projects":
359
- // result = await handleViewProjects(args)
360
- // break
361
- // case "view_project":
362
- // result = await handleViewProject(args)
363
- // break
480
+ case "view_groups":
481
+ result = await handleViewGroups(args);
482
+ break;
483
+ case "create_group":
484
+ result = await handleCreateGroup(args);
485
+ break;
486
+ case "rename_group":
487
+ result = await handleRenameGroup(args);
488
+ break;
489
+ case "delete_group":
490
+ result = await handleDeleteGroup(args);
491
+ break;
492
+ case "view_projects":
493
+ result = await handleViewProjects(args);
494
+ break;
495
+ case "view_project":
496
+ result = await handleViewProject(args);
497
+ break;
498
+ case "create_project":
499
+ result = await handleCreateProject(args);
500
+ break;
501
+ case "rename_project":
502
+ result = await handleRenameProject(args);
503
+ break;
504
+ case "delete_project":
505
+ result = await handleDeleteProject(args);
506
+ break;
507
+ case "assign_project_to_group":
508
+ result = await handleAssignProjectToGroup(args);
509
+ break;
364
510
  case "create_space":
365
511
  result = await handleCreateSpace(args);
366
512
  break;
@@ -374,6 +520,9 @@ try {
374
520
  case "update_space":
375
521
  result = await handleUpdateSpace(args);
376
522
  break;
523
+ case "update_folders":
524
+ result = await handleUpdateFolders(args);
525
+ break;
377
526
  case "message":
378
527
  result = await handleMessage(args);
379
528
  break;