Logging

June 2, 2026 ยท View on GitHub

The server uses Winston for structured logging. Logs are written to stderr (so they don't interfere with the MCP protocol on stdout) and, optionally, to files.

Log levels

Set the level via environment variable:

EBAY_LOG_LEVEL=debug  # error | warn | info | http | verbose | debug | silly

File logging

Enable persistent logs to disk:

EBAY_ENABLE_FILE_LOGGING=true

Log files are written to ~/.ebay-mcp/logs/:

FileContents
error.logError-level messages only
combined.logAll log messages
debug.logDebug and verbose messages

Example output

[2024-01-15 10:30:45] [INFO] [Server] Starting eBay API MCP Server
[2024-01-15 10:30:45] [INFO] [Auth] Loading tokens from environment variables
[2024-01-15 10:30:46] [INFO] [Auth] Access token refreshed successfully
[2024-01-15 10:30:46] [HTTP] [API] Request: GET https://api.ebay.com/sell/inventory/v1/inventory_item
[2024-01-15 10:30:47] [HTTP] [API] Response: 200 OK