UNPKG

@pluggedin/pluggedin-mcp-proxy

Version:

Unified MCP proxy that aggregates all your MCP servers (STDIO, SSE, Streamable HTTP) into one powerful interface. Access any tool through a single connection, search across unified documents with built-in RAG, and receive notifications from any model. Tes

28 lines (27 loc) 946 B
/** * Debug logging utility that only outputs when not using STDIO transport * This prevents console output from interfering with the STDIO protocol */ const isStdioTransport = () => { // Check if we're running with STDIO transport (default) or another transport // We can detect this by checking if the --transport flag was set to something other than stdio const args = process.argv.slice(2); const transportIndex = args.findIndex(arg => arg === '--transport'); if (transportIndex === -1) { // No --transport flag means default (stdio) return true; } const transportType = args[transportIndex + 1]; return !transportType || transportType === 'stdio'; }; const useStdio = isStdioTransport(); export const debugLog = (...args) => { if (!useStdio) { console.log(...args); } }; export const debugError = (...args) => { if (!useStdio) { console.error(...args); } };