UNPKG

comfyui-mcp

Version:

Local-first, agent-native control plane for ComfyUI — MCP server + autonomous sidebar agent that drives your live graph in natural language on ANY LLM: Claude/ChatGPT/Gemini on your subscription (no API key), free local models via Ollama (fully offline),

22 lines • 845 B
// Logs to stderr only — critical for MCP stdio transport const LOG_LEVELS = { debug: 0, info: 1, warn: 2, error: 3 }; const currentLevel = process.env.LOG_LEVEL || "info"; function shouldLog(level) { return LOG_LEVELS[level] >= LOG_LEVELS[currentLevel]; } function log(level, message, data) { if (!shouldLog(level)) return; const ts = new Date().toISOString(); const line = data ? `[${ts}] [${level.toUpperCase()}] ${message} ${JSON.stringify(data)}` : `[${ts}] [${level.toUpperCase()}] ${message}`; process.stderr.write(line + "\n"); } export const logger = { debug: (msg, data) => log("debug", msg, data), info: (msg, data) => log("info", msg, data), warn: (msg, data) => log("warn", msg, data), error: (msg, data) => log("error", msg, data), }; //# sourceMappingURL=logger.js.map