From b67e6abdd5c2642b5c58114a91cad8780b15fff4 Mon Sep 17 00:00:00 2001 From: Dominik Jain Date: Mon, 12 Jan 2026 20:17:17 +0100 Subject: [PATCH] Use more specific environment variable names * VITE_ALLOWED_HOSTS -> PENPOT_MCP_PLUGIN_SERVER_ALLOWED_HOSTS * VITE_MCP_WS_URL -> PENPOT_MCP_WEBSOCKET_URL --- penpot-plugin/src/main.ts | 2 +- penpot-plugin/vite.config.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/penpot-plugin/src/main.ts b/penpot-plugin/src/main.ts index fe28cd1..2a44977 100644 --- a/penpot-plugin/src/main.ts +++ b/penpot-plugin/src/main.ts @@ -43,7 +43,7 @@ function connectToMcpServer(): void { try { // Use environment variable for MCP WebSocket URL, fallback to localhost for local development - const mcpWsUrl = import.meta.env.VITE_MCP_WS_URL || "ws://localhost:4402"; + const mcpWsUrl = import.meta.env.PENPOT_MCP_WEBSOCKET_URL || "ws://localhost:4402"; ws = new WebSocket(mcpWsUrl); updateConnectionStatus("Connecting...", false); diff --git a/penpot-plugin/vite.config.ts b/penpot-plugin/vite.config.ts index 3607bf2..1807e12 100644 --- a/penpot-plugin/vite.config.ts +++ b/penpot-plugin/vite.config.ts @@ -26,8 +26,8 @@ export default defineConfig({ preview: { port: 4400, cors: true, - allowedHosts: process.env.VITE_ALLOWED_HOSTS - ? process.env.VITE_ALLOWED_HOSTS.split(",").map((h) => h.trim()) + allowedHosts: process.env.PENPOT_MCP_PLUGIN_SERVER_ALLOWED_HOSTS + ? process.env.PENPOT_MCP_PLUGIN_SERVER_ALLOWED_HOSTS.split(",").map((h) => h.trim()) : ["localhost", "0.0.0.0"], }, });