MCP server exposing SRE-style log diagnostics (search, trace, errors, stats) over a Postgres-backed log store
Project description
dbay-sre-mcp
MCP (Model Context Protocol) server exposing SRE-style log diagnostics over a Postgres-backed log store. Designed for use by LLM agents that need to query structured application logs.
Tools (0.2.1)
Log queries (PG-backed dbay-logs)
| Tool | Purpose |
|---|---|
log_search |
Flexible keyword/component/time filter |
log_trace |
Follow a request_id chain across components |
log_errors |
Recent error-level lines with auto-aggregation |
log_stats |
Activity overview by component / level / time |
Metadata (lakeon-api admin REST)
| Tool | Purpose |
|---|---|
find_database |
Resolve DB name → id + status + tenant + compute_host |
find_tenant |
Resolve tenant name → id + held databases |
database_status |
Comprehensive DB snapshot + last 1h cold-start + events |
Consistency & queues (admin REST)
| Tool | Purpose |
|---|---|
data_consistency_check |
Run named invariant rule (KB↔db_id, enqueued↔drained, etc.) via admin REST |
stuck_task_query |
Async tasks in_progress beyond threshold via admin REST |
Cluster signals (admin REST + dbay-logs)
| Tool | Purpose |
|---|---|
pod_create_failures |
k8s pod-create failures aggregated by category |
multi_tenant_blast_radius |
Single error pattern affecting N tenants in a window |
Required env vars
| Variable | Used by | Notes |
|---|---|---|
LOG_DB_DSN |
log_*, multi_tenant_blast_radius | dbay-logs Postgres connection string |
LAKEON_ADMIN_TOKEN |
find_*, database_status, pod_create_failures, data_consistency_check, stuck_task_query | Admin token for /admin/* endpoints |
LAKEON_API_BASE_URL |
(above) | default https://api.dbay.cloud:8443/api/v1 |
Install
pip install dbay-sre-mcp
Configure
Point at your Postgres log store via either:
LOG_DB_DSNenvironment variable, or~/.dbay/sre-config.jsonwith key"dsn"
Expected logs table schema:
logs(id, ts, level, component, request_id, tenant_id, db_id, logger, msg, duration_ms, extra, thread)
Use as MCP server
dbay-sre-mcp
Then connect from any MCP-compatible client (Claude Code, Hermes, Codex, custom).
License
Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbay_sre_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: dbay_sre_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21cd1e4a017445759451c32754bee11dd1893036d6b242b855000c5dc0a23685
|
|
| MD5 |
60956a2f2b350af6eb3bfa5438e438c0
|
|
| BLAKE2b-256 |
db65e5ab3f1c4abefbde6d3d94d7679dd35096734c0e7edc7055c20a9b509ac3
|