kibana-console-mcp
Allows interaction with a Kibana deployment, providing tools for searching logs, exploring log patterns, investigating anomalies, tracing correlation IDs, listing data views and saved objects, and running Elasticsearch queries via the Kibana console proxy.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kibana-console-mcp what caused the exception spike in the last 30 minutes?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kibana-console-mcp
An MCP server and CLI for searching logs in a Kibana 8.17 deployment, going
through the Dev Tools console proxy (POST /api/console/proxy) so it needs only
the Kibana host and Kibana credentials.
Built for a viewer-level role with no Elasticsearch cluster privileges, on a cluster of 63 data streams and ~35 billion log documents.
Option | Works on Kibana 8.17? | |
Kibana Agent Builder MCP ( | ❌ | Added in Kibana 9.2.0 |
| ✅ | Needs a reachable Elasticsearch endpoint; deprecated upstream |
this server | ✅ | Only needs Kibana |
Quick start
npm install
cp .env.example .env # fill in KIBANA_URL, KIBANA_SPACE, a credential
npm run smoke # checks the live cluster, step by stepThen wire it into Claude Code — no env block needed, the server reads .env:
claude mcp add kibana -- node /path/to/kibana-console-mcp/src/index.jsFull instructions, including how to get a credential when the signed-in user cannot create an API key: docs/SETUP.md.
Related MCP server: Kibana MCP Server
Ask it something
Four tools answer most questions in a single request.
es_overview { "window": "1h" } what is going on
es_patterns { "window": "1h", "filter": "EXCEPTION" } what is in these logs
es_why { "window": "30m", "baseline": "24h" } why did it spike
es_find { "text": "connection refused" } where is this happening 38700 action EXCEPTION actionDescription esb.pty.customerBillUpdated additionalInfo postpaidEarn …
15700 appName nlp-openapi-bff appResult Http Exception appResultCode appResultHttpStatus …
800 action EXCEPTION actionDescription SharedRedemptionService.getCampaignByFilters LogTime failedThe same thing from a shell:
node scripts/kq.js overview 1h
node scripts/kq.js patterns 1h EXCEPTION
node scripts/kq.js why 30m 24h
node scripts/kq.js find "connection refused" 1hMore, with real output: docs/PLAYBOOK.md.
Tools
Tool | Purpose |
| Start here. Volume, errors, unusual containers, sample lines — one |
| Phrase → count, namespaces, containers, time shape, samples |
| Millions of lines → a dozen message templates with counts |
| What is statistically unusual in a window versus a baseline |
| Timeline for one correlation id across services |
| Query DSL search with |
| Count matching documents |
| ES|QL query, allowlist-checked, returned as rows or a matrix |
| Field mappings, falling back to |
| Index discovery: |
| Index discovery through Kibana, needs no cluster privilege |
| Dashboards, visualizations, index patterns, lens objects |
| Connectivity, Kibana version, active guardrails |
| Escape hatch for any other Elasticsearch path |
Safety
Read-only by default, with a glob allowlist enforced on every tool — including
es_esql and es_request, where the target hides inside a query string — and
MSISDN/secret masking on results and errors.
These logs contain customer PII. Anything a tool returns enters the model's context permanently. docs/SECURITY.md covers what is in them and what cookie authentication costs.
Speed
Measured against the live cluster. The intuitive answers were mostly wrong:
window width dominates (24h costs 13× 1h), fan-out barely matters (63 streams
cost 1.6× one), filter context makes no difference, and LIKE "*x*" times out
at 30 seconds. docs/PERFORMANCE.md has the numbers and
what the server does about them.
Development
npm run check # lint + the test suite + stdio selftest. No credentials, no network.
npm run smoke # the only command that touches the live cluster.Conventions and non-negotiables for agents working here ( | |
How it works, and the proxy quirks it absorbs | |
This deployment: version, role, data shape, feature availability | |
Error → cause → fix | |
Every tool and parameter, generated from the server | |
What changed, including every audit finding | |
Work that is deliberately unfinished, and why |
Available Tools
14 toolses_countCount documentsA
Count documents matching a query. Cheaper than a search when only the total matters.
Inputs: index (required), query.
es_esqlRun ES|QL queryA
Run an ES|QL query and return a columns/values table. Usually the fastest way to aggregate, e.g. FROM logs-* | WHERE status >= 500 | STATS n = COUNT(*) BY host. For text matching use MATCH(field, "phrase") or QSTR("field: phrase") — a leading-wildcard LIKE/RLIKE cannot use the index and is rejected.
Inputs: query (required), filter.
es_findFind log lines and where they come fromA
One-shot log search: given a phrase, returns the match count, which namespaces and containers produce it, how it is distributed over time, and a sample of lines — in a single Elasticsearch request. Prefer this as the FIRST call for "where/when/how often is X happening", instead of a discovery call followed by a search: it answers all three questions at once and costs one round trip.
Inputs: text (required), size, index, window.
es_get_mappingsGet index mappingsA
Return the field mappings for an index or index pattern. Read this before writing a query so field names and types are correct. Falls back to _field_caps when the credential may not read _mapping directly.
Inputs: index (required).
es_list_indicesList indicesA
List Elasticsearch indices matching a pattern. Uses _cat/indices when the credential has the "monitor" cluster privilege, and falls back to _resolve/index (index-level privileges only) when it does not. Start here when you do not know which index holds the data; if both routes are forbidden, use kbn_list_data_views.
Inputs: pattern.
es_overviewFirst look at a windowA
Everything needed to start an investigation, in one request: log volume and its shape over time, error count and rate, which namespaces and containers the errors come from, which containers are statistically unusual versus a baseline, and a few sample error lines. Call this FIRST for "what is going on", "is anything wrong", or the start of an incident; then narrow with es_patterns, es_why or es_trace.
Inputs: size, index, window, baseline, +1 more.
es_patternsSummarise logs into message patternsA
Collapse a window of raw log lines into the handful of message templates behind them, with a count for each. Use this to answer "what is in these logs" or "what changed" without reading individual lines — it turns millions of documents into a short list. Runs over a random sample, so counts are approximate.
Inputs: size, index, filter, window, +1 more.
es_requestRaw Elasticsearch requestA
Escape hatch for Elasticsearch APIs the other tools do not cover, e.g. "_cluster/health", "_cat/aliases?format=json", "_resolve/index/logs-*". In read-only mode only GET/HEAD and search-shaped POST paths are permitted.
Inputs: path (required), body, method.
es_searchSearchA
Run an Elasticsearch Query DSL search. Pass the query body as an object. Keep "size" small and pass "source" (aliased as "_source") to select fields — log documents are large and oversized responses get truncated.
Inputs: index (required), aggs, from, size, +5 more.
es_traceTrace a correlation idA
Follow one correlation id — sessionId, transactionId, x-request-id, MSISDN — across every service that logged it, returned as a compact timeline. Prefer this over es_search for "what happened to this request": it parses each JSON log line down to time/pod/level/action/detail instead of returning whole documents.
Inputs: id (required), size, index, window.
es_whyExplain a change in log volumeA
Compare a window against a wider baseline and report which namespaces, containers and pods are statistically over-represented in it. Use this for "why did logs spike", "what changed at 14:00", or to narrow an incident to a service before reading any lines. Ranked by p-value, so ordinary background noise is filtered out.
Inputs: size, index, filter, window, +1 more.
kbn_find_saved_objectsFind Kibana saved objectsA
Search Kibana saved objects in the active space — dashboards, visualizations, index patterns, saved searches, lens objects.
Inputs: page, type, search, perPage.
kbn_list_data_viewsList Kibana data viewsA
List the Kibana data views (index patterns) available in the active space. This works with Kibana-level privileges only, so it is the reliable way to discover which indices are queryable when Elasticsearch cluster APIs are forbidden.
Inputs: no named parameters.
kbn_statusKibana statusA
Check connectivity and report the Kibana version, the active space, and the current read-only / index-allowlist settings of this MCP server.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool targets a clearly distinct operation: querying (es_search, es_count, es_esql), discovery (es_list_indices, es_get_mappings, kbn_list_data_views), investigation (es_trace, es_find, es_patterns, es_why, es_overview), and administrative access (kbn_status, kbn_find_saved_objects, es_request). Overlapping-looking tools like es_find vs es_search are explicitly differentiated by purpose and guidance in their descriptions.
The set follows a mostly consistent convention: es_ for Elasticsearch operations and kbn_ for Kibana operations, with verb_noun pairs like es_get_mappings, es_list_indices, kbn_find_saved_objects. A few tools use noun/adverb style names (es_patterns, es_why, es_overview), which breaks the verb-led pattern but remains predictable and readable.
14 tools is well-scoped for a Kibana/Elasticsearch investigation console. Each tool covers a distinct capability — from low-level search, to aggregations, to incident-analysis helpers, to saved-object access — without feeling bloated or redundant.
The tool surface is comprehensive for its read-only investigation purpose: it covers index discovery, field mappings, query execution (DSL, count, ES|QL), log pattern analysis, trace following, statistical comparisons, overview generation, saved object lookup, and a general escape hatch for unlisted Elasticsearch APIs. No obvious dead ends remain.
Related MCP Connectors
Search log events, investigate anomalies, and manage cases in your Knowledge Grid tenant.
Search logs, read alerts, enable or disable them, and read dashboards in Logz.io.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Read-only access to Auralogs production logs: search logs, inspect errors, review AI analyses.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides seamless access to Kibana and Periscope logs through a unified API with KQL and SQL querying, AI-powered log analysis, and support for searching across 1.3+ billion logs in 9 indexes.1-
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Kibana dashboards, visualizations, and Elasticsearch data through read-only resources and executable tools for searching logs, exporting dashboards, and querying data.74MIT
- FlicenseNot gradedqualityCmaintenanceEnables querying and searching logs from Kibana (ELK stack) via MCP, with support for project-based data views, trace ID correlation, and log expansion.-
- FlicenseAqualityDmaintenanceEnables AI assistants to search Elasticsearch logs, retrieve log details, analyze service health, scan local codebases for APIs, and create Kibana dashboards.5-