Skip to content
Back to search

mcp-server-kibana

MCP server for Kibana, Access search and manage Kibana in MCP Client.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/TocharianOU/mcp-server-kibana with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/TocharianOU/mcp-server-kibana'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tocharianou--mcp-server-kibana/badge.svg)](/listings/tocharianou--mcp-server-kibana)

HTML

<a href="/listings/tocharianou--mcp-server-kibana"><img src="/api/listings/tocharianou--mcp-server-kibana/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

# Global installation (recommended)
npm install -g @tocharianou/mcp-server-kibana

# Or use directly with npx
npx @tocharianou/mcp-server-kibana

From Source

git clone https://github.com/TocharianOU/mcp-server-kibana.git
cd mcp-server-kibana
npm install && npm run build

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 353 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/tocharianou-mcp-server-kibana-badge.png)](https://mseep.ai/app/tocharianou-mcp-server-kibana)
  2. # Kibana MCP Server
  3. [![npm version](https://badge.fury.io/js/@tocharianou%2Fmcp-server-kibana.svg)](https://www.npmjs.com/package/@tocharianou/mcp-server-kibana)
  4. [![Downloads](https://img.shields.io/npm/dm/@tocharianou/mcp-server-kibana.svg)](https://www.npmjs.com/package/@tocharianou/mcp-server-kibana)
  5. [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/TocharianOU/mcp-server-kibana)
  6. 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.
  7. > 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](https://www.elastic.co/docs/api/doc/kibana/).
  8. **This project is community-maintained and is not an official product of Elastic or MCP.**
  9. > **💡 Companion Project:** For complete Elastic Stack integration, pair this with [**Elasticsearch MCP Server**](https://github.com/TocharianOU/mcp-server-elasticsearch-sl) for direct Elasticsearch data operations.
  10. ---
  11. ## 🚀 Installation
  12. ```bash
  13. # Global installation (recommended)
  14. npm install -g @tocharianou/mcp-server-kibana
  15. # Or use directly with npx
  16. npx @tocharianou/mcp-server-kibana
  17. ```
  18. ### From Source
  19. ```bash
  20. git clone https://github.com/TocharianOU/mcp-server-kibana.git
  21. cd mcp-server-kibana
  22. npm install && npm run build
  23. ```
  24. ---
  25. ## 🎯 Quick Start
  26. ### Claude Desktop Integration (Recommended)
  27. Add to your Claude Desktop configuration file:
  28. - **MacOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
  29. - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
  30. ```json
  31. {
  32. "mcpServers": {
  33. "kibana": {
  34. "command": "npx",
  35. "args": ["@tocharianou/mcp-server-kibana"],
  36. "env": {
  37. "KIBANA_URL": "http://your-kibana-server:5601",
  38. "KIBANA_API_KEY": "your-api-key",
  39. "KIBANA_DEFAULT_SPACE": "default"
  40. }
  41. }
  42. }
  43. }
  44. ```
  45. ### Direct CLI Usage
  46. ```bash
  47. # Using API Key (recommended)
  48. KIBANA_URL=http://localhost:5601 \
  49. KIBANA_API_KEY=your-api-key \
  50. npx @tocharianou/mcp-server-kibana
  51. # Using Basic Auth
  52. KIBANA_URL=http://localhost:5601 \
  53. KIBANA_USERNAME=your-username \
  54. KIBANA_PASSWORD=your-password \
  55. npx @tocharianou/mcp-server-kibana
  56. # Using Cookie Auth
  57. KIBANA_URL=http://localhost:5601 \
  58. KIBANA_COOKIES="sid=xxx; security-session=yyy" \
  59. npx @tocharianou/mcp-server-kibana
  60. ```
  61. ### HTTP Mode (Remote Access)
  62. ```bash
  63. MCP_TRANSPORT=http \
  64. MCP_HTTP_PORT=3000 \
  65. KIBANA_URL=http://localhost:5601 \
  66. KIBANA_API_KEY=your-api-key \
  67. npx @tocharianou/mcp-server-kibana
  68. ```
  69. Access at: `http://localhost:3000/mcp`
  70. Health check: `http://localhost:3000/health`
  71. **Securing HTTP mode.** Every session on `/mcp` acts with the Kibana credentials the server was started with, so treat the endpoint as sensitive:
  72. - By default the server listens on `localhost` only and rejects requests whose `Host` header is not a loopback name (DNS rebinding protection).
  73. - To accept remote clients, set `MCP_BEARER_TOKEN`. Clients must then send `Authorization: Bearer <token>` on every `/mcp` request. `/health` stays open.
  74. - Binding to a non-loopback address (`MCP_HTTP_HOST=0.0.0.0`) without `MCP_BEARER_TOKEN` logs a warning at startup: anyone who can reach the port can use your Kibana credentials.
  75. - Behind a reverse proxy that forwards its public `Host` header to a localhost-bound server, list that hostname in `MCP_ALLOWED_HOSTS`.
  76. ```bash
  77. MCP_TRANSPORT=http \
  78. MCP_HTTP_HOST=0.0.0.0 \
  79. MCP_BEARER_TOKEN="$(openssl rand -hex 32)" \
  80. KIBANA_URL=http://localhost:5601 \
  81. KIBANA_API_KEY=your-api-key \
  82. npx @tocharianou/mcp-server-kibana
  83. ```
  84. ---
  85. ## ✨ Features
  86. ### Core Capabilities
  87. - **Dual transport modes**: Stdio (local) and HTTP (remote access)
  88. - **Multiple authentication methods**: API Key, Basic Auth, Cookie-based
  89. - **Multi-space support**: Enterprise-ready Kibana space management
  90. - **SSL/TLS support**: Custom CA certificate configuration
  91. - **Session management**: Automatic UUID generation for HTTP mode
  92. - **Dynamic API discovery**: Based on official Kibana OpenAPI specification
  93. ### Saved Objects Management
  94. - Complete CRUD operations for all Kibana saved object types
  95. - Intelligent search with pagination support
  96. - Bulk operations for efficient mass updates
  97. - Version control with optimistic concurrency
  98. - Reference management for object relationships
  99. ---
  100. ## 🔧 Configuration
  101. ### Required Variables
  102. | Variable | Description | Example |
  103. |----------|-------------|---------|
  104. | `KIBANA_URL` | Kibana server address | `http://localhost:5601` |
  105. ### Authentication (choose one method)
  106. | Variable | Description | Priority |
  107. |----------|-------------|----------|
  108. | `KIBANA_API_KEY` | API Key (base64 encoded) | 1st |
  109. | `KIBANA_USERNAME` + `KIBANA_PASSWORD` | Basic authentication | 2nd |
  110. | `KIBANA_COOKIES` | Session cookies | 3rd |
  111. ### Optional Variables
  112. | Variable | Description | Default |
  113. |----------|-------------|---------|
  114. | `KIBANA_DEFAULT_SPACE` | Default Kibana space | `default` |
  115. | `KIBANA_CA_CERT` | CA certificate path | - |
  116. | `KIBANA_PROXY` | Route all Kibana requests through a proxy. Schemes: `http://`, `https://`, `socks5://`, `socks5h://` (see [Proxy](#proxy)) | - |
  117. | `KIBANA_TIMEOUT` | Request timeout (ms) | `60000` |
  118. | `MCP_TRANSPORT` | Transport mode | `stdio` |
  119. | `MCP_HTTP_PORT` | HTTP server port | `3000` |
  120. | `MCP_HTTP_HOST` | HTTP server host | `localhost` |
  121. | `MCP_BEARER_TOKEN` | HTTP mode: require `Authorization: Bearer <token>` on `/mcp` | - |
  122. | `MCP_ALLOWED_HOSTS` | HTTP mode: extra hostnames accepted in the `Host` header (comma-separated) | - |
  123. | `NODE_TLS_REJECT_UNAUTHORIZED` | Disable SSL validation | `1` |
  124. ### Proxy
  125. Set `KIBANA_PROXY` when Kibana is only reachable through a proxy, for example a bastion host with an SSH dynamic port forward:
  126. ```bash
  127. ssh -N -D 1080 bastion
  128. ```
  129. ```json
  130. "env": {
  131. "KIBANA_URL": "https://kibana.internal.example:5601",
  132. "KIBANA_API_KEY": "<API_KEY>",
  133. "KIBANA_PROXY": "socks5h://127.0.0.1:1080"
  134. }
  135. ```
  136. - Supported schemes: `http://`, `https://`, `socks5://` and `socks5h://`. Credentials can be part of the URL (`socks5h://<user>:<password>@<host>:<port>`).
  137. - Use `socks5h` when the Kibana host name only resolves on the proxy side; with `socks5` it is resolved locally.
  138. - `KIBANA_CA_CERT` still applies to the TLS connection to Kibana.
  139. - `KIBANA_PROXY` takes precedence over `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY`. Without it, HTTP(S) proxies from those variables keep working as before; they do not support SOCKS.
  140. ---
  141. ## 🛠️ Available Tools
  142. ### Base Tools
  143. - `get_status` - Get Kibana server status
  144. - `execute_kb_api` - Execute custom Kibana API requests
  145. - `search_elasticsearch` - Search Elasticsearch documents and logs through Kibana's search API, within the user's Elasticsearch index privileges
  146. - `get_available_spaces` - List available Kibana spaces
  147. - `search_kibana_api_paths` - Search API endpoints
  148. - `list_all_kibana_api_paths` - List all API endpoints
  149. - `get_kibana_api_detail` - Get API endpoint details
  150. ### Saved Objects Tools
  151. - `vl_search_saved_objects` - Search saved objects (universal)
  152. - `vl_get_saved_object` - Get single saved object
  153. - `vl_create_saved_object` - Create new saved object
  154. - `vl_update_saved_object` - Update single saved object
  155. - `vl_bulk_update_saved_objects` - Bulk update operations
  156. - `vl_bulk_delete_saved_objects` - Bulk delete operations
  157. **Supported Object Types:** dashboard, visualization, index-pattern, search, config, lens, map, tag, canvas-workpad, canvas-element
  158. ### Analysis Tools (v0.6.0+)
  159. - `analyze_object_dependencies` - Analyze saved object dependencies
  160. - `analyze_deletion_impact` - Check impact before deletion
  161. - `check_dashboard_health` - Dashboard health check
  162. - `scan_all_dashboards_health` - Batch health scanning
  163. ### Elasticsearch Data Search
  164. 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.
  165. 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.
  166. 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.
  167. Example tool arguments for a bounded log search:
  168. ```json
  169. {
  170. "index": "application-logs-*",
  171. "body": {
  172. "size": 20,
  173. "_source": [
  174. "@timestamp",
  175. "message",
  176. "trace.id",
  177. "service.name"
  178. ],
  179. "sort": [
  180. { "@timestamp": "desc" }
  181. ],
  182. "query": {
  183. "bool": {
  184. "filter": [
  185. {
  186. "range": {
  187. "@timestamp": {
  188. "gte": "2025-01-15T10:00:00Z",
  189. "lt": "2025-01-15T11:00:00Z"
  190. }
  191. }
  192. },
  193. {
  194. "term": {
  195. "service.name.keyword": "example-service"
  196. }
  197. }
  198. ]
  199. }
  200. }
  201. }
  202. }
  203. ```
  204. 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.
  205. 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.
  206. ---
  207. ## 📖 Resources
  208. | Resource URI | Description |
  209. |--------------|-------------|
  210. | `kibana-api://paths` | List all available API endpoints |
  211. | `kibana-api://paths?search=<keyword>` | Search endpoints by keyword |
  212. | `kibana-api://path/{method}/{encoded_path}` | Get specific endpoint details |
  213. ---
  214. ## 💬 Example Queries
  215. ### Basic Operations
  216. - "What is the status of my Kibana server?"
  217. - "List all available Kibana spaces"
  218. - "Show me all API endpoints related to dashboards"
  219. ### Elasticsearch & Logs
  220. - "Search the production logs for errors from service X in the last hour"
  221. - "Find this trace id and show the surrounding log events in chronological order"
  222. - "Search index application-logs-* using this Elasticsearch Query DSL"
  223. - "Aggregate error counts by service for this time range"
  224. ### Saved Objects
  225. - "Search for all dashboards"
  226. - "Find visualizations containing 'nginx' in the title"
  227. - "Create a new dashboard named 'Sales Overview'"
  228. - "Update the description of dashboard 'my-dashboard-123'"
  229. - "Delete multiple dashboards by their IDs"
  230. ### Health & Analysis
  231. - "Check health of dashboard 'overview'"
  232. - "Analyze dependencies for visualization 'viz-123'"
  233. - "Scan all dashboards for health issues"
  234. ---
  235. ## 🐛 Troubleshooting
  236. ### Connection Issues
  237. - Verify Kibana URL is accessible
  238. - Check authentication credentials
  239. - For SSL issues: `NODE_TLS_REJECT_UNAUTHORIZED=0` (use with caution)
  240. ### Claude Desktop Issues
  241. - Restart Claude Desktop after config changes
  242. - Validate JSON config syntax
  243. - Check console logs for errors
  244. ### Common Errors
  245. - **"import: command not found"**: Update to latest version
  246. - **Authentication failed**: Verify credentials and permissions
  247. - **SSL errors**: Check CA certificate or disable SSL validation
  248. - **403 from `/api/console/proxy` while searching Elasticsearch**: Use `search_elasticsearch`. The Console proxy can require the Kibana Dev Tools privilege even when the user has permission to read the target indices.
  249. ---
  250. ## 🔍 Debugging
  251. Use MCP Inspector for debugging:
  252. ```bash
  253. npm run inspector
  254. ```
  255. This provides a browser-accessible debugging interface.
  256. ---
  257. ## 📦 Package Information
  258. - **NPM**: [@tocharianou/mcp-server-kibana](https://www.npmjs.com/package/@tocharianou/mcp-server-kibana)
  259. - **GitHub**: [TocharianOU/mcp-server-kibana](https://github.com/TocharianOU/mcp-server-kibana)
  260. - **Node.js**: >= 18.0.0
  261. - **License**: Apache 2.0
  262. ---
  263. ## 🤝 Contributing
  264. This project is community-maintained. Contributions and feedback are welcome!
  265. Please follow the [Elastic Community Code of Conduct](https://www.elastic.co/community/codeofconduct) in all communications.
  266. ---
  267. ## 📄 License
  268. Apache License 2.0 - See [LICENSE](LICENSE) file for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.