home / mcp / kibana mcp server
Provides unified access to Kibana and Periscope logs across 9 indexes with fast search and analytics.
Configuration
View docs{
"mcpServers": {
"gaharivatsa-kibana_server": {
"url": "http://localhost:8000",
"headers": {
"OPENAI_API_KEY": "YOUR_OPENAI_API_KEY",
"GOOGLE_AI_API_KEY": "YOUR_GOOGLE_AI_API_KEY"
}
}
}
}You run a modular MCP server that provides fast, unified access to Kibana and Periscope logs through a single API. It supports multiple indexes, in-memory caching, HTTP/2, OpenTelemetry tracing, and timezone-aware searches, making it practical for production-grade log analytics and cross-system correlation.
You connect to the Kibana MCP Server using its HTTP API or run it locally via a supported startup script. Use the exposed endpoints to discover available indexes, set the active index, run searches in Kibana (KQL) or Periscope (SQL), and optionally enable AI-assisted analysis. Authentication is performed via tokens that you store and refresh as needed. All actions can be performed through your MCP client with straightforward calls to the API.
Prerequisites are required to run the server locally.
1. Install Python 3.8 or newer.
2. Create and activate a virtual environment.
3. Install dependencies from the requirements file.
4. Make the start script executable.
5. Optionally set up AI-powered log analysis by providing an AI provider API key.
elasticsearch:
host: "" # Set via API or environment
timestamp_field: "timestamp" # ā
Works for ALL 9 indexes
verify_ssl: true
mcp_server:
host: "0.0.0.0"
port: 8000
log_level: "info"
periscope:
host: ""
timeouts:
kibana_request_timeout: 30Start the server using the provided start script. The server will be available at http://localhost:8000.
Health checks can be performed to verify status.
Authenticate through tokens for both Kibana and Periscope. Store tokens securely and refresh as needed.
Discover indexes, select an index, and perform searches via Kibana (KQL) or Periscope (SQL). Use the AI-powered analysis endpoints to summarize results when needed.
If you encounter timestamp field errors or authentication issues, adjust settings via the dynamic configuration endpoint or refresh tokens.
The server features in-memory caching, HTTP/2 support, connection pooling, and OpenTelemetry tracing for observability. Timezone support is available for all indices.
Discover available indexes, set the active index, and run a search across Kibana or Periscope logs. Use the AI endpoints to generate summaries or insights from the results.
List available indexes for querying and identify total counts across 9 indexes.
Choose which index pattern to search against for subsequent queries.
Main endpoint for Kibana KQL-based log searches across the selected index.
Retrieve the most recent logs from the active index.
Extract error records from logs to surface issues quickly.
AI-powered analysis to generate summaries and key insights from logs.
Main endpoint for Periscope SQL-based log searches.
Query for HTTP error patterns across Periscope streams.
Set the Kibana authentication token used by the MCP server.
Set the Periscope authentication token used by the MCP server.
Dynamically update server configuration at runtime.