Kibana MCP server

Provides direct access to Kibana's API endpoints for querying server status, executing custom requests, and exploring available endpoints through a searchable interface for monitoring Elasticsearch clusters, managing visualizations, and troubleshooting deployments.
Back to servers
Setup instructions
Provider
TocharianOU
Release date
May 03, 2025
Stats
23 stars

The Kibana MCP server allows MCP-compatible clients like Claude Desktop to access your Kibana instance through natural language or programmatic requests. This server acts as a bridge between MCP clients and Kibana's API endpoints.

Installation

Quick Install

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

# Or local installation
npm install @tocharian/mcp-server-kibana

Alternative: From Source

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

Quick Start

Method 1: Direct CLI Usage

# Set your Kibana credentials and run
KIBANA_URL=http://your-kibana-server:5601 \
KIBANA_USERNAME=your-username \
KIBANA_PASSWORD=your-password \
npx @tocharian/mcp-server-kibana

Method 2: Claude Desktop Integration (Recommended)

Add to your Claude Desktop configuration file:

Config file locations:

  • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "kibana-mcp-server": {
      "command": "npx",
      "args": ["@tocharian/mcp-server-kibana"],
      "env": {
        "KIBANA_URL": "http://your-kibana-server:5601",
        "KIBANA_USERNAME": "your-username",
        "KIBANA_PASSWORD": "your-password",
        "KIBANA_DEFAULT_SPACE": "default",
        "NODE_TLS_REJECT_UNAUTHORIZED": "0"
      }
    }
  }
}

Method 3: Using Environment File

# Create .env file
cat > kibana-mcp.env << EOF
KIBANA_URL=http://your-kibana-server:5601
KIBANA_USERNAME=your-username
KIBANA_PASSWORD=your-password
NODE_TLS_REJECT_UNAUTHORIZED=0
EOF

# Run with environment file
env $(cat kibana-mcp.env | xargs) npx @tocharian/mcp-server-kibana

Features

  • Connect to local or remote Kibana instances
  • Secure authentication (username/password)
  • SSL/TLS and custom CA certificate support
  • Multi-space support for enterprise Kibana environments
  • 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

Available 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_objects
  • kibana-api://path/GET/%2Fapi%2Fstatus

Available Tools

Tool Name Description Input Parameters
get_status Get the current status of the Kibana server space (optional string) - Target Kibana space
execute_api Execute a custom Kibana API request method (GET/POST/PUT/DELETE), path (string), body (optional), params (optional), space (optional string)
get_available_spaces Get available Kibana spaces and current context include_details (optional boolean) - Include full space details
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)

Prompt Modes

When using this server with Claude Desktop, two different prompt interaction modes are supported:

Tool-based Prompt Mode

  • How it works: Claude Desktop can directly call server tools (such as get_status, execute_api, etc.) to answer questions or perform actions.
  • Best for: Users who want a conversational, guided experience.
  • Testing tip: Select the kibana-tool-expert prompt in Claude Desktop for integration testing.

Resource-based Prompt Mode

  • How it works: Claude Desktop interacts with the server via resource URIs and the server returns structured data.
  • Best for: Advanced users, MCP clients that only support resource access, or programming scenarios needing 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_DEFAULT_SPACE Default Kibana space (default: 'default') No
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

Troubleshooting

Common Issues

"import: command not found" error

# Make sure you're using the latest version
npm install -g @tocharian/mcp-server-kibana@latest

# Or try using node directly
node $(which mcp-server-kibana)

Connection issues

  • Verify Kibana URL is accessible
  • Check authentication credentials
  • For SSL issues, try setting NODE_TLS_REJECT_UNAUTHORIZED=0

Claude Desktop not detecting the server

  • Restart Claude Desktop after config changes
  • Check config file syntax with a JSON validator
  • Verify environment variables are set correctly

Example Queries

  • "What is the status of my Kibana server?"
  • "List all available Kibana spaces I can access."
  • "List all available Kibana API endpoints."
  • "Show details for the POST /api/saved_objects/_find endpoint."
  • "Get a list of all dashboards in Kibana."
  • "Query API endpoints related to endpoint events."
  • "Create a new dashboard in Kibana."

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "kibana-mcp-server" '{"command":"npx","args":["@tocharian/mcp-server-kibana"],"env":{"KIBANA_URL":"http://your-kibana-server:5601","KIBANA_USERNAME":"your-username","KIBANA_PASSWORD":"your-password","KIBANA_DEFAULT_SPACE":"default","NODE_TLS_REJECT_UNAUTHORIZED":"0"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "kibana-mcp-server": {
            "command": "npx",
            "args": [
                "@tocharian/mcp-server-kibana"
            ],
            "env": {
                "KIBANA_URL": "http://your-kibana-server:5601",
                "KIBANA_USERNAME": "your-username",
                "KIBANA_PASSWORD": "your-password",
                "KIBANA_DEFAULT_SPACE": "default",
                "NODE_TLS_REJECT_UNAUTHORIZED": "0"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "kibana-mcp-server": {
            "command": "npx",
            "args": [
                "@tocharian/mcp-server-kibana"
            ],
            "env": {
                "KIBANA_URL": "http://your-kibana-server:5601",
                "KIBANA_USERNAME": "your-username",
                "KIBANA_PASSWORD": "your-password",
                "KIBANA_DEFAULT_SPACE": "default",
                "NODE_TLS_REJECT_UNAUTHORIZED": "0"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later