@insforge/mcp 1.1.7-dev.25 → 1.1.7-dev.27

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.
@@ -855,8 +855,8 @@ function registerInsforgeTools(server, config = {}) {
855
855
  "fetch-docs",
856
856
  'Fetch Insforge documentation. Use "instructions" for essential backend setup (MANDATORY FIRST), or select specific SDK docs for database, auth, storage, functions, or AI integration.',
857
857
  {
858
- docType: z14.enum(["instructions", "db-sdk", "storage-sdk", "functions-sdk", "ai-integration-sdk", "auth-components-react", "auth-components-react-router"]).describe(
859
- 'Documentation type: "instructions" (essential backend setup - use FIRST), "db-sdk" (database operations), "storage-sdk" (file storage), "functions-sdk" (edge functions), "ai-integration-sdk" (AI features), "auth-components-react" (authentication components for React+Vite applications), "auth-components-react-router" (authentication components for React + React Router applications),'
858
+ docType: z14.enum(["instructions", "db-sdk", "storage-sdk", "functions-sdk", "ai-integration-sdk", "auth-components-react"]).describe(
859
+ 'Documentation type: "instructions" (essential backend setup - use FIRST), "db-sdk" (database operations), "storage-sdk" (file storage), "functions-sdk" (edge functions), "ai-integration-sdk" (AI features), "auth-components-react" (authentication components for React+Vite applications,'
860
860
  )
861
861
  },
862
862
  withUsageTracking("fetch-docs", async ({ docType }) => {
@@ -1075,9 +1075,18 @@ ${JSON.stringify(metadata, null, 2)}`
1075
1075
  if (!anonKey) {
1076
1076
  throw new Error("Failed to retrieve anon key from backend");
1077
1077
  }
1078
- const tempDir = await fs.mkdtemp(`${tmpdir()}/insforge-`);
1078
+ const tempDir = tmpdir();
1079
1079
  const targetDir = projectName || `insforge-${frame}`;
1080
- console.error(`[download-template] Downloading to temp: ${tempDir}`);
1080
+ const templatePath = `${tempDir}/${targetDir}`;
1081
+ console.error(`[download-template] Target path: ${templatePath}`);
1082
+ try {
1083
+ const stats = await fs.stat(templatePath);
1084
+ if (stats.isDirectory()) {
1085
+ console.error(`[download-template] Removing existing template at ${templatePath}`);
1086
+ await fs.rm(templatePath, { recursive: true, force: true });
1087
+ }
1088
+ } catch (error) {
1089
+ }
1081
1090
  const command = `npx create-insforge-app ${targetDir} --frame ${frame} --base-url ${API_BASE_URL} --anon-key ${anonKey}`;
1082
1091
  const { stdout, stderr } = await execAsync(command, {
1083
1092
  maxBuffer: 10 * 1024 * 1024,
@@ -1088,28 +1097,22 @@ ${JSON.stringify(metadata, null, 2)}`
1088
1097
  if (output.toLowerCase().includes("error") && !output.includes("successfully")) {
1089
1098
  throw new Error(`Failed to download template: ${output}`);
1090
1099
  }
1091
- const templatePath = `${tempDir}/${targetDir}`;
1092
1100
  return {
1093
1101
  content: [
1094
1102
  {
1095
1103
  type: "text",
1096
- text: formatSuccessMessage(
1097
- `React template downloaded to temporary directory`,
1098
- {
1099
- projectName: targetDir,
1100
- tempLocation: templatePath,
1101
- baseUrl: API_BASE_URL,
1102
- criticalNextStep: [
1103
- `IMPORTANT: The template is in a temporary directory. Run this command to copy it to your current directory:`,
1104
- ``,
1105
- `cp -r ${templatePath}/* . && cp -r ${templatePath}/.* . 2>/dev/null || true`,
1106
- ``,
1107
- `Then proceed with:`,
1108
- `npm install`,
1109
- `npm run dev`
1110
- ]
1111
- }
1112
- )
1104
+ text: `\u2705 React template downloaded successfully
1105
+
1106
+ \u{1F4C1} Template Location: ${templatePath}
1107
+
1108
+ \u26A0\uFE0F IMPORTANT: The template is in a temporary directory and NOT in your current working directory.
1109
+
1110
+ \u{1F534} CRITICAL NEXT STEP REQUIRED:
1111
+ You MUST copy ALL files (INCLUDING HIDDEN FILES like .env, .gitignore, etc.) from the temporary directory to your current project directory.
1112
+
1113
+ Copy all files from: ${templatePath}
1114
+ To: Your current project directory
1115
+ `
1113
1116
  }
1114
1117
  ]
1115
1118
  };
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerInsforgeTools
4
- } from "./chunk-P67C663Y.js";
4
+ } from "./chunk-MIGS7PIQ.js";
5
5
 
6
6
  // src/http/server.ts
7
7
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerInsforgeTools
4
- } from "./chunk-P67C663Y.js";
4
+ } from "./chunk-MIGS7PIQ.js";
5
5
 
6
6
  // src/stdio/index.ts
7
7
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@insforge/mcp",
3
- "version": "1.1.7-dev.25",
3
+ "version": "1.1.7-dev.27",
4
4
  "description": "MCP (Model Context Protocol) server for Insforge backend-as-a-service",
5
5
  "mcpName": "io.github.InsForge/insforge-mcp",
6
6
  "type": "module",