Elastic MCP server: deprecated, and what replaced it
Elastic's two MCP servers include a deprecated package with fewer tools than its documentation describes.
Last verified 1 September 2026 · from Elastic's repository, its documentation and the server's own tools/list response
This page is one of 90 in a directory of monitoring and developer tools. Each page checks what an AI coding agent can get out of the tool through its MCP server, the connector that lets the agent query the tool directly.
Summary
The Elastic MCP server for Elasticsearch is official, and it is deprecated. The README states it will only receive critical security updates.
The successor is named and first-party: the Elastic Agent Builder MCP endpoint, available in Elastic 9.2.0 and later and on Elasticsearch Serverless. That is where the development went.
The deprecated server is also among the smallest connectors here. Four tools cost about 374 tokens, a fifth of one percent of a 200,000-token window. They are cheap because they reach very little. Seven measured connectors cost less, Aviator among them at 57.
What is the Elastic MCP server?
It is Elastic's server for the Model Context Protocol. The agent gains a small set of tools for listing indices, reading mappings and running a search.
There are two surfaces and only one is developed. The standalone server, @elastic/mcp-server-elasticsearch, is the deprecated one. The Agent Builder MCP endpoint is built into Elastic 9.2.0 and later, and into Serverless projects, and is where Elastic directs users.
The standalone server is a thin wrapper over the search API. It reads; it does not write, index or administer.
Elastic's deprecated server searches Elasticsearch; its named successor is the Agent Builder endpoint in Elastic 9.2.0 and later. Both concern queried operational data, not development workflow, model traces or billing.
| Part of the work | What Elastic has here | Can an agent reach it |
|---|---|---|
| Code, tests & review | None | No code-review product |
| CI & release | None | No CI product, and no build or test pipeline |
| Production observability | Indices holding logs and metrics | Partial through this connector. An agent can search an index it is told about. There is no logs, APM or alerting surface among the four tools |
| Agent observability & evals | None | No traces, evaluations or prompt versioning for your own agents |
| AI cost management | None | No token or model spend data |
For an agent, Elastic answers questions you can express as a query against an index you already know exists. An agent connected here can search logs and read a mapping. It cannot list your alerts, read an APM trace or tell you what changed, so this connector is a search box rather than an observability platform.
What can an AI agent do with Elastic?
| Task | Tools | Works | Watch out for |
|---|---|---|---|
| Find out what data exists | list_indices get_mappings | Yes | Mappings tell the agent the field names, which it needs before writing a query |
| Search logs for an error | search | Yes | A single query API. Result size is whatever the query asks for and the cluster allows |
| Check cluster health | get_shards | Yes | Returns shard-level detail only, the pieces an index is split across. This is not a cluster health product |
| Run an ES|QL query | No | Documented in the repository README, but not registered by the npm package. See the limits below | |
| Read an APM trace | No | No APM tools. Elastic has the product; this connector does not reach it | |
| Read or acknowledge an alert | No | No alerting tools of any kind |
4 tools registered by the npm package, all on by default
- Discovery2
list_indicesget_mappings- Querying1
search- Cluster1
get_shards
Four, not the five the repository README documents. npm's latest is 0.3.1 while the repository's latest tag is v0.4.6, and esql is not in the published package. Counted from the server's own tools/list response on 19 August 2026.
What connecting costs before the first question
A context window is the amount of text a model can hold at once, and connecting uses some of it before the agent asks anything. Every tool the server registers sends its name, description and input schema to the model when the session starts. The tool list is charged whether or not a single tool is called.
This is among the cheapest connectors in the guide, and cheapness is not the point. Four tools cost almost nothing because four tools reach almost nothing. Grafana's default set costs about forty times as much and answers questions this server cannot.
| Tool set | Tools | Tokens (GPT-5.6, GPT-5.5) | Tokens (GPT-4, GPT-3.5) | Tokens (Claude Haiku 4.5 to Opus 5) | Share of a 200,000-token window |
|---|---|---|---|---|---|
| Every tool, as registered | 4 | 374 to 582 | 367 to 580 | 987 to 1,015 | 0.2% to 0.5% |
Encodings: GPT-5.6, GPT-5.5 o200k_base; GPT-4, GPT-3.5 cl100k_base; Claude Haiku 4.5 to Opus 5 count_tokens. Counted 19 August 2026 from tools/list on @elastic/mcp-server-elasticsearch 0.3.1, the npm latest. It was run locally with a placeholder URL and key.
Registration is static, so no Elasticsearch instance was involved. Figures cover name, description and input schema. The two models in column one share the o200k_base encoding, so they get one count. The spread is formatting, about 56%. Reasoning tokens are output, spent per request. This count is input, charged once at connection.
The Claude figures are measured rather than encoded. Anthropic publishes no local tokenizer. The definitions were sent to the API's count_tokens endpoint, and a no-tools baseline was subtracted. The range covers two tokenizer generations rather than two serializations. Haiku 4.5 and Opus 4.6 sit at the low end. Opus 5 and Sonnet 5 sit at the high end. The gap between them is a small fraction.
Elastic MCP server limits: where answers come back incomplete
Two of the three limits below are about which version you are actually running, which is the recurring problem with a deprecated package.
The agent says: “There is no tool for running an ES|QL query.” The agent is right. The README is out of date.
The repository README lists five tools and includes esql. The npm package registers four, and esql is not among them. The four are list_indices, get_mappings, search and get_shards.
The cause is a version gap. npm's latest is 0.3.1, last published 10 July 2026, while the repository's latest tag is v0.4.6. A client that installs with npx gets the older server, and the README it reads on GitHub describes the newer one.
Guard: Have the agent list its own tools before you trust a documented one to exist. For ES|QL, use the Agent Builder endpoint rather than the standalone server.
The agent says: “Elasticsearch is connected.” It is, and the server is deprecated.
Deprecation does not break a connector. Elastic states this one will only receive critical security updates going forward, and names the Agent Builder MCP endpoint as its replacement, available in Elastic 9.2.0 and later and in Serverless projects.
Guard: If your cluster is on 9.2.0 or later, connect Agent Builder instead. The standalone server is a bridge for older clusters.
The agent says: “The SSE transport failed.” SSE is deprecated on this server.
The README states Server-Sent Events is deprecated and directs users to streamable HTTP. A client configured for SSE from an older example will fail or degrade without a clear message.
Guard: Configure streamable HTTP, or stdio for a local process.
How to configure Elastic MCP for agents
- 1
Check your Elasticsearch version first
On 9.2.0 or later, the Agent Builder MCP endpoint is the supported route and this server is the bridge for older clusters.
- 2
Use an API key scoped to the indices you want read
Elastic's own guidance is minimal permissions, and read-only access to specific indices where possible.
- 3
Configure streamable HTTP, not SSE
The README states SSE is deprecated on this server, so a client copied from an older example may fail without a clear message.
- 4
Expect four tools
The documented fifth tool,
esql, runs ES|QL, Elastic's own query language. The published package does not register it, so plan aroundsearch.
Paste this into your agent’s instructions
This server returns exactly what the query asked for, so its silent failure is scope: an agent that searched one index and reports a negative answer sounds the same as one that searched everything.
When you answer using Elasticsearch MCP tools, state: - Which indices you searched, and the time range in the query. - The result size you requested, and whether the response hit it. A full page of hits is not evidence there are no more. - Which fields you filtered on, taken from get_mappings rather than assumed. Never state that data does not exist. State that none was returned under the constraints above. Write your answer in ASD-STE100 Simplified Technical English. Use short sentences with one idea in each.
Do you need the MCP server at all?
Often not. Elasticsearch's REST API is fully documented, and a coding agent can call it directly with the same API key. The four tools here are thin wrappers over _cat/indices, _mapping, _search and _cat/shards.
The Agent Builder endpoint is the exception and the reason to stay with MCP. It is built into the product, is where Elastic develops, and reaches further than a search wrapper.
For a cluster too old for Agent Builder, the standalone server still saves an agent from hand-rolling requests, and the cost is four tool definitions.
On Elastic 9.2.0 or later, use Agent Builder. On older clusters, the standalone server or the REST API both work, and neither is being developed further.
Elastic MCP server setup
The package runs with npx and needs ES_URL plus a credential: either ES_API_KEY, or ES_USERNAME and ES_PASSWORD.
ES_SSL_SKIP_VERIFY exists for self-signed certificates. Setting it disables certificate verification, so use it only against a cluster you control.
Claude Code
An API key scoped to the indices the agent should read is the safer credential here.
claude mcp add-json "elasticsearch" '{"command":"npx",
"args":["-y","@elastic/mcp-server-elasticsearch"],
"env":{"ES_URL":"https://your-cluster:9200",
"ES_API_KEY":"<your-api-key>"}}'Cursor
In ~/.cursor/mcp.json for all projects, or .cursor/mcp.json in one.
{"mcpServers":{"elasticsearch":{"command":"npx",
"args":["-y","@elastic/mcp-server-elasticsearch"],
"env":{"ES_URL":"https://your-cluster:9200",
"ES_API_KEY":"<your-api-key>"}}}}Codex CLI
Codex reads TOML, so the JSON blocks above will not transfer.
[mcp_servers.elasticsearch]
command = "npx"
args = ["-y", "@elastic/mcp-server-elasticsearch"]
env = { ES_URL = "https://your-cluster:9200", ES_API_KEY = "<your-api-key>" }Every other client
Each block below is the configuration for one client, with the file path and the key that client expects.
Claude Desktop
macOS ~/Library/Application Support/Claude/claude_desktop_config.json. Windows %APPDATA%\Claude\claude_desktop_config.json. There is no CLI. Edit through Settings, Developer, Edit Config.
Quit and restart fully for changes to load. Paths in args must be absolute. Logs at ~/Library/Logs/Claude/mcp.log.
{"mcpServers":{"elasticsearch":{"command":"npx",
"args":["-y","@elastic/mcp-server-elasticsearch"],
"env":{"ES_URL":"https://your-cluster:9200","ES_API_KEY":"<your-api-key>"}}}}Gemini CLI
~/.gemini/settings.json globally, or .gemini/settings.json per project. Key mcpServers. CLI: gemini mcp add.
{"mcpServers":{"elasticsearch":{"command":"npx",
"args":["-y","@elastic/mcp-server-elasticsearch"],
"env":{"ES_URL":"https://your-cluster:9200","ES_API_KEY":"<your-api-key>"}}}}VS Code Copilot
.vscode/mcp.json per workspace, or your user profile. CLI: code --add-mcp.
{"servers":{"elasticsearch":{"command":"npx",
"args":["-y","@elastic/mcp-server-elasticsearch"],
"env":{"ES_URL":"https://your-cluster:9200","ES_API_KEY":"<your-api-key>"}}}}The key is `servers`, not `mcpServers`. VS Code is the only client that uses that name, and copying a config from anywhere else fails silently.
Windsurf
~/.codeium/windsurf/mcp_config.json, which is the path Windsurf documents. Key mcpServers, the same JSON shape as Cursor, carrying the same API key.
Zed
~/.config/zed/settings.json, carrying the same API key as the blocks above.
The key is `context_servers`. Zed does not call them MCP servers in config, so searching its settings for mcp finds nothing.
Google Antigravity
~/.gemini/config/mcp_config.json globally, or .agents/mcp_config.json per project. Key mcpServers. There is no CLI. Use the /mcp overlay in the editor. Supports stdio, streamable HTTP, SSE and websocket.
{"mcpServers":{"elasticsearch":{"command":"npx",
"args":["-y","@elastic/mcp-server-elasticsearch"],
"env":{"ES_URL":"https://your-cluster:9200","ES_API_KEY":"<your-api-key>"}}}}Amp (Sourcegraph)
~/.config/amp/settings.json or .amp/settings.json, carrying the same API key. The amp mcp CLI covers approve, doctor and oauth.
The key is `amp.mcpServers`, namespaced. A bare mcpServers block is ignored.
Cline
~/.cline/mcp.json per the docs. The source also reads ~/.cline/data/settings/cline_mcp_settings.json. Key mcpServers, standard JSON shape, carrying the same API key. Supports stdio, streamable HTTP and SSE.
Goose (Block)
~/.config/goose/config.yaml, carrying the same API key.
YAML, and servers are called `extensions`. Goose does not use the MCP vocabulary in config at all. Add one interactively with goose configure, or per session with goose session --with-extension.
Kiro (AWS)
.kiro/settings/mcp.json per workspace, or ~/.kiro/settings/mcp.json globally. Key mcpServers, standard JSON shape, carrying the same API key.
Warp
~/.warp/.mcp.json or .warp/.mcp.json. Key mcpServers, standard shape, carrying the same API key. Also addable through the /agent-add-mcp skill.
JetBrains Junie
.junie/mcp/mcp.json per project, or ~/.junie/mcp/mcp.json. Key mcpServers, carrying the same API key. Use /mcp in the CLI to manage.
Roo Code
.roo/mcp.json per project. The global file is mcp_settings.json, opened from the Roo Code MCP settings view with Edit Global MCP. Key mcpServers, carrying the same API key.
Continue
.continue/mcpServers/*.yaml, one file per server, carrying the same API key.
YAML, and `mcpServers` is a list, not an object. Every JSON client keys servers by name. Continue takes an array, so a converted config will not parse.
Trae
.trae/mcp.json per project, or paste into the UI under Raw Config (JSON). Key mcpServers, standard shape, carrying the same API key.
Devin
Devin has no config file to edit. Servers are added through a web form in the settings UI, and Devin's documentation states you do not need to write or paste JSON. The block below is the shape those fields describe, shown for reference. Either route uses the same API key.
Username and password
Where API keys are not available. The same permission advice applies.
ES_URL=https://your-cluster:9200 \ ES_USERNAME=<user> ES_PASSWORD=<password> \ npx -y @elastic/mcp-server-elasticsearch
Read-only access, permissions and security
Read-only by construction
All four tools read. This is one of the few connectors in this guide that cannot write, without needing a flag to say so.
Scope the API key to indices
Elastic's guidance is minimal permissions and read-only access to specific indices where possible, which the four-tool list makes practical.
ES_SSL_SKIP_VERIFYdisables certificate verificationIt exists for self-signed certificates; using it against anything you do not control removes the transport's protection.
Deprecated means security fixes only
Elastic states the server will receive critical security updates and nothing else, so plan for the Agent Builder endpoint.
Troubleshooting
- There is no tool for ES|QL
- The published npm package registers four tools and
esqlis not among them. npm's latest is 0.3.1 while the repository tag is v0.4.6. Use the Agent Builder endpoint for ES|QL. - The SSE transport fails
- SSE is deprecated on this server. Configure streamable HTTP, or stdio for a local process.
- Certificate errors against a self-managed cluster
ES_SSL_SKIP_VERIFYbypasses verification. Prefer installing the cluster's CA where you can, because the flag removes the check entirely.- The agent cannot find a field it expects
- Have it call
get_mappingsfirst. Field names come from the mapping, and a query written from memory fails silently as an empty result.
Elastic MCP server: Reference
| Item | Value |
|---|---|
| Status | Deprecated, security fixes only · repository tag v0.4.6 · npm 0.3.1 |
| Adoption | 705 stars · Apache 2.0 license |
| Package | @elastic/mcp-server-elasticsearch on npm, plus a Docker image |
| Transport | stdio and streamable HTTP. SSE is deprecated |
| Auth | ES_API_KEY, or ES_USERNAME and ES_PASSWORD |
| Tools | 4 in the published package · 5 documented in the repository |
| Read-only | By construction. All four tools read |
| Successor | Elastic Agent Builder MCP endpoint, Elastic 9.2.0+ and Serverless |
What engineers report
Elastic's standalone MCP server has 705 stars and a clear deprecation notice, so the useful signals are versions rather than opinions.
| What was checked | What it shows |
|---|---|
| Stars | 705 |
| Repository latest tag | v0.4.6 |
| npm latest | 0.3.1, published 10 July 2026 |
| Tools registered by the npm package | 4 |
| Tools listed in the repository README | 5 |
“The
get_mappingstool throws error decoding response body if a nested property is defined without explicitly specifying nested, even though the mapping is valid according to Elasticsearch specifications.”
“I deployed the MCP Server using docker and entered the container to confirm that the environment variables ES_USERNAME, ES_PASSWORD, and even ES_lOGIN configuration were all correct. However, it still said that my identity authentication failed.”
Repository facts from the GitHub API and package facts from the npm registry, both retrieved 19 August 2026. Tool counts come from the server's own tools/list response, not from the README.
Should you connect an agent to Elastic?
Yes, though it is no longer actively maintained. Best for older clusters as a bridge. On 9.2.0 or later, connect Agent Builder instead.
- Strongest fit
- Teams on Elasticsearch clusters older than 9.2.0 who want an agent to search indices without hand-rolling REST calls.
- Main advantage
- It is tiny and cheap to connect, and it gives an agent the mappings it needs before writing a query.
- Main weakness
- Four tools reach almost nothing: no APM, no alerting, and no ES|QL on the published package.
- Operational risk
- Deprecated to security fixes only, and the npm package is behind the repository, so the documentation describes a server you may not be running.
From Oodle
One platform for agent traces and infrastructure
Agent traces usually sit in a different product from the rest of your telemetry, so when a slow database makes an agent slow the symptom is in one tool and the cause is in another. Oodle keeps both in one query surface, from $10 per million spans.
See agent observabilityFrequently asked questions
Is the Elastic MCP server deprecated?
Yes. The README states it will only receive critical security updates, and names the Elastic Agent Builder MCP endpoint as the successor, available in Elastic 9.2.0 and later and on Serverless.
How many tools does it have?
Four on the published npm package: list_indices, get_mappings, search and get_shards. The repository README lists five, adding esql. Counted from the server's own tools/list response on 19 August 2026.
Why does the documentation list a tool I do not have?
npm's latest is 0.3.1 while the repository's latest tag is v0.4.6, so an npx install gets an older server than the README on GitHub describes.
Can an agent read APM traces through it?
No. There are no APM, alerting or dashboard tools. It searches indices.
Does it write to Elasticsearch?
No. All four tools are reads, which makes it one of the few connectors here that is read-only by construction rather than by flag.