rlg-mcp — Claude Code MCP server: logs as agent tools
An MCP server that hands log files to an AI agent: four tools, one prompt and two resources over stdio. Useful when you debug a failure inside the chat.
claude mcp add rlg-mcp -- docker run -i --rm ghcr.io/sebastienrousseau/rlg-mcp:0.0.15What rlg-mcp does
rlg-mcp belongs to the rlg ecosystem, a set of Rust crates for structured logging. The server runs over stdio, streamable HTTP or HTTP+SSE and exposes four tools, one prompt and two resources to the agent. Log records arrive as data the agent can query, so you stop pasting file fragments into the chat.
Two ways to get it. Through Cargo: cargo install rlg-mcp. Or as the container ghcr.io/sebastienrousseau/rlg-mcp:0.0.15 — that image is what the install commands for Claude, Codex, Cursor, GitHub Copilot and Gemini CLI reference. Docker has to be on your PATH, otherwise the server never starts.
Underneath, rlg needs Rust 1.88.0 or newer, edition 2024. The native sinks os_log and journald exist on macOS and Linux; on Windows and elsewhere records go to a file or stdout. If your service logs through some other library, the server still reads the files, provided the format is one it supports.
What it helps with
- trace a service crash from its log file without dumping the whole thing into chat
- pull every error-level record for a given time window
- group messages by component and count the repeats
- strip the noise and keep only records with a specific attribute
- convert a log from one format to another before analysis
Example prompts for the agent
- Connect
rlg-mcpand list every error inservice.logfrom the last hour - Find records from the
auth-servicecomponent and group them by message - Read
app.jsonlthrough rlg-mcp and tell me what happened before the crash
How to install rlg-mcp
Platform CLI
claude mcp add rlg-mcp -- docker run -i --rm ghcr.io/sebastienrousseau/rlg-mcp:0.0.15Platform CLI
codex mcp add rlg-mcp -- docker run -i --rm ghcr.io/sebastienrousseau/rlg-mcp:0.0.15Config file
{
"mcpServers": {
"rlg-mcp": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/sebastienrousseau/rlg-mcp:0.0.15"
]
}
}
}Config file
{
"servers": {
"rlg-mcp": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/sebastienrousseau/rlg-mcp:0.0.15"
]
}
}
}Platform CLI
gemini mcp add rlg-mcp docker run -i --rm ghcr.io/sebastienrousseau/rlg-mcp:0.0.15Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about rlg-mcp
How do I install rlg-mcp in Claude Code?
One command: claude mcp add rlg-mcp -- docker run -i --rm ghcr.io/sebastienrousseau/rlg-mcp:0.0.15. Docker must be installed and available on PATH.
What does rlg-mcp do?
It runs an MCP server over your log files and gives the agent four tools, one prompt and two resources. The agent reads and filters records directly instead of you copying text into the chat.
Which Rust version does rlg need?
Rust 1.88.0 or newer, edition 2024. The native os_log and journald sinks are macOS and Linux only.