Elasticsearch

Elasticsearch

Official

Search indices, read mappings, and run ES|QL against Elasticsearch through Elastic's Agent Builder MCP endpoint.

Score 57(?)ElasticVerified Top MCPs for Databases →

Quick answer

What it does

Exposes Elastic Agent Builder tools over MCP from Kibana: list indices, aliases and data streams, read mappings, fetch a document by id, search from a natural-language request, and generate or run ES|QL. Custom Agent Builder tools appear alongside the built-ins.

Best for

  • ES|QL drafting and execution
  • Mapping inspection
  • Log search and debugging
  • Finding the right index for a question

Not for

  • Clusters older than 9.2
  • OpenSearch clusters

Source: top-mcps.com/mcp/elasticsearch — verified Nov 2026

Setup recipe

Pick your client, then follow the three steps.

  1. 1

    Install

    claude_desktop_config.json
    {
      "mcpServers": {
        "elasticsearch": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://{KIBANA_HOST}/api/agent_builder/mcp"
          ]
        }
      }
    }

    Claude Desktop launches stdio servers, so mcp-remote bridges to the hosted endpoint and opens the sign-in in your browser. On Pro, Max, Team and Enterprise you can skip the file: Settings → Connectors → Add custom connector → https://{KIBANA_HOST}/api/agent_builder/mcp. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").

    CLI or .mcp.json
    claude mcp add --transport http elasticsearch https://{KIBANA_HOST}/api/agent_builder/mcp

    Then run /mcp inside Claude Code to finish the sign-in. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").

    .cursor/mcp.json
    {
      "mcpServers": {
        "elasticsearch": {
          "url": "https://{KIBANA_HOST}/api/agent_builder/mcp"
        }
      }
    }

    Global path: ~/.cursor/mcp.json. Cursor shows "Needs login" once it connects — click it to authorize. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").

    .vscode/mcp.json
    {
      "servers": {
        "elasticsearch": {
          "type": "http",
          "url": "https://{KIBANA_HOST}/api/agent_builder/mcp"
        }
      }
    }

    VS Code uses the "servers" key. Run MCP: List Servers → Start Server and allow the sign-in. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").

    ~/.codeium/windsurf/mcp_config.json
    {
      "mcpServers": {
        "elasticsearch": {
          "serverUrl": "https://{KIBANA_HOST}/api/agent_builder/mcp"
        }
      }
    }

    Windsurf uses "serverUrl" for hosted servers. Open via Cascade → hammer icon → Configure. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").

    cline_mcp_settings.json
    {
      "mcpServers": {
        "elasticsearch": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote",
            "https://{KIBANA_HOST}/api/agent_builder/mcp"
          ]
        }
      }
    }

    Bridged through mcp-remote. Open via the Cline sidebar → MCP Servers → Edit. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").

    ~/.continue/config.json
    {
      "experimental": {
        "modelContextProtocolServers": [
          {
            "transport": {
              "type": "streamable-http",
              "url": "https://{KIBANA_HOST}/api/agent_builder/mcp"
            }
          }
        ]
      }
    }

    Continue takes the hosted URL directly in the transport block. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").

    CLI
    codex mcp add elasticsearch --url https://{KIBANA_HOST}/api/agent_builder/mcp

    Codex detects OAuth support and opens the browser to authorize. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").

    ~/.config/zed/settings.json
    {
      "context_servers": {
        "elasticsearch": {
          "command": {
            "path": "npx",
            "args": [
              "-y",
              "mcp-remote",
              "https://{KIBANA_HOST}/api/agent_builder/mcp"
            ]
          }
        }
      }
    }

    Bridged through mcp-remote under "context_servers". Settings live-reload on save. This endpoint expects an API key, usually as an Authorization header — set it where your client configures headers (mcp-remote: add --header "Authorization: Bearer <key>").

    ChatGPT → Settings → Connectors (remote URL)
    {
      "name": "Elasticsearch",
      "transport": "http",
      "url": "https://{KIBANA_HOST}/api/agent_builder/mcp"
    }

    Paste this into Settings → Connectors → Add custom connector. Requires ChatGPT Pro / Team / Enterprise / Edu with Developer mode enabled.

  2. 2

    Set required secrets

    No credentials required — this MCP runs over stdio without authentication.

  3. 3

    Try a minimum working prompt

    Minimum working prompt pending verification. Try any prompt from the MCP’s README once installed.

Tools & permissions

