Kibana MCP Server with dynamic API discovery and comprehensive Elastic Stack integration
Kibana MCP Server (io.github.TocharianOU/kibana)
The io.github.TocharianOU/kibana Model Context Protocol (MCP) server provides a Kibana MCP server implementation with dynamic API discovery and comprehensive Elastic Stack integration. Its packaged documentation excerpt indicates availability via npm and includes references to security assessment and DeepWiki.
๐ ๏ธ Key Features
Dynamic API discovery for Kibana
Elastic Stack integration (comprehensive, per description)
๐ Use Cases
Building MCP-enabled integrations around Kibana APIs
Working with Elastic Stack resources through Kibana connectivity
โก Developer Benefits
Exposes Kibana-related capabilities via MCP
Supports discovery of available APIs dynamically
โ ๏ธ Limitations
No tool count or specific supported operations are provided in the available source excerpt
A Kibana MCP server implementation that allows any MCP-compatible client (such as Claude Desktop) to access your Kibana instance via natural language or programmatic requests.
This project is based on the official Elastic Kibana API documentation and uses the OpenAPI YAML specification from Elastic Stack 8.x. For details, see the Kibana API documentation.
This project is community-maintained and is not an official product of Elastic or MCP.
๐ก Companion Project: For complete Elastic Stack integration, pair this with Elasticsearch MCP Server for direct Elasticsearch data operations.
๐ Installation
bash
# Global installation (recommended)
npm install -g @tocharianou/mcp-server-kibana
# Or use directly with npx
npx @tocharianou/mcp-server-kibana
From Source
bash
git clone https://github.com/TocharianOU/mcp-server-kibana.git
cd mcp-server-kibana
npm install && npm run build
Access at: http://localhost:3000/mcp
Health check: http://localhost:3000/health
Securing HTTP mode. Every session on /mcp acts with the Kibana credentials the server was started with, so treat the endpoint as sensitive:
By default the server listens on localhost only and rejects requests whose Host header is not a loopback name (DNS rebinding protection).
To accept remote clients, set MCP_BEARER_TOKEN. Clients must then send Authorization: Bearer <token> on every /mcp request. /health stays open.
Binding to a non-loopback address (MCP_HTTP_HOST=0.0.0.0) without MCP_BEARER_TOKEN logs a warning at startup: anyone who can reach the port can use your Kibana credentials.
Behind a reverse proxy that forwards its public Host header to a localhost-bound server, list that hostname in MCP_ALLOWED_HOSTS.
analyze_deletion_impact - Check impact before deletion
check_dashboard_health - Dashboard health check
scan_all_dashboards_health - Batch health scanning
Elasticsearch Data Search
Use search_elasticsearch when you need to search documents, application logs, traces, or aggregations in Elasticsearch. It sends Query DSL through Kibana's /internal/search/es route instead of the Dev Tools Console proxy.
The tool is read-only and does not widen data access: Elasticsearch enforces the configured user's index privileges on every search, exactly as it does for Discover and dashboards. Indices the user cannot read return no results.
It exists because the Dev Tools Console proxy (/api/console/proxy) is gated by a separate Kibana privilege, since the Console can call any Elasticsearch API including write and admin endpoints. A user who can read the target indices but has no Dev Tools privilege gets 403 from the Console proxy; this tool gives that user search, and nothing more. If your Kibana administrators rely on withholding Dev Tools to block ad-hoc queries from an account, be aware that this tool allows Query DSL searches for it.
For high-volume logs, start with a small time window and a small size. After finding a trace or correlation id, use that value in a second narrow search instead of repeatedly scanning a broad time range. Use _source to keep only fields needed for the current investigation.
The tool rejects wildcard-only index segments such as *, **, or _all (including inside comma-separated index expressions), an empty search body, and body.size above 100. String size values are coerced and validated as numbers. The endpoint is an internal Kibana API, so compatibility should be verified after major Kibana upgrades.
๐ Resources
Resource URI
Description
kibana-api://paths
List all available API endpoints
kibana-api://paths?search=<keyword>
Search endpoints by keyword
kibana-api://path/{method}/{encoded_path}
Get specific endpoint details
๐ฌ Example Queries
Basic Operations
"What is the status of my Kibana server?"
"List all available Kibana spaces"
"Show me all API endpoints related to dashboards"
Elasticsearch & Logs
"Search the production logs for errors from service X in the last hour"
"Find this trace id and show the surrounding log events in chronological order"
"Search index application-logs-* using this Elasticsearch Query DSL"
"Aggregate error counts by service for this time range"
Saved Objects
"Search for all dashboards"
"Find visualizations containing 'nginx' in the title"
"Create a new dashboard named 'Sales Overview'"
"Update the description of dashboard 'my-dashboard-123'"
"Delete multiple dashboards by their IDs"
Health & Analysis
"Check health of dashboard 'overview'"
"Analyze dependencies for visualization 'viz-123'"
"Scan all dashboards for health issues"
๐ Troubleshooting
Connection Issues
Verify Kibana URL is accessible
Check authentication credentials
For SSL issues: NODE_TLS_REJECT_UNAUTHORIZED=0 (use with caution)
Claude Desktop Issues
Restart Claude Desktop after config changes
Validate JSON config syntax
Check console logs for errors
Common Errors
"import: command not found": Update to latest version
Authentication failed: Verify credentials and permissions
SSL errors: Check CA certificate or disable SSL validation
403 from /api/console/proxy while searching Elasticsearch: Use search_elasticsearch. The Console proxy can require the Kibana Dev Tools privilege even when the user has permission to read the target indices.
๐ Debugging
Use MCP Inspector for debugging:
bash
npm run inspector
This provides a browser-accessible debugging interface.