@kadoa/mcp 0.3.5 → 0.3.6-rc.1

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 +18 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -49219,7 +49219,7 @@ function classifyError(error48) {
49219
49219
  switch (code) {
49220
49220
  case "AUTH_ERROR":
49221
49221
  if (httpError.httpStatus === 403) {
49222
- return `Access denied${status}. Your current team role may not have permission for this action. Use the team_list tool to check your role, or contact your team admin to request write access.`;
49222
+ return `Access denied${status}. Your current team role may not have permission for this action. Use the whoami tool to check your role, or contact your team admin to request elevated access.`;
49223
49223
  }
49224
49224
  return `Authentication failed${status}. Your Kadoa API key may be invalid or expired. Please check your KADOA_API_KEY or re-authenticate.`;
49225
49225
  case "NOT_FOUND":
@@ -49267,7 +49267,19 @@ function registerTools(server, ctx) {
49267
49267
  await getValidJwt(ctx);
49268
49268
  return await handler(...args);
49269
49269
  } catch (error48) {
49270
- const message = classifyError(error48);
49270
+ let message = classifyError(error48);
49271
+ if (KadoaHttpException.isInstance(error48) && error48.httpStatus === 403) {
49272
+ try {
49273
+ const jwt2 = ctx.supabaseJwt;
49274
+ const teams = await ctx.client.listTeams(jwt2 ? { bearerToken: jwt2 } : undefined);
49275
+ const config2 = loadConfig2();
49276
+ const activeTeamId = ctx.teamId ?? config2.teamId ?? teams[0]?.id;
49277
+ const activeTeam = teams.find((t) => t.id === activeTeamId);
49278
+ if (activeTeam?.adminEmail) {
49279
+ message += ` Your team admin is ${activeTeam.adminEmail}.`;
49280
+ }
49281
+ } catch {}
49282
+ }
49271
49283
  console.error(`[Tool Error] ${name}:`, error48);
49272
49284
  return errorResult(message);
49273
49285
  }
@@ -49289,7 +49301,8 @@ function registerTools(server, ctx) {
49289
49301
  authMethod,
49290
49302
  teams: teams.map((t) => ({
49291
49303
  name: t.name,
49292
- role: t.role,
49304
+ memberRole: t.memberRole,
49305
+ ...t.adminEmail ? { adminEmail: t.adminEmail } : {},
49293
49306
  ...t.id === activeTeamId ? { active: true } : {}
49294
49307
  }))
49295
49308
  });
@@ -49882,7 +49895,8 @@ function registerTools(server, ctx) {
49882
49895
  teams: teams.map((t) => ({
49883
49896
  id: t.id,
49884
49897
  name: t.name,
49885
- role: t.role,
49898
+ memberRole: t.memberRole,
49899
+ ...t.adminEmail ? { adminEmail: t.adminEmail } : {},
49886
49900
  active: t.id === activeTeamId
49887
49901
  })),
49888
49902
  activeTeamId
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.1",
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",