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"], }, });