Kibana MCP Server
This server lets MCP-compatible clients (like Claude Desktop) interact with a Kibana instance through natural language, covering status checks, API exploration, saved-object management, and analysis tools.
Kibana status & spaces: Check server status (
get_status) and list available spaces (get_available_spaces)Custom API execution: Run arbitrary Kibana REST requests (
execute_kb_api) with method, path, body, params, and multi-space supportAPI discovery: Search endpoints (
search_kibana_api_paths), list all endpoints (list_all_kibana_api_paths), and get endpoint details (get_kibana_api_detail)Saved Objects management: Search, get, create, update, bulk update, and bulk delete dashboards, visualizations, index-patterns, searches, configs, lenses, maps, tags, and canvas work products
Analysis tools: Analyze object dependencies, assess deletion impact, check dashboard health, and scan all dashboards for health issues
Flexible deployment: Supports stdio and HTTP transports, API key/basic/cookie authentication, and TLS/CA configuration
Connects to Elastic Stack services through Kibana, using the OpenAPI YAML specification from Elastic Stack 8.x (ES8) to dynamically retrieve and manage all Kibana API endpoints.
Provides access to Kibana instances through API endpoints, allowing users to search, view, and execute Kibana APIs. Supports operations like checking server status, managing saved objects, creating dashboards, handling cases, and accessing endpoint events through Kibana's API.
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 MCP Server show me the top 5 error logs from the last hour"
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 MCP Server
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
# Global installation (recommended)
npm install -g @tocharianou/mcp-server-kibana
# Or use directly with npx
npx @tocharianou/mcp-server-kibanaFrom Source
git clone https://github.com/TocharianOU/mcp-server-kibana.git
cd mcp-server-kibana
npm install && npm run buildRelated MCP server: mshegolev/kibana-mcp
🎯 Quick Start
Claude Desktop Integration (Recommended)
Add to your Claude Desktop configuration file:
MacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"kibana": {
"command": "npx",
"args": ["@tocharianou/mcp-server-kibana"],
"env": {
"KIBANA_URL": "http://your-kibana-server:5601",
"KIBANA_API_KEY": "your-api-key",
"KIBANA_DEFAULT_SPACE": "default"
}
}
}
}Direct CLI Usage
# Using API Key (recommended)
KIBANA_URL=http://localhost:5601 \
KIBANA_API_KEY=your-api-key \
npx @tocharianou/mcp-server-kibana
# Using Basic Auth
KIBANA_URL=http://localhost:5601 \
KIBANA_USERNAME=your-username \
KIBANA_PASSWORD=your-password \
npx @tocharianou/mcp-server-kibana
# Using Cookie Auth
KIBANA_URL=http://localhost:5601 \
KIBANA_COOKIES="sid=xxx; security-session=yyy" \
npx @tocharianou/mcp-server-kibanaHTTP Mode (Remote Access)
MCP_TRANSPORT=http \
MCP_HTTP_PORT=3000 \
KIBANA_URL=http://localhost:5601 \
KIBANA_API_KEY=your-api-key \
npx @tocharianou/mcp-server-kibanaAccess 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
localhostonly and rejects requests whoseHostheader is not a loopback name (DNS rebinding protection).To accept remote clients, set
MCP_BEARER_TOKEN. Clients must then sendAuthorization: Bearer <token>on every/mcprequest./healthstays open.Binding to a non-loopback address (
MCP_HTTP_HOST=0.0.0.0) withoutMCP_BEARER_TOKENlogs a warning at startup: anyone who can reach the port can use your Kibana credentials.Behind a reverse proxy that forwards its public
Hostheader to a localhost-bound server, list that hostname inMCP_ALLOWED_HOSTS.
MCP_TRANSPORT=http \
MCP_HTTP_HOST=0.0.0.0 \
MCP_BEARER_TOKEN="$(openssl rand -hex 32)" \
KIBANA_URL=http://localhost:5601 \
KIBANA_API_KEY=your-api-key \
npx @tocharianou/mcp-server-kibana✨ Features
Core Capabilities
Dual transport modes: Stdio (local) and HTTP (remote access)
Multiple authentication methods: API Key, Basic Auth, Cookie-based
Multi-space support: Enterprise-ready Kibana space management
SSL/TLS support: Custom CA certificate configuration
Session management: Automatic UUID generation for HTTP mode
Dynamic API discovery: Based on official Kibana OpenAPI specification
Saved Objects Management
Complete CRUD operations for all Kibana saved object types
Intelligent search with pagination support
Bulk operations for efficient mass updates
Version control with optimistic concurrency
Reference management for object relationships
🔧 Configuration
Required Variables
Variable | Description | Example |
| Kibana server address |
|
Authentication (choose one method)
Variable | Description | Priority |
| API Key (base64 encoded) | 1st |
| Basic authentication | 2nd |
| Session cookies | 3rd |
Optional Variables
Variable | Description | Default |
| Default Kibana space |
|
| CA certificate path | - |
| Request timeout (ms) |
|
| Transport mode |
|
| HTTP server port |
|
| HTTP server host |
|
| HTTP mode: require | - |
| HTTP mode: extra hostnames accepted in the | - |
| Disable SSL validation |
|
🛠️ Available Tools
Base Tools
get_status- Get Kibana server statusexecute_kb_api- Execute custom Kibana API requestssearch_elasticsearch- Search Elasticsearch documents and logs through Kibana's search API, within the user's Elasticsearch index privilegesget_available_spaces- List available Kibana spacessearch_kibana_api_paths- Search API endpointslist_all_kibana_api_paths- List all API endpointsget_kibana_api_detail- Get API endpoint details
Saved Objects Tools
vl_search_saved_objects- Search saved objects (universal)vl_get_saved_object- Get single saved objectvl_create_saved_object- Create new saved objectvl_update_saved_object- Update single saved objectvl_bulk_update_saved_objects- Bulk update operationsvl_bulk_delete_saved_objects- Bulk delete operations
Supported Object Types: dashboard, visualization, index-pattern, search, config, lens, map, tag, canvas-workpad, canvas-element
Analysis Tools (v0.6.0+)
analyze_object_dependencies- Analyze saved object dependenciesanalyze_deletion_impact- Check impact before deletioncheck_dashboard_health- Dashboard health checkscan_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.
Example tool arguments for a bounded log search:
{
"index": "application-logs-*",
"body": {
"size": 20,
"_source": [
"@timestamp",
"message",
"trace.id",
"service.name"
],
"sort": [
{ "@timestamp": "desc" }
],
"query": {
"bool": {
"filter": [
{
"range": {
"@timestamp": {
"gte": "2025-01-15T10:00:00Z",
"lt": "2025-01-15T11:00:00Z"
}
}
},
{
"term": {
"service.name.keyword": "example-service"
}
}
]
}
}
}
}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 |
| List all available API endpoints |
| Search endpoints by keyword |
| 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/proxywhile searching Elasticsearch: Usesearch_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:
npm run inspectorThis provides a browser-accessible debugging interface.
📦 Package Information
GitHub: TocharianOU/mcp-server-kibana
Node.js: >= 18.0.0
License: Apache 2.0
🤝 Contributing
This project is community-maintained. Contributions and feedback are welcome!
Please follow the Elastic Community Code of Conduct in all communications.
📄 License
Apache License 2.0 - See LICENSE file for details.
Available Tools
6 toolsexecute_kb_apiC
Execute a custom API request for Kibana with multi-space support
Inputs: method (required), path (required), body, params, +1 more.
get_available_spacesC
Get all available Kibana spaces with current context
Inputs: include_details.
get_kibana_api_detailC
Get details for a specific Kibana API endpoint
Inputs: method (required), path (required).
get_statusB
Get Kibana server status with multi-space support
Inputs: space.
list_all_kibana_api_pathsB
List all Kibana API endpoints as a resource list
Inputs: no named parameters.
search_kibana_api_pathsC
Search Kibana API endpoints by keyword
Inputs: search (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no overlap: execute_kb_api performs custom API calls, get_available_spaces lists spaces, get_kibana_api_detail provides endpoint details, get_status checks server status, list_all_kibana_api_paths enumerates all endpoints, and search_kibana_api_paths searches endpoints. The descriptions reinforce these unique functions, making misselection unlikely.
All tools follow a consistent verb_noun pattern with snake_case: execute_kb_api, get_available_spaces, get_kibana_api_detail, get_status, list_all_kibana_api_paths, and search_kibana_api_paths. The naming is predictable and readable throughout the set, with no deviations in style or convention.
With 6 tools, the count is well-scoped for a Kibana MCP server focused on API exploration and execution. Each tool earns its place by covering distinct aspects like status, spaces, endpoint listing, searching, detailing, and execution, avoiding bloat while providing comprehensive functionality.
The tool set is highly complete for exploring and interacting with Kibana APIs, covering discovery (list/search), details, spaces, status, and execution. A minor gap exists in lacking direct CRUD operations for Kibana objects like dashboards or visualizations, but agents can work around this using execute_kb_api for custom requests.
Maintenance
Related MCP Connectors
MCP server for Product Management
The official MCP Server from Mia-Platform to interact with Mia-Platform Console
MCP server for prozorro_tender_monitor_mcp
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that enables interaction with Elasticsearch and OpenSearch clusters for searching documents and managing indices. It provides tools for cluster health monitoring, index configuration, and general API requests.16Apache 2.0
- AlicenseAqualityCmaintenanceMCP server for Kibana / Elasticsearch — log search, aggregations, index discovery, and dashboard browsing. Hits Elasticsearch REST API directly for log queries; falls back to Kibana Console proxy when no direct ES URL is configured. Supports ApiKey auth (best for agents), Basic auth, and anonymous access. All 5 tools are read-only (readOnlyHint: true). Returns structured JSON (outputSchema).5104 PyPI1MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server for managing OpenSearch Dashboards, enabling AI assistants to create, manage, and inspect dashboards, visualizations, saved objects, and plugin features.1Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server that provides tools and resources to interact with Elasticsearch clusters, including listing indices, searching, and retrieving mappings.3MIT