Log MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_MCP_DIR | No | Colon-separated paths to log directories to monitor (e.g., /var/log:/tmp/logs:$XDG_RUNTIME_DIR/log) |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_log_files | Lists all log files in $XDG_RUNTIME_DIR/log. Use this FIRST when user says 'inspect', 'inspector', 'logs', or reports errors/problems. This is the entry point for log inspection - discover available logs before using other tools. |
| get_log_content | Returns the content of a specific log file from $XDG_RUNTIME_DIR/log. Use this to inspect runtime logs when debugging errors or investigating problems. For large files, use read_log_paginated instead. |
| read_log_paginated | Reads a paginated portion of a log file. Useful for large log files. Uses token-based pagination to respect AI context limits. Tracks file modifications to detect changes between pagination calls. |
| search_log_file | Searches a log file using regex pattern and returns matching lines with surrounding context. Supports token-based pagination to respect AI context limits. |
| head_log | Reads the beginning of a log file (like Unix 'head' command). Uses token-based pagination to respect AI context limits. |
| tail_log | Reads the end of a log file (like Unix 'tail' command). Uses token-based pagination to respect AI context limits. Ideal for checking recent log entries. |
| read_log_range | Reads a specific range of lines from a log file. Uses token-based pagination to respect AI context limits. |
| find_errors | Quickly finds error lines in a log file by matching common error patterns (ERROR, Exception, FATAL, Failed, Traceback, panic, etc.). Ideal for quick diagnostics. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| runtime-logs | Information about runtime log inspection capabilities |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/thhart/log-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server