Kibana MCP Server
Kibana MCP Server
README
Kibana MCP Server
API Specification
This project is based on the official Elastic Kibana API documentation and uses the OpenAPI YAML specification from Elastic Stack 8.x (ES8) to dynamically retrieve and manage all Kibana API endpoints. For the latest details, see the Kibana API documentation.
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 community-maintained and is not an official product of Elastic or MCP.
Features
- Connect to local or remote Kibana instances
- Secure authentication (username/password)
- SSL/TLS and custom CA certificate support
- Exposes Kibana API endpoints as both tools and resources
- Search, view, and execute Kibana APIs from MCP clients
- Type-safe, extensible, and easy to integrate
Directory Structure
├── index.ts # Server entry point
├── src/
│ ├── types.ts # Type definitions and schemas
│ ├── base-tools.ts # Tool registration and API logic
│ ├── prompts.ts # Prompt registration (expert & resource helper)
│ └── resources.ts # Resource registration (API paths/URIs)
├── kibana-openapi-source.yaml # Kibana API OpenAPI index
├── README.md # English documentation
├── README_zh.md # Chinese documentation
Resources
| Resource URI | Description |
|---|---|
kibana-api://paths |
Returns all available Kibana API endpoints (can filter with search param) |
kibana-api://path/{method}/{encoded_path} |
Returns details for a specific API endpoint |
Examples:
kibana-api://paths?search=saved_objectskibana-api://path/GET/%2Fapi%2Fstatus
Tools
| Tool Name | Description | Input Parameters |
|---|---|---|
get_status |
Get the current status of the Kibana server | None |
execute_api |
Execute a custom Kibana API request | method (GET/POST/PUT/DELETE), path (string), body (optional), params (optional) |
search_kibana_api_paths |
Search Kibana API endpoints by keyword | search (string) |
list_all_kibana_api_paths |
List all Kibana API endpoints | None |
get_kibana_api_detail |
Get details for a specific Kibana API endpoint | method (string), path (string) |
Prompts
| Prompt Name | Description |
|---|---|
kibana-tool-expert |
Tool expert mode (highly recommended in Claude Desktop), supports intelligent analysis, search, execution, and explanation of Kibana APIs via tools. Recommended for most users. |
kibana-resource-helper |
Resource helper mode, guides how to access and use Kibana API info via resource URIs. Suitable for clients that only support resource access or need raw API metadata. |
Configuration
Configure the server via environment variables:
| Variable Name | Description | Required |
|---|---|---|
KIBANA_URL |
Kibana server address (e.g. http://localhost:5601) | Yes |
KIBANA_USERNAME |
Kibana username | Yes |
KIBANA_PASSWORD |
Kibana password | Yes |
KIBANA_CA_CERT |
CA certificate path (optional, for SSL verification) | No |
KIBANA_TIMEOUT |
Request timeout in ms (default 30000) | No |
KIBANA_MAX_RETRIES |
Max request retries (default 3) | No |
NODE_TLS_REJECT_UNAUTHORIZED |
Set to 0 to disable SSL certificate validation (use with caution) |
No |
Usage
Start the Server
KIBANA_URL=http://your-kibana-server:5601 \
KIBANA_USERNAME=your-username \
KIBANA_PASSWORD=your-password \
NODE_TLS_REJECT_UNAUTHORIZED=0 \
npm start
Example MCP Client Configuration
Add to the Claude Desktop config file (MacOS path: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"kibana-mcp-server": {
"command": "node",
"args": ["/path/to/mcp-server-kibana/dist/index.js"],
"env": {
"KIBANA_URL": "http://your-kibana-server:5601",
"KIBANA_USERNAME": "your-username",
"KIBANA_PASSWORD": "your-password",
"NODE_TLS_REJECT_UNAUTHORIZED": "0"
}
}
}
}
Example Queries
- "What is the status of my Kibana server?"
- "List all available Kibana API endpoints."
- "Show details for the POST /api/saved_objects/_find endpoint."
- "Execute a custom API request for /api/status."
- "Get a list of all dashboards in Kibana."
- "Query API endpoints related to endpoint events."
- "List all case-related API endpoints."
- "Create a new case in Kibana."
- "Create a new dashboard in Kibana."
Two Prompt Modes in Claude Desktop
When using this server with Claude Desktop, two different prompt interaction modes are supported:
1. Tool-based Prompt Mode
- How it works: Claude Desktop can directly call server tools (such as
get_status,execute_api,search_kibana_api_paths, etc.) to answer your questions or perform actions. - Best for: Users who want a conversational, guided experience. The server will automatically search, execute, and explain Kibana APIs.
- Example: "Show all Kibana API endpoints related to saved objects."
- Testing tip: Select the
kibana-tool-expertprompt in Claude Desktop for integration testing, then start using it.
2. Resource-based Prompt Mode
- How it works: Claude Desktop interacts with the server via resource URIs (such as
kibana-api://pathsorkibana-api://path/GET/%2Fapi%2Fstatus), and the server returns structured data for Claude to parse. - Best for: Advanced users, MCP clients that only support resource access, or programming scenarios needing raw API metadata.
- Example: "Get resource kibana-api://paths?search=dashboard"
Note: The two endpoints in resources (kibana-api://paths and kibana-api://path/{method}/{encoded_path}) have corresponding base tools (list_all_kibana_api_paths, get_kibana_api_detail). This design ensures compatibility with MCP clients that cannot intelligently select multiple resources, making it easier for tools like Claude Desktop to interact with Kibana.
Tip: Most users are recommended to use tool mode for a more natural and powerful experience; resource mode offers maximum flexibility for advanced and compatibility use cases.
Development
Install dependencies:
npm install
Build the server:
npm run build
Auto-rebuild in development mode:
npm run watch
Debugging
Since the MCP server communicates via stdio, debugging can be inconvenient. It is recommended to use MCP Inspector:
npm run inspector
After starting, Inspector will provide a browser-accessible debugging tool URL.
Community
This project is community-maintained. Contributions and feedback are welcome! Please be respectful and inclusive in all communications, and follow the Elastic Community Code of Conduct.
License
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Troubleshooting
- Check if MCP configuration is correct
- Ensure the Kibana address is accessible
- Verify authentication credentials have sufficient permissions
- If using a custom CA, ensure the certificate path is correct and readable
- If using
NODE_TLS_REJECT_UNAUTHORIZED=0, be aware of security risks - Check error messages output in the terminal
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。