Kibana Log Analysis & API Dashboard MCP Server
Enables AI assistants to search Elasticsearch logs, retrieve log details, analyze service health, scan local codebases for APIs, and create Kibana dashboards.
README
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.
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 install - Run
npm run build - Copy
.env.exampleto.envand configure your environment variables (or set them directly in your LLM Client setup).
Configuration Map
| Variable | Description |
|---|---|
ELASTIC_URL |
URL to your Elasticsearch cluster (e.g., https://es.internal:9200) |
ELASTIC_API_KEY |
Auth Token with specific read scopes. |
KIBANA_URL |
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.