This commit is contained in:
Your Name committed 2026-07-12 17:43:37 -04:00
1 parent 7449db058a
commit 305b593698
1 file changed
+14 -3
+14 -3
View File
@@ -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;