Elastic / Kibana MCP Server Skill: Connecting Kibana Agent Builder to the MCP Host

Introduction

Operations and security teams routinely use Kibana to query logs, run ES|QL, and utilize Agent Builder tools. If you wish to allow MCP hosts like Cursor or Claude Desktop to directly invoke these same capabilities, you need to know the MCP endpoints exposed by Kibana, the authentication methods, and the client configuration format, rather than manually digging through documentation and piecing together JSON every time.

The Skill introduced below comes from the SkillHub community coordinate @user_3c6cb52e/elastic-kibana-mcp-server (v1.0.0, category it-ops-security). It does not implement an MCP service independently; rather, it guides Agents to the official Elastic Agent Builder MCP capabilities and documentation. The SKILL.md within the Skill package also states that it cannot automatically extract complete installation steps, so sensitive environments should verify the upstream source before enabling it.

What is this?

One-sentence positioning: A Skill entry for Large Language Model (LLM) Agents, themed around connecting to the Elastic Agent Builder MCP server on Kibana via the Model Context Protocol.

Maintenance and Source: The SkillHub page shows the publisher as user_3c6cb52e and the source as community. The Skill metadata points the upstream to elastic/elasticsearch and references the Elasticsearch Reference Documentation. The actual MCP behavior is provided by the Kibana Agent Builder within the Elastic Stack / Elastic Cloud, rather than installing an independent binary within the Skill directory.

Problem Solved: It enables Agents to follow unified instructions during conversations—endpoint paths, Spaces, and authentication options—to configure MCP hosts, thereby allowing the use of Agent Builder tools in external clients (e.g., the official documentation cites running ES|QL in Claude Desktop without opening the Kibana UI).

Core Features

The following capabilities are derived from the official description of the Elastic Agent Builder MCP server. The Skill’s role is to write these constraints into the Agent’s workflow, rather than replacing the Kibana service.

  1. Standardized MCP Interface
    External MCP hosts connect to Kibana to use the tools configured in Agent Builder (built-in and custom tools; note that some tools only applicable to Agent Builder chat may not be exposed via MCP, subject to the official built-in tools description).

  2. Fixed Endpoint Forms

    • Default Space: {KIBANA_URL}/api/agent_builder/mcp
    • Custom Kibana Space: {KIBANA_URL}/s/{SPACE_NAME}/api/agent_builder/mcp
      The MCP server URL can be copied from the Kibana Tools interface.
  3. Authentication Paths

    • API Key: Suitable for Elastic Stack and Serverless, ideal for automated, unattended machine-to-machine access.
    • OAuth 2.1 (Application connections): Suitable for interactive hosts like Claude Desktop and Cursor in Serverless scenarios; supports individual authorization for multiple users.
      If Kibana application permissions such as feature_agentBuilder.read are missing, the connection endpoint will return 403 Forbidden (see API Key documentation).
  4. Cross-Project Data
    If multiple projects are associated via cross-project search, tool calls will use the default cross-project search scope of the Space corresponding to the MCP URL; if the URL does not contain /s/{SPACE}, the default Space is used.

The SkillHub tag requires_api_key=false indicates that no SkillHub API Key is required to install this Skill; however, connecting to Kibana MCP still requires configuring an API Key or OAuth according to Elastic documentation.

Installation and Activation

1. Install SkillHub CLI (if not already installed)

Check or install according to the SkillHub Installation Instructions:

command -v skillhub && skillhub --version

If not installed, you can execute the full installation script (the recommended method in the documentation):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install the Skill into the current Agent’s skills directory

The installation prompt provided by the SkillHub page is: According to the aforementioned installation documentation, install the coordinate @user_3c6cb52e/elastic-kibana-mcp-server. The command form is as follows (--dir must point to the skills directory recognized by the current host, otherwise it defaults to ./skills/ and may not be loaded):

skillhub install @user_3c6cb52e/elastic-kibana-mcp-server --dir <skills directory>

