Back
Marketplace/Elasticsearch

TL;DR

Elasticsearch is a Databases MCP server that lets Claude Code, Cursor, Windsurf and any MCP-compatible AI agent full-text search and analytics engine. Install in 1 minute with mcpizy install elasticsearch.

🔍

Elasticsearch

Databases

Last updated May 30, 2026 · By MCPizy team

Full-text search and analytics engine

Install Elasticsearch

Via MCPizy CLI (recommended):
mcpizy install elasticsearch
Or run directly:
npx -y elasticsearch-mcp

Why Elasticsearch MCP matters

Elasticsearch MCP exposes the ES REST API as agent tools: `search`, `get_index_mapping`, `list_indices`, `index_document`, `delete_document`, `aggregate`. Authentication is HTTP basic auth or API keys; modern setups use API keys with role-based scoping. The MCP works against Elastic Cloud, self-hosted Elasticsearch, and OpenSearch (with minor caveats).

We use Elasticsearch MCP for three workflows. First, log analysis: production logs ship to ES, the agent runs `search` with a date range and a query string, finds the relevant errors, and explains them. Second, search-relevance debugging: a product-search team complains about ranking — the agent runs the same query with `explain: true` to surface BM25 scores per field. Third, mapping audits: `get_index_mapping` reveals the inferred schema, the agent identifies type mismatches (a field that should be `keyword` but is `text`). Token cost on raw log queries is heavy — 100 hit results with full `_source` are ~10-15k tokens; use `_source` filtering aggressively.

Compared to Splunk MCP (when it exists) or Datadog Logs MCP, Elasticsearch wins on flexibility and self-host options; managed alternatives win on zero-ops. Compared to ClickHouse MCP for analytics, ES wins on full-text search and loses on aggregation speed over large datasets. The honest trade-off: ES's query DSL is hard for LLMs to write correctly; the agent will produce subtly wrong queries (missing `bool` wrapper, wrong field-suffix) until you few-shot it.

Common pitfalls

Query DSL is unforgiving. Mixing `match`, `term`, and `query_string` in a single bool clause without correct nesting will return zero results or syntax errors. Have the agent call `get_index_mapping` first to know which fields are `keyword` vs `text`.

`_source` filtering is critical for token economy. Without it, every hit returns the full document — easily 5-10 kB per hit. Pin `_source: ["field1", "field2"]` for every search.

ES indices have per-shard, per-index, and cluster-level rate limits. The default is generous but `scroll` queries (used for paginating > 10k hits) lock shards open until they expire — long-running agent loops with unclosed scrolls can exhaust the scroll budget.

Version differences matter. ES 7, 8, and OpenSearch 2 have small but breaking changes in field-mapping APIs. The MCP server is usually pinned to one version; mismatches surface as cryptic 400s. Pin the MCP version to your cluster.

How Elasticsearch MCP compares

Honest pros/cons against the closest databases MCP servers.

ServerStrengthsTrade-offs
OpenSearch MCP (community)OSS fork, drop-in compatible mostly, no licensing riskSlightly slower for vector search, smaller ecosystem
Algolia MCPManaged search-as-a-service, faster to set upClosed source, pricier at scale, narrower to product-search
Typesense MCP (community)Open source, simpler than ES, fastSmaller community, fewer enterprise features

Works with

Claude Code
Claude Desktop
Cursor
Windsurf
VS Code + Copilot
Any MCP Client

More Databases MCPs

🐬

MariaDB

MariaDB relational database server

🪳

CockroachDB

Distributed SQL database for cloud apps

🔶

ClickHouse

Query your ClickHouse database server. Run analytical queries, explore schemas, and manage OLAP workloads.

🗃️

SQLite

Local SQLite database access and management

Alternatives to Elasticsearch

If Elasticsearch doesn't fit your stack, these Databases MCP servers solve similar problems.

🔵

Neo4j

Graph database queries

🎯

Qdrant

Vector similarity search engine

⚡

DynamoDB

AWS DynamoDB NoSQL database operations

Key Takeaways

  • Elasticsearch exposes an MCP interface for databases workflows in Claude Code, Cursor and Windsurf.
  • No authentication required — works out of the box once installed.
  • Install in 1 command: mcpizy install elasticsearch — config written to your client automatically.
  • Free and open source — verified compatible with every MCP client (Claude Code, Claude Desktop, Cursor, Windsurf, VS Code + Copilot).
  • Best use case: automate databases workflows from your AI agent without leaving the editor.

Frequently asked questions

What is the Elasticsearch MCP server?

The Elasticsearch MCP server is an Databases Model Context Protocol server that lets Claude Code, Cursor, Windsurf, VS Code with Copilot, and other MCP-compatible AI agents full-text search and analytics engine. It exposes Elasticsearch's capabilities as tools the AI can call directly from your editor or CLI.

How do I install Elasticsearch MCP with Claude Code?

The fastest way is the MCPizy CLI: run `mcpizy install elasticsearch` and MCPizy will add the server to your `.claude.json` automatically. You can also install it manually by adding an entry under `mcpServers` in `.claude.json` with the command `npx -y elasticsearch-mcp` and restarting Claude Code.

Is Elasticsearch MCP free?

Yes. The Elasticsearch MCP server is free and open source. You may still need a Elasticsearch account or API key to connect the server to the underlying service, but the MCP layer itself has no MCPizy subscription cost.

Does Elasticsearch MCP work with Cursor and Windsurf?

Yes. Any MCP-compatible client works — including Claude Code, Claude Desktop, Cursor (via `.cursor/mcp.json`), Windsurf, VS Code with Copilot Chat, and custom agents built on the MCP SDK. The same install command targets all of them; only the config file path differs.

Manage all your MCPs in one place

Monitor usage, track costs, and discover new MCPs.

Get Started Free
What can I do with Elasticsearch MCP?

Once installed, your AI agent can full-text search and analytics engine directly inside your conversation. Typical use cases include asking Claude Code or Cursor to run Elasticsearch operations, inspect results, chain Elasticsearch with other MCP servers (see our Workflow Recipes), and automate repetitive databases tasks without leaving your editor.