CLI Commands
logs
Thelogs command displays logs from running MCP server instances.
Usage
Description
Thelogs command allows you to view real-time logs from an MCP server instance that is currently running. This is useful for debugging, monitoring server activity, and tracking errors.
By default, it shows logs from all running servers, but you can specify a particular server ID to focus on just that instance.
Options
| Option | Description |
|---|---|
--follow, -f | Follow log output in real-time (like tail -f) |
--tail INTEGER | Number of recent log lines to show (default: 100) |
--since TEXT | Show logs since timestamp (e.g., “10m” for 10 minutes ago) |
--until TEXT | Show logs until timestamp |
--timestamps, -t | Show timestamps with log entries |
--debug, -d | Include debug-level logs in the output |
--help | Show help message for the logs command |
Arguments
| Argument | Description |
|---|---|
SERVER_ID | (Optional) The ID or name of the server to show logs for |
Examples
Output
The command outputs log entries in chronological order:--follow, new log entries appear in real-time as they are generated.
Related Commands
cogni server status- Check the status of running MCP serverscogni server stop- Stop a running MCP server
Tips
- Use
--followto watch logs in real-time during development or debugging - Combine
--sincewith--followto see recent history plus new logs - For issues with server startup, check logs without specifying a SERVER_ID
- Use
--timestampsto correlate log events with other system activities