Skip to main content
Glama
loggerConfig.js497 B
// Redirect console.log and console.error to stderr to avoid interfering with MCP protocol messages // MCP uses stdout for protocol communication const originalConsoleLog = console.log; const originalConsoleError = console.error; export function configureLogger() { console.log = function() { process.stderr.write("[INFO] " + Array.from(arguments).join(" ") + "\n"); }; console.error = function() { process.stderr.write("[ERROR] " + Array.from(arguments).join(" ") + "\n"); }; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/idoru/influxdb-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server