From 305b593698651d24b8f105c1e4bdf2401073de7a Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 12 Jul 2026 17:43:37 -0400 Subject: [PATCH] x --- apps/mcp-server/index.ts | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/apps/mcp-server/index.ts b/apps/mcp-server/index.ts index 62a303b..48a5bb9 100644 --- a/apps/mcp-server/index.ts +++ b/apps/mcp-server/index.ts @@ -66,11 +66,18 @@ server.setRequestHandler(ListToolsRequestSchema, async () => { tools: [ { name: "set_target_environment", - description: "Switch the target environment for the MCP server (local or production)", + description: "Switch the target environment for the MCP server (local or production). You can also pass a customUrl to test a specific project.", inputSchema: { type: "object", properties: { - env: { type: "string", enum: ["local", "production"] } + env: { + type: "string", + enum: ["local", "production"] + }, + customUrl: { + type: "string", + description: "Optional custom URL to use for the API (e.g., https://api.pkh.kitizone.com/api)" + } }, required: ["env"] } @@ -815,7 +822,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { switch (request.params.name) { case "set_target_environment": { const env = params.env; - if (env === "production") { + const customUrl = params.customUrl; + + if (customUrl) { + BACKEND_URL = customUrl; + } else if (env === "production") { BACKEND_URL = PRODUCTION_BACKEND_URL; } else { BACKEND_URL = LOCAL_BACKEND_URL;