1. Conduid
  2. Data
  3. Logchef
MCP server · Data

Logchef

Self-hosted log analytics for ClickHouse, VictoriaLogs and Grafana Loki: LogchefQL search, dashboards, alerts, audit log and an MCP server in a single binary

Unclaimed AGPL-3.0 clickhouselog-analyticslogging
77Good

Scored 8 hours ago · breakdown

About Logchef

Logchef is an MCP server published by mr-karan in the Data category: self-hosted log analytics for ClickHouse, VictoriaLogs and Grafana Loki: LogchefQL search, dashboards, alerts, audit log and an MCP server in a single binary. Conduid read 29 tools from its source: backtest_alert, compare_windows, get_alert_history, get_all_field_dimensions, get_dashboard, get_field_values and 23 more. No package is published for it, so it installs from a source checkout.

The repository has 953 stars and 67 forks, is licensed AGPL-3.0, and its last commit was on 26 Nov 2026. The latest release is v2.8.3 (26 Nov 2026): Changelog 255b13519a69630189fcdb5f8ac7d4b967e0a821 chore: promote verified develop to main 2350364368e752c2ae5be791ec253faea4d5b29c docs(comparisons): add VictoriaLogs v… It follows v2.8.2 (22 Nov 2026), and the 5 most recent releases go back to v2.8.0 (22 Nov 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. Its topics include clickhouse, log-analytics and logging.

Install

From source
git clone https://github.com/mr-karan/logchef

Tools (29)

backtest_alertReplay an unsaved alert rule over a past range through the same group, no-data and forget rules as live evaluation, to see when it would have fired. Returns episodes, notifications, firing time, breaching evaluations, the groups that breached most, the evaluations where the status changed (every evaluation with include_series), coverage, step_seconds and warnings. At most 120 evaluations run, so a range longer than 120 times the lookback has coverage below 1 and can miss short episodes: read coverage before trusting zero episodes, and replay a shorter window with end_time. Saves nothing, sends nothing and ignores silences. One backtest runs per user at a time. ClickHouse SQL must read its window from {{__time_filter}}.
compare_windowsCompare returned log samples across two time windows. Runs the same LogchefQL filter in both windows (filter only, no aggregation pipe). Row counts are not totals when a sample reaches its limit or is truncated. Percentage change is null for incomplete samples or a zero baseline.
get_alert_historyGet the history of a specific alert, newest first: 20 episodes unless limit says otherwise (at most 100), optionally since a time and of one status. Each entry is one episode of one group (group_key, group) with status triggered, no_data, resolved or error, the value, its times and the state of each notification delivery. silenced_by in the payload means a silence muted the episode. The rule's query is given once, as alert.query, not in each entry.
get_all_field_dimensionsGet top values for every filterable field in one call: LowCardinality, String, Enum and number columns, except log-body columns such as msg, message and body, whose values are whole log lines (ask get_field_values for one by name). Returns a map of field names to their top values with counts. A field that was not read, such as one that timed out, has an error and empty values: its values are unknown, not absent. Read it with get_field_values or a shorter window. Counts every log in the window unless query filters them. Much faster than calling get_field_values for each field individually. Use this for initial source exploration to understand what dimensions exist.
get_dashboardGet one dashboard with its schema 2 panels: tabs and their layouts, and each panel's team, source, query and visualization. A panel on a source you cannot reach comes back locked, without its query.
get_field_valuesGet the top distinct values for a specific field in a time range, with counts. Counts every log in the window unless query filters them. Useful for exploring dimensions (e.g. top severity levels, service names, status codes) before writing queries.
get_log_contextGet surrounding log entries (before and after) a specific timestamp. Useful for investigating what happened around a particular event.
get_log_histogramGenerate time-based histogram data for log analysis. Creates a time series showing log volume over specified time windows, with optional grouping by fields like severity or service. Useful for identifying traffic patterns, spikes, and trends.
get_metaGet server metadata including version information and configuration details.
get_profileReturn the profile represented by this request's authenticated credentials. The opaque id is unique within this app and remains unchanged across token refresh, reconnection, and display-metadata changes.
get_saved_queryGet a single saved query by ID. Returns name, description, query_type, query_content, source, and metadata.
get_source_schemaGet the source schema (column names and types) for a specific log source within a team. Use this before querying logs to understand what fields are available.
get_sourcesGet all sources the current user can access across all teams. Returns sources with team associations. Use this when the user mentions a source by name — find the matching source and use its team_id and source_id for subsequent queries.
get_team_sourcesGet the sources that belong to a specific team. Requires the team ID. If the user gives a team name instead of an ID, call get_teams first to find the numeric ID.
get_teamsGet the teams that the current user belongs to, including their role in each team and member count.
list_alert_silencesList the alert silences of a source: the rule each one covers (no alert_id means every rule of the source), its label matchers, its once or weekly schedule and whether it is active now. A silence mutes notifications only; rules still evaluate.
list_alertsList alert rules, optionally for one source. Shows name, severity, active status, query and threshold, group_by, no_data_policy, last_state (firing, no_data or resolved) and instance_counts (groups firing, with no data, and ok).
list_collectionsList the Library collections you take part in: your personal collection and the shared ones, with your role, member, team and item counts. A collection groups saved queries; list_saved_queries lists the queries.
list_dashboardsList the dashboards you can see: those you created and those with a panel on a team you belong to. Each entry has the id, name, description, panel count, panel kinds, tab count and revision, and no panels; get_dashboard reads them.
list_destinationsList the notification destinations you may use in an alert rule: id, name, type (email, webhook, slack or pagerduty), scope (private, team or global), team and whether it is active. Recipients, receiver URLs and keys are never shown.
list_saved_queriesList saved queries visible to the caller. Optionally filter by source_id. Saved queries are reusable LogchefQL or SQL queries pinned to a specific source; any user with source access via any team can see them.
list_saved_viewsList the saved Explorer views of a source that the caller can see: their personal views, the team's views and the source's views, ordered by scope then name. A view sets the Explorer's columns, column order and widths, sort, display mode, and optionally a LogchefQL filter and a relative time range. Use it to learn which columns a team reads for a source, or to give a person a view id (the Explorer URL parameter view=<id>). default_view_id is the view the Explorer opens with: the personal default, else the team default, else the source default.
open_investigationOpen the interactive Logchef investigation panel. Browse sources, run bounded LogchefQL queries, select histogram intervals or log rows, and attach evidence to the conversation. The panel runs the requested query when it opens, and a later call replaces the query in an open panel.
query_logchefqlExecute a LogchefQL query against a log source. LogchefQL is a filter syntax (e.g. 'severity_text=ERROR and service=api') with an optional aggregation pipe that counts and summarizes the matching logs instead of returning them: 'severity_text=ERROR | count() by service' or 'service=api | p95(duration_ms), avg(duration_ms) by time(5m)'. Functions: count, count_distinct, sum, avg, min, max, p50, p75, p90, p95, p99. 'by' takes up to 5 fields and one time bucket; bare 'time' needs the interval parameter. Optional '| sort <column> desc' and '| limit N' follow the aggregation. Time range is specified separately. Returns logs (the result rows when the query aggregates), columns, stats, the generated SQL, and an aggregation object that describes an aggregated result.
query_logsExecute a datasource-native query against a specific log source within a team. Use get_source_schema first to understand available columns. The query should include proper WHERE clauses with timestamp filters, ORDER BY, and LIMIT. Maximum 100 results per query.
test_alertRun an unsaved alert rule's query once over its lookback, as the alert form's Test does. Returns the value, whether it meets the threshold, up to 20 group samples, no_data and warnings. Saves nothing and sends nothing.
top_valuesGet the top distinct values for multiple fields in one call, with counts. Counts every log in the window unless query filters them. Fetches the schema to determine field types, then queries each field's top values. Useful for quickly exploring the dimensions of a log source.
translate_logchefqlTranslate LogchefQL to the source native query language without executing it. warnings lists queries that translate but may not match what they say. sql contains ClickHouse filter conditions. For get_log_histogram, translate the filter without an aggregation pipe and pass its full_sql (ClickHouse) or generated_query (VictoriaLogs); the full_sql of an aggregated query is not a histogram query.
validate_logchefqlValidate a LogchefQL expression for syntax errors without executing it. Returns whether the expression is valid and any error details. Use this before executing queries to catch syntax issues early. It does not read the source's column types: translate_logchefql does, and its warnings name a query that translates but may not match, such as a JSON number read as text from a String column.

Security checks

Static checks derived from the repository 3 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository's README runs to about 867 words.
  • ✓License declaredThe repository declares the AGPL-3.0 license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedDependency versions are pinned by flake.lock and 4 more.
  • !No dynamic code executionScanned 497 source files and found 1 call to eval or shell execution, in internal/store/sqlite/sqlc/db.go. Review how tool inputs reach them before granting credentials.

1 check has not been run yet.

Releases

v2.8.3v2.8.3 · 26 Nov 2026Changelog 255b13519a69630189fcdb5f8ac7d4b967e0a821 chore: promote verified develop to main 2350364368e752c2ae5be791ec253faea4d5b29c docs(comparisons): add VictoriaLogs vs ClickHouse for logs 415d974ac597cbd49046004b5ee71e08a9d630dd…
v2.8.2v2.8.2 · 22 Nov 2026Logchef v2.8.2 Fixes for rough edges found while recording the v2.8.0 launch videos. No migrations: upgrade in place from v2.8.0 or v2.8.1. Fixed Explorer filters run the query. Choosing a value in the field sidebar, a filter from a table…
v2.8.1v2.8.1 · 22 Nov 2026Logchef v2.8.1 Four fixes found while recording the v2.8.0 launch videos. No migrations: upgrade in place from v2.8.0. Fixed Email with a display-name From address. A From setting such as `Logchef <logchef@example.com>` went into SMTP…
cli-v0.5.0Logchef CLI v0.5.0 · 22 Nov 2026What's Changed docs(dashboards): publish the v2 dashboard docs and gallery by @mr-karan in https://github.com/mr-karan/logchef/pull/288 Let team Editors update shared dashboards on v2.7 by @mr-karan in…
v2.8.0v2.8.0 · 22 Nov 2026Logchef v2.8.0 Search Grafana Loki, count with LogchefQL, alert per service, and see who queried what. v2.8.0 adds Grafana Loki as a third backend beside ClickHouse and VictoriaLogs. LogchefQL now aggregates, alert rules fire and resolve…

README

The repository's README runs to about 867 words, fetched 3 days ago. The original in the repository is authoritative.

Read full README
Questions

About Logchef

How do I install Logchef?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Logchef safe to use with an AI agent?

Its trust score is 77 out of 100 (good). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass No dynamic code execution. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Logchef still maintained?

Yes — the latest release is v2.8.3 (26 Nov 2026), and the last commit was 6 days ago. The repository has 953 stars and 17 open issues.

What tools does Logchef provide?

Conduid read 29 tools from the source: backtest_alert, compare_windows, get_alert_history, get_all_field_dimensions, get_dashboard, get_field_values, get_log_context, get_log_histogram and 21 more.

What license is Logchef released under?

The repository declares the AGPL-3.0 license. That applies to the latest release, v2.8.3, as well.