Show HN: OpenTrace – Self-hosted observability server with 75 MCP tools(github.com)
github.com
Show HN: OpenTrace – Self-hosted observability server with 75 MCP tools
https://github.com/adham90/opentrace
3 comments
This is a really interesting MCP use case.
How are you constraining the AI’s ability to take actions like killing slow queries or creating watches?
Is there a policy layer between the MCP tool invocation and execution, or is it trusting the assistant’s reasoning once the SQL is validated?
What it covers:
- Log ingestion with full-text search (SQLite FTS5), filters by service, level, trace ID, exception class, metadata - Read-only Postgres introspection — query stats from pg_stat_statements, index analysis, lock chains, bloat estimates, replication lag. All queries validated SELECT-only via SQL AST parsing (pg_query) - Sentry-style error grouping by fingerprint with user impact analysis - User analytics — session journeys, conversion funnels, path analysis, top endpoints - VM monitoring — CPU, memory, disk, network via gopsutil - Rule-based threshold watches with auto-resolve
The AI assistant can also take actions: resolve errors, create watches, set up health checks, kill slow queries, and save persistent notes across sessions.
Tools return suggested_tools with pre-filled arguments, so the assistant chains through investigations without prompt engineering.
Stack: Go, SQLite (WAL + FTS5), Chi, HTMX. Single binary, no external dependencies. Runs on a $4 VPS.
Client libraries: Ruby gem for Rails (auto-captures SQL, N+1s, view renders, ActiveJob, PII redaction) and a 3.1KB browser JS client for frontend error tracking.
https://github.com/adham90/opentrace