ToolDescriptionArgsSide effects
platform.core.list_indicesList the indices, aliases and data streams the connecting identity can access.—Read
platform.core.get_index_mappingReturn field mappings for one or more indices.—Read
platform.core.index_explorerFind the indices and mappings relevant to a natural-language question.—Read
platform.core.get_document_by_idFetch one document by index name and id.—Read
platform.core.searchSearch from a natural-language request, choosing Query DSL or ES|QL.—Read
platform.core.generate_esqlDraft an ES|QL query from a natural-language request.—Read
platform.core.execute_esqlRun an ES|QL query and return tabular results.—Read

Security & scope

Access scope
Read + write
Sandbox
Runs inside Kibana and acts with the API key or OAuth user that connects. Every tool call is bounded by that identity's Elasticsearch and Kibana privileges and by the Kibana space in the URL.
Gotchas
  • The API key's privileges are the boundary: create a key with read access to the index patterns the agent needs plus the Agent Builder Kibana privilege, never a superuser key.
  • Custom Agent Builder tools and workflow tools are exposed over the same endpoint; a tool that runs a workflow can send email or change data, so audit the space's tool list.
  • Search payloads can be large; ask the agent to cap result sizes on high-cardinality indices.
  • The deprecated container (`docker.elastic.co/mcp/server-elasticsearch`) gets only critical security fixes; do not start new setups on it.

Agent prompt pack

— copy into Claude, Cursor, or ChatGPT.
Paste into Claude, Cursor, or ChatGPT. Edit the [brackets] before sending.
Recommend the best MCP servers for [task: e.g. databases work] in [client: Claude].

Constraints:
- Prefer tools that are [official | open-source | read-only] — pick what matters for my use case.
- Exclude MCPs that require [e.g. a paid plan, OAuth-only flows, remote-only transport].
- Return at most 3 picks, ranked.

For each pick include:
1. One-sentence rationale.
2. The ready-to-paste install snippet for my client.
3. Any required secrets I need to create before installing.

Cross-check the top-mcps.com listing: https://top-mcps.com/top-mcps-for-databases
Compare Elasticsearch against a real alternative. Swap the second MCP in [brackets] if you want a different match.
Compare Elasticsearch MCP vs [Postgres MCP Pro MCP] for the following job: [describe the job, e.g. "let an agent create GitHub issues on bug triage"].

Judge them on:
- Setup time and complexity (what a new user hits first).
- Auth model (none / API key / OAuth 2.1) and credential risk.
- Transport (stdio / Streamable HTTP / SSE) and where the server runs.
- Required secrets and the blast radius if they leak.
- Operational risk in an unattended agent loop.
- Which one is "good enough" for a weekend prototype vs. production.

End with one sentence: which should I pick for my scenario, which is: [my scenario].

References:
- https://top-mcps.com/mcp/elasticsearch
- top-mcps.com listing for Postgres MCP Pro
Asks the agent to install and verify. Works inside Claude Code, Cursor Agent, Codex CLI.
Install the Elasticsearch MCP server for my [client: Claude] at the default config path for that client.

Use the exact install snippet published at https://top-mcps.com/mcp/elasticsearch (fetch https://top-mcps.com/mcp/elasticsearch.json for the canonical server.json if you can read URLs).

Before finishing:
1. Create the required secrets (no secrets) and put them in the appropriate env block — do not hard-code them.
2. Restart or reload the client so it picks up the new server.
3. Verify the server is connected (green / running state) and at least one tool is listed.
4. If anything fails, read the client's MCP logs and report the exact error — do not silently retry.

Confirm when done and list the tools the server now exposes.

Frequently asked questions

What changed

— 1 update tracked.
  1. Repointed from the deprecated elastic/mcp-server-elasticsearch container to Elastic's Agent Builder MCP endpoint in Kibana, which Elastic names as its replacement. Tools, install, auth and version notes rewritten from the Elastic docs.

More Databases MCPs

Other tools in the same category worth evaluating.

Postgres MCP ProPRO

Production-grade Postgres MCP with index advice, EXPLAIN, and health checks.

database, sql, postgres, performance
5 minMedium
SQLite

Local SQLite database access with full read/write support.

database, sqlite, local, storage
2 minLow

Full Supabase access: database, auth, storage, and edge functions.

supabase, database, backend, postgres
5 minLow

Compared with Elasticsearch

Side-by-side breakdowns for the choices people most often weigh against this MCP.

Exploring Top MCPs for Databases? See all Databases MCPs →