loading…
Search for a command to run...
loading…
console.log for your stdio MCP server
console.log for your stdio MCP server
console.log for your stdio MCP server
When developing an MCP (Model Context Protocol) server with stdio transport, console.log interferes with the protocol communication.
For example, this is what you normally get in MCP inspector npx @modelcontextprotocol/inspector when calling console.log in your MCP server code:
Error from MCP server: SyntaxError: Unexpected token S in JSON at position 0
This package patches the console methods (log, warn, error, debug) and redirects logs to a separate terminal.
https://github.com/user-attachments/assets/33ff367e-74b4-48e8-9f04-0bcafbad5e00
Start the logger in a terminal where you want to see the logs:
npx mcps-logger
Install the logger in your MCP server:
npm install mcps-logger
Add it to your MCP server entry file:
import "mcps-logger/console";
Or if you want to use in development mode only:
if (process.env.NODE_ENV !== "production") {
import("mcps-logger/console");
}
Run in your terminal:
claude mcp add mcps-logger -- npx -y mcps-loggerYes, Mcps Logger MCP is free — one-click install via Unyly at no cost.
No, Mcps Logger runs without API keys or environment variables.
Self-hosted: the server runs locally on your machine via the install command above.
Open Mcps Logger on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
CSA PROJECT - FZCO © 2026 IFZA Business Park, DDP, Premises Number 31174 - 001
Security
Low riskAutomated heuristic from public metadata — not a security guarantee.