@aithr-ai/mcp-server 1.0.2 → 1.0.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.
Files changed (2) hide show
  1. package/index.js +11 -11
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1078,22 +1078,22 @@ class MCPServer {
1078
1078
  }
1079
1079
 
1080
1080
  try {
1081
- // First get all nodes
1082
- const data = await this.apiCall(`/workspaces/${config.workspaceSlug}/projects/${projectId}/canvas`);
1083
- const nodes = data.nodes || [];
1081
+ // First get all nodes using MCP API
1082
+ const data = await this.mcpApiCall(`/mcp/projects/${projectId}/canvas`);
1083
+ const nodes = data.canvas?.nodes || [];
1084
1084
 
1085
1085
  if (nodes.length === 0) {
1086
1086
  return { message: 'Canvas is already empty', deletedCount: 0 };
1087
1087
  }
1088
1088
 
1089
- // Delete each node
1089
+ // Delete each node using MCP API
1090
1090
  const deleted = [];
1091
1091
  const failed = [];
1092
1092
 
1093
1093
  for (const node of nodes) {
1094
1094
  try {
1095
- await this.apiCall(
1096
- `/workspaces/${config.workspaceSlug}/projects/${projectId}/canvas/nodes/${node.id}`,
1095
+ await this.mcpApiCall(
1096
+ `/mcp/projects/${projectId}/canvas/nodes/${node.id}`,
1097
1097
  'DELETE'
1098
1098
  );
1099
1099
  deleted.push(node.id);
@@ -1146,12 +1146,12 @@ class MCPServer {
1146
1146
  };
1147
1147
 
1148
1148
  try {
1149
- const result = await this.apiCall(
1150
- `/workspaces/${config.workspaceSlug}/projects/${projectId}/canvas/nodes`,
1149
+ const result = await this.mcpApiCall(
1150
+ `/mcp/projects/${projectId}/canvas/nodes`,
1151
1151
  'POST',
1152
1152
  nodeData
1153
1153
  );
1154
- return { success: true, nodeId: result.id, message: `Added ${agentType} agent`, node: result };
1154
+ return { success: true, nodeId: result.nodeId || result.node?.id, message: `Added ${agentType} agent`, node: result.node };
1155
1155
  } catch (e) {
1156
1156
  // Check if it's a tier restriction
1157
1157
  if (e.message.includes('403') || e.message.includes('Pro tier')) {
@@ -1170,8 +1170,8 @@ class MCPServer {
1170
1170
  const projectId = config.projectId;
1171
1171
 
1172
1172
  try {
1173
- await this.apiCall(
1174
- `/workspaces/${config.workspaceSlug}/projects/${projectId}/canvas/nodes/${nodeId}`,
1173
+ await this.mcpApiCall(
1174
+ `/mcp/projects/${projectId}/canvas/nodes/${nodeId}`,
1175
1175
  'DELETE'
1176
1176
  );
1177
1177
  return { success: true, message: `Removed node ${nodeId}` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aithr-ai/mcp-server",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "MCP server to connect Claude Code to Aether canvas - AI-powered team workspace for software development",
5
5
  "main": "index.js",
6
6
  "bin": {