@insforge/mcp 1.1.7-dev.20 → 1.1.7-dev.22

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.
@@ -854,8 +854,8 @@ function registerInsforgeTools(server, config = {}) {
854
854
  "fetch-docs",
855
855
  'Fetch Insforge documentation. Use "instructions" for essential backend setup (MANDATORY FIRST), or select specific SDK docs for database, auth, storage, functions, or AI integration.',
856
856
  {
857
- docType: z14.enum(["instructions", "db-sdk", "storage-sdk", "functions-sdk", "ai-integration-sdk", "auth-components-react", "auth-components-react-router"]).describe(
858
- '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),'
857
+ docType: z14.enum(["instructions", "db-sdk", "storage-sdk", "functions-sdk", "ai-integration-sdk", "auth-components-react"]).describe(
858
+ '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),'
859
859
  )
860
860
  },
861
861
  withUsageTracking("fetch-docs", async ({ docType }) => {
@@ -1058,9 +1058,10 @@ ${JSON.stringify(metadata, null, 2)}`
1058
1058
  "CRITICAL: MANDATORY FIRST STEP for all new InsForge projects. Download pre-configured starter template (React/Next.js/React Router). ALWAYS use this tool BEFORE any other setup when starting a new project.",
1059
1059
  {
1060
1060
  frame: z14.enum(["react"]).describe("Framework to use for the template (currently only React is supported)"),
1061
- projectName: z14.string().optional().describe('Name for the project directory (optional, defaults to "insforge-react")')
1061
+ projectName: z14.string().optional().describe('Name for the project directory (optional, defaults to "insforge-react")'),
1062
+ workingDirectory: z14.string().optional().describe("Working directory path where project should be created")
1062
1063
  },
1063
- withUsageTracking("download-template", async ({ frame, projectName }) => {
1064
+ withUsageTracking("download-template", async ({ frame, projectName, workingDirectory }) => {
1064
1065
  try {
1065
1066
  const response = await fetch2(`${API_BASE_URL}/api/auth/tokens/anon`, {
1066
1067
  method: "POST",
@@ -1075,23 +1076,27 @@ ${JSON.stringify(metadata, null, 2)}`
1075
1076
  throw new Error("Failed to retrieve anon key from backend");
1076
1077
  }
1077
1078
  const targetDir = projectName || `insforge-${frame}`;
1079
+ const cwd = workingDirectory || process.cwd();
1078
1080
  const command = `npx create-insforge-app ${targetDir} --frame ${frame} --base-url ${API_BASE_URL} --anon-key ${anonKey}`;
1079
1081
  const { stdout, stderr } = await execAsync(command, {
1080
- maxBuffer: 10 * 1024 * 1024
1082
+ maxBuffer: 10 * 1024 * 1024,
1081
1083
  // 10MB buffer
1084
+ cwd
1082
1085
  });
1083
1086
  const output = stdout || stderr || "";
1084
1087
  if (output.toLowerCase().includes("error") && !output.includes("successfully")) {
1085
1088
  throw new Error(`Failed to download template: ${output}`);
1086
1089
  }
1090
+ const fullPath = `${cwd}/${targetDir}`;
1087
1091
  return {
1088
1092
  content: [
1089
1093
  {
1090
1094
  type: "text",
1091
1095
  text: formatSuccessMessage(
1092
- `React template downloaded to ${targetDir}`,
1096
+ `React template created successfully`,
1093
1097
  {
1094
- targetDir,
1098
+ projectName: targetDir,
1099
+ location: fullPath,
1095
1100
  baseUrl: API_BASE_URL,
1096
1101
  nextSteps: [
1097
1102
  `cd ${targetDir}`,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  registerInsforgeTools
4
- } from "./chunk-OLIGYXLN.js";
4
+ } from "./chunk-UVGZW3SJ.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-OLIGYXLN.js";
4
+ } from "./chunk-UVGZW3SJ.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.20",
3
+ "version": "1.1.7-dev.22",
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",