mcpField
J
Jarroba Tools · Logs

Jarroba Tools · Logs

Local
github.com/InvaratoDeveloper Tools0Updated 3d ago

About Jarroba Tools · Logs

Jarroba Tools · Logs is a local MCP server for AI systems investigating logs too large to fit in context. It reads log files by path and returns analyses such as trends, patterns, stack traces, and reduced excerpts.

Key features

  1. 01Analyze logs directly from file paths
  2. 02Find trends, new patterns, and vanished events
  3. 03Group repeated messages and identify rare ones
  4. 04Trace stack errors to root causes
  5. 05Reduce logs to a character budget
  6. 06Check log quality and convert formats

Use cases

  1. 01Investigate a large CI failure log
  2. 02Find when an error pattern began or stopped
  3. 03Trace an exception to application code
  4. 04Prepare a concise log excerpt for an AI

MCP support

Exposes 12 read-only log tools to MCP clients over local stdio. The server reads files accessible to its host process and returns selected results rather than requiring pasted log text.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"invarato-jarroba-tools-logs": {
"command": "npx",
"args": [
"-y",
"@jarroba/mcp-logs"
],
"env": {
"JARROBA_MCP_DOMAINS": "<JARROBA_MCP_DOMAINS>"
}
}
}
}
Run commandnpx -y @jarroba/mcp-logs
Environment variables to set
JARROBA_MCP_DOMAINSWhich tool domains to publish, comma-separated. Defaults to what this package is for. Valid: core, calc, diagram, kg, db, ai, logs, queue, project, tests, api, chip, chem, access, archsim, security, experiments, payroll. Fewer domains means less of your context window spent on tool definitions.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@jarroba/mcp-logs0.3.0

Tools

11

Saved tool list · updated 3d ago

ParameterTypeRequiredDescription
fromenumNoWhich end to read if the file is over 32 MBstart | end
pathstringNoPath to the log file. Use this for big logs: they do not fit in a tool call.
textstringNoThe log as text. Alternative to `path`.
formatenumNoForce the format instead of detecting itjson | logfmt | syslog5424 | syslog3164 | clf | combined | plain

Details

From the project README

@jarroba/mcp-logs

An MCP server that lets your AI read a log it could never fit in its context.

claude mcp add jarroba-logs -- npx -y @jarroba/mcp-logs
// Claude Desktop, Cursor, Cline, VS Code…
{ "mcpServers": { "jarroba-logs": { "command": "npx", "args": ["-y", "@jarroba/mcp-logs"] } } }

12 tools · ~5.5k tokens of context · stdio, runs on your machine · nothing is uploaded.

Why this exists

Every log tool for an AI takes pasted text. A production or CI log is tens or hundreds of MB, so pasting is not an option — and the interesting part is never the part you would have pasted.

These tools take a file path. The server runs in Node, so it opens the file itself and hands back only what fits. An agent debugging a red CI run cannot read the log; it can ask questions about it.

The tools

log_analyzeFormat, number of events (a 40-line stack trace is one), levels, time range, errors with their root cause resolved, most frequent patterns.
log_trendsWhen did it start. Compares each pattern against itself, not against total volume — in a busy service everything rises at 9am and nothing happened. Returns what spiked, what is new, and what stopped appearing: the last one raises no counter anywhere and is often the worse news.
log_aroundWhat else clustered around a moment. What started before is a candidate explanation; what came after is usually a consequence. Correlation is not causation, and order is what separates them.
log_distinguishWhat sets a group of events apart from the rest: the field=value pairs over-represented in it (by default, in the errors). Of 300 errors, 92% on version=2.4.1 against 4% of the rest is the deploy that broke it — found without reading 300 errors. Unique-per-event fields are skipped: they identify, they do not distinguish.
log_patternsGroups lines into templates (Drain): "connected to 10.0.0.1" and "connected to 10.0.0.7" are one message. Also returns the rare ones, which is usually what you were looking for.
log_reduceCuts to a character budget keeping errors with their full trace, the window before, and whatever appears only once. Repeats collapse to [xN]. For handing a big log to a model without spending the context on the same line repeated.
log_stacktraceJava/JVM, Python, Node, Go, .NET, Rust, Ruby, PHP: the Caused by chain, the root cause, and the first frame of your code — inferred from the trace if you do not say.
log_lintWhether the log is well written, not what happened: secrets printed, one line flooding the file, timestamps with no time zone (which make two machines impossible to correlate), the clock going backwards, no request id. Secrets come back masked.
log_convertJSON / logfmt / syslog 5424 / CSV / OpenTelemetry / ECS — saying up front what the conversion loses.
log_rotationPuts rotated logs in time order. Rotation numbering runs backwards against time (app.log.3 is older than app.log.1) and alphabetically app.log.10 sorts before app.log.9. Use it first, or you read them backwards.
log_profile_check
log_profile_suggest
A reusable profile describing how your team's logs look. check returns every error with its exact field, so a model can correct itself in one pass.

Make your agent use it (Claude Code hook)

An agent with these tools will still Read a 300 MB log out of habit. hooks/big-log-read.mjs is a PreToolUse hook that stops a Read of a big log (by name: *.log, rotated *.log.N[.gz], *.jsonl, anything under logs/; by size: 2 MB, JT_BIG_LOG_BYTES to change it) and tells the agent to call log_analyze / log_reduce with the path instead. Everything else goes through untouched.

{ "hooks": { "PreToolUse": [ { "matcher": "Read", "hooks": [
  { "type": "command", "command": "node /path/to/big-log-read.mjs" } ] } ] } }

Two things it will not do

  • It will not invent the server's time zone. That is not in the log, and guessing it shifts the entire timeline without anyone noticing. log_profile_suggest says so instead of filling it in.
  • It will not tell you how long anything took if the log has no timestamps. It says it cannot.

Privacy, and an honest note

Transport is stdio: your MCP host launches this as a subprocess and talks over stdin/stdout. There is no endpoint, no account and no telemetry. npx downloads the package from npm to your machine the first time; after that nothing goes out.

Two things worth knowing rather than discovering:

  • These tools read whatever the process that launched them can read. That is the point — it is how a 200 MB log becomes answerable — so they are exactly as privileged as your MCP host.
  • What a tool returns enters your model's context. A log file with hostile text inside it is an indirect prompt-injection channel, the same way a web page is. Nothing here sanitizes that.

Every tool declares MCP annotations: all are readOnlyHint: true, and all are openWorldHint: true because the answer comes from the disk rather than from the arguments.

More

Part of Jarroba Tools — the same engine as the web tools, so the answer is identical. Want everything (90 tools, databases, diagrams, test auditing, SPARQL)? @jarroba/mcp.

MIT — see LICENSE. Source: github.com/Invarato/jarroba-mcp.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.