mcp-syslog
This server exposes six MCP tools for querying a fleet-wide syslog collection, letting an agent inspect logs, correlate events, and triage incidents without reading raw files.
syslog_sources_tool – List available log sources (optionally filtered by substring), including size and last-write time; can include the collector's internal stats.
syslog_search_tool – Search logs by source, time window, severity, program, and regex pattern; supports relative or ISO timestamps and caps results.
syslog_grep_tool – Regex search across the whole fleet or one source, with optional severity filter and time window.
syslog_tail_tool – Get the most recent entries for a specific source, optionally filtered by severity.
syslog_context_tool – Show log entries surrounding a specific moment (before/after seconds), optionally across all sources to correlate failures with other events.
syslog_stats_tool – Summarize log volume and error rate per source, ranked by volume, optionally restricted to one source or a time window.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-syslog search the api service for errors in the last 15 minutes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-syslog-crunchtools
MCP server for the logs collected by crunchtools/syslog.
Built for RT #1460, to close a specific gap: Hermes gets paged by Nagios and can restart a service, but it cannot read the service's logs — so every remediation is a blind restart. This turns that into an informed one.
Capabilities
Tool | What it answers |
| What can I query? |
| Show me ERRs from this service in the last 15 minutes |
| Where does this string appear across the whole fleet? |
| What are this service's most recent lines? |
| What was everything saying around 03:14? |
| Which service is loudest, and which is actually unhealthy? |
Related MCP server: Log Analyzer MCP Server
The triage loop
nagios_current_problems_tool → what is broken
syslog_search_tool(source=…, → why it broke
severity="ERR",
since="15m")
syslog_context_tool(timestamp=…) → what else was happening at that moment
nagios_schedule_check_tool → confirm the fixsyslog_context_tool without a source is the one that earns its keep. It spans
every source at once, which is how "the app died" gets connected to "the database
container OOMed four seconds earlier".
Design notes
Every result is bounded, and says when it is. Logs are unbounded and this output lands in a model's context window. Each tool caps its results, caps how many lines it will scan, and annotates the answer when either limit is hit:
[!] Stopped after the 2,000,000-line scan limit, so this result is INCOMPLETE
and an empty or short result does not mean nothing happened.That annotation is load-bearing. A caller that cannot distinguish "no errors occurred" from "I stopped looking" will draw the wrong conclusion from an empty result — and this server exists to inform remediation decisions.
Time filtering is cheap. The collector puts the date in the filename, so a ten-minute query opens one file rather than reading ninety days of history.
Source names are untrusted. They come from a model and are used to build a
filesystem path. Each is resolved and then confirmed to still be inside the log
root, which catches traversal, absolute paths, and symlinks pointing out of the
tree — see tests/test_security.py.
Severity is "at least this severe". severity="ERR" returns ERR, CRIT, ALERT
and EMERG. An unrecognised severity is kept rather than dropped, on the grounds
that hiding a line you do not understand is worse than showing it — but it is
not counted as an error in syslog_stats_tool, or a healthy service would
report a 57% error rate.
Severity is not badness. Podman records anything a container writes to stderr
at priority err, and plenty of services log routine INFO there. One chatty
httpx-based service in this fleet sits around 65% "ERR" while being entirely
healthy:
PRIORITY=3 | 2026-08-23 15:55:24 INFO httpx: HTTP Request: GET https://... "200 OK"The collector is reporting the journal faithfully; the journal is reporting the file descriptor. Read the message, and prefer a change in error rate to its absolute value. This caveat is in the server's MCP instructions too, so an agent querying it is told the same thing.
Two line formats are parsed. The collector emitted five fields before 2026-08-23 and six after, and the old lines stay in retention for 90 days. Which layout a line uses is decided by where a real severity sits, not by counting fields.
Log format
The collector writes six space-delimited fields:
2026-08-23T15:41:52+00:00 crunchtools.com crunchtools.com httpd ERR AH00169: caught SIGTERM
└─ timestamp ───────────┘ └─ host ──────┘ └─ source ────┘ └prog┘ └sev┘ └─ message ────────┘source is the log stream — normally a container name. program is the process
inside it, which matters for systemd containers where httpd, php-fpm and
mariadb all file under one service name.
Configuration
Variable | Default | Purpose |
|
| Collector log root, mounted read-only |
|
| Cap on entries returned per call |
|
| Cap on lines examined per call |
No credentials — the server reads files off a read-only bind mount.
Running
podman run -d --name mcp-syslog \
--network crunchtools \
-p 127.0.0.1:8027:8027 \
-v /path/to/syslog/data/logs:/logs:ro \
quay.io/crunchtools/mcp-syslog:latest \
--transport streamable-http --host 0.0.0.0 --port 8027Mount :ro. This server never needs to write, and a read-only mount means a bug
here cannot destroy the forensic record it exists to protect.
Development
uv sync
uv run ruff check src tests
uv run mypy src
uv run pytest -vAvailable Tools
6 toolssyslog_context_toolSyslog Context ToolARead-only
Return log entries surrounding a specific moment.
Use this after an alert names a time. Omitting source spans the whole fleet, which is how a failure gets correlated with whatever else was happening.
Inputs: timestamp (required), limit, source, severity, +2 more. Returns: result
syslog_grep_toolSyslog Grep ToolARead-only
Regex search across all sources, or within one named source.
Inputs: pattern (required), limit, since, source, +1 more. Returns: result
syslog_search_toolSyslog Search ToolCRead-only
Search collected logs by source, time window, severity and pattern.
Inputs: limit, since, until, source, +3 more. Returns: result
syslog_sources_toolSyslog Sources ToolARead-only
List log sources available to query, with size and last-write time.
Inputs: pattern, include_internal. Returns: result
syslog_stats_toolSyslog Stats ToolBRead-only
Summarise log volume and error rate per source.
Inputs: top, since, source. Returns: result
syslog_tail_toolSyslog Tail ToolBRead-only
Return the most recent entries for one source.
Inputs: source (required), limit, severity. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct query mode: listing sources, filtered search, regex grep, tailing, contextual windows, and stats. The main overlap is between syslog_search_tool (severity/pattern) and syslog_grep_tool (regex), which an agent could confuse, but the descriptions draw a reasonable line between structured filtering and regex matching.
All tools follow a clear syslog_<action>_tool pattern, which is highly predictable. The action terms mix nouns (sources, stats) and verbs (search, grep, tail), a minor inconsistency within an otherwise uniform convention.
Six tools is well-scoped for a log query server, with each tool covering a genuinely distinct access pattern (discovery, search, grep, tail, context, stats). No tool feels redundant or vestigial.
The read-only query lifecycle is well covered: discovery, filtering, regex, recency, surrounding context, and aggregate stats. Minor gaps exist around schema/field discovery or export, but core investigative workflows are fully supported without dead ends.
Maintenance
Related MCP Connectors
Real-time infrastructure monitoring with metrics, logs, alerts, and ML-based anomaly detection.
Search log events, investigate anomalies, and manage cases in your Knowledge Grid tenant.
Search your mobile, web and server app logs session by session, and read grouped errors, daily stats, releases and alerts.
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables searching and analyzing AWS CloudWatch logs with support for configurable log groups, time-based searches, and service-specific log stream filtering.5MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying and analyzing logs from multiple remote Unix hosts via the Log Collector API, with tools for search, error detection, and summary generation.-
- FlicenseNot gradedqualityDmaintenanceProvides telemetry tools for retrieving recent logs and system metrics to support root-cause analysis of infrastructure incidents. Enables autonomous incident triage with grounded verification and human-in-the-loop remediation.1-
- AlicenseAqualityDmaintenanceEnables debugging of distributed transactions by continuously ingesting Docker container logs, indexing them by trace/request ID, and exposing MCP tools to search, tail, and correlate logs across services.7ISC