logs-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOGS_MCP_DIR | No | Allowed directory for logs. Can also be provided via the repeatable --dir command-line argument. If neither is set, only the current working directory is allowed. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Investigate huge log files (GBs; plain or .gz; rotated sets; multi-line stack traces) without reading them. Start with log_overview to learn the format, time range and level mix. Then error_clusters to see what is going wrong grouped into templates, timeline to see WHEN, search_logs for exact events (with context), trace_request to follow one request/correlation id across files, compare_windows to find what is new or spiking versus an earlier window, and tail_logs for the latest lines. path may be a file (its rotated siblings app.log.1, app.log.2.gz are included), a directory, or a glob. since/until accept ISO times or -30m / -2h meaning before the newest log entry. All files stay on disk and are streamed: nothing is loaded into memory.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| log_overviewA | Start here. Summarise a log file, rotated set, directory or glob: size, exact line count, detected format (JSON lines, logfmt, syslog, nginx/apache access, ISO-timestamped text, plain), multi-line style (Python traceback / Java stack trace), time range, and a level histogram. Files larger than |
| search_logsA | Find log events by text/regex, minimum level and time window. A stack trace is ONE event, so
a match shows the whole trace. |
| error_clustersB | Group events at or above |
| timelineB | Event counts per time bucket for a pattern and/or minimum level, with an ASCII sparkline and bars. Shows WHEN something started or spiked. bucket is 'auto' (about 60 buckets) or a duration such as 10s, 5m, 1h, 1d. |
| tail_logsA | The last |
| trace_requestB | Follow one request / correlation / trace / user id across ALL matching files (use a directory or glob to span services). Returns every event mentioning the id, merged into time order, with the file each came from, the time span and how many were errors. Stack traces stay attached to their event. |
| compare_windowsB | What changed? Compare error templates between window A (baseline) and window B. Reports templates
that are NEW in B, SPIKED in B (event rate at least spike_factor times A's, normalised if the windows
differ in length), and GONE. With no window arguments, B is the last |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool has a distinct investigative role: overview, text search, clustering, time-bucket analysis, tailing, cross-file tracing, and window comparison. Overlaps such as error_clusters vs compare_windows and search_logs vs trace_request are clearly separated by their descriptions and intended use.
All names use snake_case and are readable, with several clear verb_noun names such as search_logs, tail_logs, trace_request, and compare_windows. However, log_overview, error_clusters, and timeline use noun-phrase conventions, creating minor inconsistency in pattern.
Seven tools is well-scoped for a log-analysis server. Each tool adds a distinct capability and none appears redundant or filler.
The surface covers the key log investigation workflow: summarization, search, error grouping, temporal analysis, tailing, request tracing, and change comparison. There are no obvious dead ends for the stated purpose, and caps/pagination behavior are described where relevant.