rlg-mcp
MCP 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.
README
<!-- SPDX-License-Identifier: Apache-2.0 OR MIT -->
<p align="center"> <img src="https://cloudcdn.pro/rlg/v1/logos/rlg.svg" alt="RLG logo" width="128" /> </p>
<h1 align="center">rlg — RustLogs</h1>
<p align="center"> Near-lock-free structured logging for Rust, plus an ecosystem of companion crates: CLI tooling, MCP server, OTLP exporter, tower middleware, WebAssembly bindings, PII redaction, test utilities, and aggregation reports. </p>
<p align="center"> <a href="https://github.com/sebastienrousseau/rlg/actions"><img src="https://img.shields.io/github/actions/workflow/status/sebastienrousseau/rlg/ci.yml?style=for-the-badge&logo=github" alt="Build" /></a> <a href="https://github.com/sebastienrousseau/rlg/actions/workflows/miri.yml"><img src="https://img.shields.io/github/actions/workflow/status/sebastienrousseau/rlg/miri.yml?style=for-the-badge&logo=rust&label=Miri" alt="Miri" /></a> <a href="https://crates.io/crates/rlg"><img src="https://img.shields.io/crates/v/rlg.svg?style=for-the-badge&color=fc8d62&logo=rust" alt="Crates.io" /></a> <a href="https://docs.rs/rlg"><img src="https://img.shields.io/badge/docs.rs-rlg-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs" alt="Docs.rs" /></a> <a href="https://codecov.io/gh/sebastienrousseau/rlg"><img src="https://img.shields.io/codecov/c/github/sebastienrousseau/rlg?style=for-the-badge&logo=codecov" alt="Coverage" /></a> <a href="https://lib.rs/crates/rlg"><img src="https://img.shields.io/badge/lib.rs-rlg-orange.svg?style=for-the-badge" alt="lib.rs" /></a> </p>
This is the Cargo workspace root. The library lives at
crates/rlg. Ten companion crates ship from this
workspace, all at lockstep version 0.0.11.
The rlg ecosystem
| Crate | What it does | Use case |
|---|---|---|
rlg |
Near-lock-free structured logging engine. 65k-slot ring buffer, deferred formatting, 14 output formats, native OS sinks (os_log via syslog(3), journald). |
Embed structured logging in any Rust binary or library. |
rlg-cli |
rlg binary — jq for structured logs. Tail, filter, convert across all 14 formats. |
Pipe my-service | rlg --min-level error --format ecs from the shell. |
rlg-mcp |
Model Context Protocol server exposing rlg streams as tools to LLM agents. | Claude Desktop, Cursor, mcp.run agents reading your logs. |
rlg-otlp |
OpenTelemetry network exporter (OTLP/HTTP JSON). | Ship records to Honeycomb, Datadog, Tempo, Jaeger, otelcol. |
rlg-tower |
tower::Layer emitting per-request structured access logs. |
axum, tonic, hyper, lambda_runtime — any tower::Service. |
rlg-wasm |
wasm-bindgen wrapper for browser / Deno / Cloudflare Workers / Bun, plus a WASI 0.2 component interface for wasmtime hosts. |
Structured logging from JS or WASI 0.2 components. |
rlg-redact |
PII / secret redaction between Log::fire() and the sink. Aho-Corasick fused alternation regex. |
Compliance, GDPR, audit-trail safety. Built-in patterns for cards, JWTs, bearers, emails, IPs, AWS keys. |
rlg-test |
Test utilities — capture rlg records in a #[test] scope and assert on them with assert_logged!. |
Downstream library tests verifying their structured log output. |
rlg-report |
Log digest / analytics: count by level, top components, top errors, latency percentiles. CLI + library mode. | Operational dashboards, daily error reports, oncall triage. |
rlg-ebpf |
Enricher trait + ProcessEnricher (portable) + EbpfEnricher scaffold (Linux, behind the ebpf feature) for automatic PID / process-name attributes. |
Automatic host-level context on every record without app code changes. |
xtask (internal, unpublished) |
cargo xtask check-all / coverage / audit / doc / examples / bench / release. |
Maintainer automation. |
Install one, install all
[dependencies]
rlg = "0.0.11"
rlg-otlp = "0.0.11" # ship to an OTLP collector
rlg-tower = "0.0.11" # HTTP middleware
rlg-redact = "0.0.11" # PII redaction
[dev-dependencies]
rlg-test = "0.0.11" # assertions in your tests
CLI binaries:
cargo install rlg-cli # the `rlg` binary
cargo install rlg-mcp # the `rlg-mcp` MCP server
cargo install rlg-report # the `rlg-report` digest tool
Workspace layout
.
├── Cargo.toml # workspace manifest (profiles, members)
├── README.md # ← you are here
├── CHANGELOG.md / CONTRIBUTING.md / SECURITY.md
├── LICENSE-{APACHE,MIT}
├── crates/
│ ├── rlg/ # core library
│ ├── rlg-cli/ # `rlg` binary + filter/render lib
│ ├── rlg-mcp/ # MCP server
│ ├── rlg-otlp/ # OTLP/HTTP exporter
│ ├── rlg-tower/ # tower::Layer
│ ├── rlg-wasm/ # wasm-bindgen + WASI 0.2 component
│ ├── rlg-redact/ # PII / secret scrubber (Aho-Corasick)
│ ├── rlg-test/ # test utilities
│ ├── rlg-report/ # log digest binary + lib
│ ├── rlg-ebpf/ # Enricher trait + eBPF (Linux) scaffold
│ └── xtask/ # internal automation (publish = false)
└── .github/
└── workflows/
├── ci.yml # delegates to sebastienrousseau/pipelines
└── release.yml # workspace-aware crates.io publisher
Quick links
- Core docs:
crates/rlg/README.md· docs.rs/rlg - Contributing & signing policy:
CONTRIBUTING.md - Security policy:
SECURITY.md - Release notes:
CHANGELOG.md
License
Dual-licensed under Apache 2.0 or MIT, at your option.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.