Kibana Log Analysis & API Dashboard MCP Server
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 Log Analysis & API Dashboard MCP Server Search logs for recent errors in payment-service"
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 Log Analysis & API Dashboard MCP Server
An MCP (Model Context Protocol) server designed for enterprise developers to connect local AI assistants directly to Elasticsearch, Kibana, and local codebases.
⚠️ For New Developers & Forkers
If you have just cloned this repository to use within your organization, search the codebase for TODO: comments. There are several places where data or settings should be manually updated to fit your company's architecture.
The most crucial manual updates inside src/index.ts include:
Log Schema Customization: Update the
.levelorhttp.response.status_codefields to match your company's logging convention.Self-Signed Certificates: Add your internal CA cert path if your Elasticsearch instance does not use public SSL certificates.
Regex Parsers for
.NETorGo: If your team uses languages other than Java/Typescript, update thescan_code_for_apistool regex.
Related MCP server: elasticsearch-mcp
Features
search_logs: Search Elasticsearch indices using keywords and Lucene queries.get_log_details: Retrieve the full un-truncated JSON of specific log events.analyze_service_health: Aggregate error rates, success rates, and HTTP status codes for a given service.scan_code_for_apis: Scans your local Spring Boot (Java) or Express (Node.js) project to dynamically discover REST endpoints.create_api_dashboard: Programmatically generates a Kibana dashboard visualizing the dynamically discovered endpoints using the Kibana Saved Objects API.
Installation & Production Setup
Ensure you have Node.js (v18+) installed.
Run
npm installRun
npm run buildCopy
.env.exampleto.envand configure your environment variables (or set them directly in your LLM Client setup).
Configuration Map
Variable | Description |
| URL to your Elasticsearch cluster (e.g., |
| Auth Token with specific read scopes. |
| URL to your Kibana instance. |
Usage with Claude Desktop / Cursor
Add the following configuration to your claude_desktop_config.json or Cursor MCP settings:
{
"mcpServers": {
"kibana-logs": {
"command": "node",
"args": ["/Users/sidhu/.gemini/antigravity/scratch/kibana-mcp-server/build/index.js"],
"env": {
"ELASTIC_URL": "https://your-bank-cluster:9200",
"ELASTIC_API_KEY": "your_secure_api_key",
"KIBANA_URL": "https://your-bank-kibana:5601"
}
}
}
}Security Best Practices for Enterprise
Least Privilege: Do not grant your
ELASTIC_API_KEYdelete, put, or cluster-admin privileges. It only needsreadon application indices, andallaccess to the Kibana Saved Objects API (to create dashboards).Data Masking: If your logs contain PII (Personally Identifiable Information), you should implement a regex mask in
src/index.tsright before returning the logs to the AI payload.
Available Tools
5 toolsanalyze_service_healthB
Aggregate logs to determine error vs. success rates
Inputs: index (required), hoursBack (required), serviceName (required).
create_api_dashboardA
Generate a Kibana Dashboard tracking specific endpoints
Inputs: endpoints (required), dashboardName (required).
get_log_detailsB
Retrieve the full, raw JSON of a specific log event
Inputs: index (required), documentId (required).
scan_code_for_apisB
Scans a local project directory to discover REST APIs
Inputs: projectPath (required).
search_logsB
Search logs matching keywords within a time range
Inputs: index (required), keyword (required), hoursBack (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: searching logs, retrieving details, analyzing health, scanning APIs, and creating dashboards. No overlap between them.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., search_logs, get_log_details), making them predictable and easy to distinguish.
With 5 tools, the server is well-scoped for its dual focus on log analysis and API dashboard creation, without being too sparse or overloaded.
Core workflows are covered (search, details, health analysis, API discovery, dashboard creation), but minor gaps exist—e.g., missing tools for listing, updating, or deleting dashboards.
Maintenance
Related MCP Connectors
Ingest and search LogsLoom logs from coding agents.
Lets AI agents analyze API metrics, request logs, and traces, and manage apps and alerts.
Search logs, metrics, traces, alerts and incidents in Epok observability from your AI agent.
Query application logs, traces, and metrics from your AI coding assistant via Foam's MCP server.
Related MCP Servers
- 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
- AlicenseAqualityDmaintenanceEnables AI assistants to search, analyze, and interact with Elasticsearch through natural language.18Apache 2.0
- -licenseNot gradedqualityNot gradedmaintenanceEnables querying Elasticsearch logs from AI assistants using natural language, with optional SSH tunnel support.-
- AlicenseNot gradedqualityDmaintenanceTransforms Elasticsearch into an AI-powered observability engine for analyzing logs, APM traces, and system metrics through natural language.4Apache 2.0