Common paths (excerpted from SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, restart or refresh the Agent according to your client’s requirements to enable SKILL.md.

3. Configure Kibana on the MCP host side (Necessary step alongside the Skill)

The Skill package does not provide a one-click installation script that can be automatically verified; what truly enables query capabilities is the configuration of Kibana by the MCP host. The API Key method example provided in Elastic documentation (applicable to Claude Desktop, Cursor, VS Code, etc.) is as follows.

First, create an API Key with Agent Builder read permissions (excerpted; see official documentation for full fields):

POST /_security/api_key
{
  "name": "my-mcp-api-key",
  "expiration": "30d",
  "role_descriptors": {
    "mcp-access": {
      "cluster": ["monitor_inference"],
      "indices": [
        {
          "names": ["*"],
          "privileges": ["read", "view_index_metadata"]
        }
      ],
      "applications": [
        {
          "application": "kibana-.kibana",
          "privileges": ["feature_agentBuilder.read", "feature_actions.read"],
          "resources": ["space:default"]
        }
      ]
    }
  }
}

Add the remote endpoint to the MCP configuration (forwarding headers via mcp-remote):

{
  "mcpServers": {
    "elastic-agent-builder": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "${KIBANA_URL}/api/agent_builder/mcp",
        "--header",
        "Authorization:${AUTH_HEADER}"
      ],
      "env": {
        "KIBANA_URL": "${KIBANA_URL}",
        "AUTH_HEADER": "ApiKey ${API_KEY}"
      }
    }
  }
}

Environment variable example:

export KIBANA_URL="your-kibana-url"
export API_KEY="your-api-key"

If using a custom Space, replace the path in the URL with /s/{SPACE_NAME}/api/agent_builder/mcp. For Serverless scenarios requiring individual identity for multiple users, you can switch to the OAuth 2.1 application connection flow described in the documentation.

Typical Usage

With both the Skill and MCP ready, the workflow is typically divided into two layers:

  1. Agent (Skill) Layer
    Determine whether to use Kibana MCP based on user intent: confirm the target Space, index scope, and suitability of API Key or OAuth. Remind about the principle of least privilege (e.g., restrict API Keys to logs-*, metrics-* etc. in production environments; official best practices contain complete JSON examples).

  2. MCP Tool Layer
    After the host connects to {KIBANA_URL}/api/agent_builder/mcp, it invokes the tools exposed by the Elastic Agent Builder. The official documentation provides an example: running ES|QL on your data in an external client without opening Kibana.

Specific tool names and parameters are subject to the current Elastic version and the Agent Builder tools enabled in the project; the Agent should read the Skill and Elastic documentation first to avoid hallucinating index names or field names.

Applicable Scenarios and Notes

Who is it for

  • Teams that have deployed Elastic Stack 9.3+ (or 9.2 preview) or Elastic Cloud Serverless and have enabled Agent Builder.
  • Those who wish to reuse Kibana-side tools within MCP hosts like Cursor / Claude Desktop / VS Code, while using Skills to constrain the Agent’s configuration and compliance check steps.
  • Observability and security operations conversation scenarios covered by the SkillHub category it-ops-security.

Limitations and Pitfalls

  • The Skill text explicitly states: Installation and usage methods that are not automatically extracted or backed by the upstream should not be executed directly in sensitive processes; before production, ensure you verify against the original text of the MCP server and API Key authentication.
  • MCP and Skill are two layers: Installing only the Skill will not automatically create a Kibana connection; configuring only MCP without installing the Skill may result in the Agent lacking reminders regarding index permissions and endpoint formats.
  • The API Key must include feature_agentBuilder.read, and it is recommended to set an expiration time and minimal index permissions.
  • SkillHub statistics (at time of crawl): Rating 100000, Downloads 1209, Install count 0; subject to real-time page data.

Conclusion

The value of the Elastic / Kibana MCP server Skill lies in condensing the endpoints, authentication, and client configuration of the Kibana Agent Builder MCP into instructions that Agents can execute, aligning with the SkillHub installation flow @user_3c6cb52e/elastic-kibana-mcp-server. The capabilities themselves are still provided by the official Elastic MCP service.

  • SkillHub API Entry: https://api.skillhub.cn/user_3c6cb52e/elastic-kibana-mcp-server
  • SkillHub Page: https://www.skillhub.cn/skills/user_3c6cb52e/elastic-kibana-mcp-server
  • Elastic MCP Documentation: https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/mcp-server
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye