loglens
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
loglens
loglens investigates homelab logs held in a local file: what the
store holds, what arrived most recently, what errored, what mentions
a term, how volume is spread over time, and what surrounded a
moment. One binary serves a command-line interface and a stdio MCP
server exposing a single action-dispatched tool, cortex.
This is a labelled core subset. The tool it is modelled on
dispatches 60 catalog actions; loglens implements seven of them —
status, tail, errors, search, timeline, context, and
help — and omits the other 53 (fleet and topology views, AI
session analysis, correlation and anomaly analysis, error
acknowledgement, notifications, and administration). The help
action lists the implemented subset and the omitted actions at
runtime.
Log file
Records live in a JSONL file: one JSON object per line, each with
ts (an ISO-8601 timestamp), level, source, and message:
{"ts":"2026-10-26T09:15:00.000Z","level":"info","source":"docker/web","message":"container started"}
{"ts":"2026-10-26T09:16:12.000Z","level":"error","source":"syslog","message":"disk almost full"}The path comes from --file on the CLI, then the
LOGLENS_LOG_FILE environment variable, then ./loglens.jsonl.
Malformed lines (bad JSON, missing fields, unparseable timestamps)
are skipped and counted, never fatal. A missing file is a clean
error for data actions; status instead reports the store state
with exists: false, and help needs no store at all. All logic
is local and deterministic — no network access, ever.
Related MCP server: mcp-log-analyzer
Install
npx @reneturcios/loglens statusOr run the container image:
docker run -i ghcr.io/cloudcorprecords/loglensThe container defaults to the MCP server (see below). Pass CLI
arguments to use it as a CLI instead. Mount your log file and set
LOGLENS_LOG_FILE to its in-container path.
CLI
export LOGLENS_LOG_FILE=/var/log/homelab.jsonl
loglens status
loglens tail --limit 5 --source docker/web
loglens errors --limit 10
loglens search "disk" --since 2026-10-26T00:00:00.000Z
loglens timeline --bucket day
loglens context 2026-10-26T09:16:12.000Z --window-minutes 5
loglens context 12 --limit 3
loglens help
loglens --versionCommands print a JSON result. tail, errors, and search
return records newest first; context returns them in file
order. context accepts either a timestamp (records within
--window-minutes of it, or the --limit nearest records around
the closest one) or a bare record index (the --limit records on
either side of that position). Exit codes: 0 on success, 1
when an operation fails (including a missing log file), 2 for
usage errors.
MCP server
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
npx -y @reneturcios/loglens mcpMCP client configuration:
{
"mcpServers": {
"loglens": {
"command": "npx",
"args": ["-y", "@reneturcios/loglens", "mcp"],
"env": { "LOGLENS_LOG_FILE": "/absolute/path/to/logs.jsonl" }
}
}
}Tool
Tool | Input | What it returns |
|
| Per action: a store summary, the latest matching records, hourly/daily volume buckets, records around a moment, or the subset help text. |
A useful first call is {"action":"status"}, then narrow with
tail, errors, search, timeline, or context.
Development
npm install
npm run build # tsc -> dist/
npm test # node test runner over test/*.test.ts, real temp JSONL files, no network
npm run dev # run the CLI from source via tsxLicense
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Ingest and search LogsLoom logs from coding agents.
Offline log parsing, CI failures, HTTP capture analysis and bounded JSON configuration validation.
Open-source agent that observes and fixes your application. Query logs, traces, metrics, incidents.
Query any public logr profile — timelines, events, full context — plus owner-authorized writes.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA terminal live-tail and a browser dashboard — one process, one event stream, served from localhost. Unified timeline across Claude Code, Codex, Gemini CLI, Cursor, Hermes, and OpenClaw. Token + cost accounting, compaction + anomaly detection, hybrid search, SVG call graphs, monaco-style diff attribution, agent-aware replay ("what would the agent say if I edited the prompt?"), policy editor, MCP s14 npm17MIT
- AlicenseNot gradedqualityDmaintenanceAnalyzes log files locally using Ollama and files structured GitHub Issues automatically, with all processing kept on your machine.1MIT
- AlicenseNot gradedqualityFmaintenanceEnables LLMs to analyze logs by extracting patterns, redacting secrets, and providing token-efficient summaries from files, Docker containers, or journald.21 PyPI5MIT
- AlicenseAqualityAmaintenanceMCP server exposing rlg (RustLogs) log files as tools for on-call / SRE agent workflows. Three tools over JSON-RPC stdio — tail_log (last N events, filtered by level/target), filter_log (predicate filtering), summarize_errors (grouped error taxonomy). Pure Rust. MIT OR Apache-2.0.36Apache 2.0