Ndjson MCP Server

MCP server for streaming NDJSON log triage — query patterns, detect anomalies, summarize timelines without loading gigabyte files into context.

Local serverstdio

What is the Ndjson MCP server?

If you already use Ndjson, the ndjson mcp server is the piece that lets your assistant work with it directly. MCP server for streaming NDJSON log triage — query patterns, detect anomalies, summarize timelines without loading gigabyte files into context.

What the server does

MCP server that stream-parses NDJSON log files without loading them into memory — filter by pattern, detect error spikes via Z-score analysis, summarize severity timelines by time window.

Installation

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • query_log_pattern — Filter log entries by a field/value match. Returns up to N matching entries, streaming the file without loading it entirely. Pass lineStartPattern
  • detect_error_anomalies — Z-score frequency analysis. Buckets errors by time window, computes mean + stddev, flags windows where the error rate is anomalously high
  • summarize_log_timeline — Chronological aggregation of errors, warnings, and info counts per time window. Quick visual of where the incident is
  • correlate_request — Reconstructs a distributed trace from multiple NDJSON log files. Given a trace_id, collects all correlated events in chronological order across all
  • discover_log_schema — Analyze a log file to infer its wrapper format (NDJSON, Syslog, Kubernetes container logs) and extract type schemas, identifying polymorphic keys
  • group_semantic_patterns — Cluster log messages dynamically using the fixed-depth tree-based Drain parsing algorithm to isolate distinct log templates and analyze their
  • start_live_triage — Start background log tailing with real-time Z-score anomaly alerting on error frequency spikes and heap memory protection limits. Dispatches
  • query_external_logs — A unified gateway to query central log providers (Datadog, Splunk, Elasticsearch), converting search patterns to vendor-specific dialects and mapping

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Where it fits

This sits in the monitoring and observability group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Ndjson's toolset — query_log_pattern, detect_error_anomalies, summarize_log_timeline and 5 more — is a fair guide to whether it matches your workflow. It is maintained by vola-trebla; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Ndjson's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
query_log_patternFilter log entries by a field/value match. Returns up to N matching entries, streaming the file without loading it entirely. Pass lineStartPattern (e.g. "^{") to reconstruct multiline stack traces silently dropped by the
detect_error_anomaliesZ-score frequency analysis. Buckets errors by time window, computes mean + stddev, flags windows where the error rate is anomalously high.
summarize_log_timelineChronological aggregation of errors, warnings, and info counts per time window. Quick visual of where the incident is.
correlate_requestReconstructs a distributed trace from multiple NDJSON log files. Given a trace_id, collects all correlated events in chronological order across all files and surfaces the services involved and total duration.
discover_log_schemaAnalyze a log file to infer its wrapper format (NDJSON, Syslog, Kubernetes container logs) and extract type schemas, identifying polymorphic keys, timestamp patterns, and severity fields.
group_semantic_patternsCluster log messages dynamically using the fixed-depth tree-based **Drain parsing algorithm** to isolate distinct log templates and analyze their parameter distributions (wildcard variations).
start_live_triageStart background log tailing with real-time Z-score anomaly alerting on error frequency spikes and heap memory protection limits. Dispatches notifications directly over standard JSON-RPC channels.
query_external_logsA unified gateway to query central log providers (Datadog, Splunk, Elasticsearch), converting search patterns to vendor-specific dialects and mapping the output into the standardized **OpenTelemetry Log Data Model** stru

How to install the Ndjson MCP server

{
  "mcpServers": {
    "log-triage": {
      "command": "npx",
      "args": ["-y", "ndjson-local-log-triage-mcp"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Ndjson to query log pattern.
  • Use Ndjson to detect error anomalies.
  • Use Ndjson to summarize log timeline.

Frequently asked questions

It connects Ndjson to MCP-compatible AI assistants such as Claude and Cursor, exposing 8 tools (query_log_pattern, detect_error_anomalies, summarize_log_timeline, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Ndjson directly.