AUTOMATIONSWITCH
CommunityDatabase

Elasticsearch MCP

by cr7258

Elasticsearch and OpenSearch MCP server with index management, document CRUD, search queries, cluster health, and aggregations. 270 stars and 22 commits on main in the last 30 days.

270·6 tools·Released APR 2025·Apache-2.0
pip install elasticsearch-mcp-server
Share:

Elasticsearch and OpenSearch MCP server with index management, document CRUD, search queries, cluster health, and aggregations. 270 GitHub stars and 22 commits on main in the last 30 days. Supports both Elasticsearch and OpenSearch backends.

Reviewed by M. Nouriel · MAY 2026

INSTALL THIS SERVER

Requires authenticationELASTICSEARCH_HOST, ELASTICSEARCH_USERNAME, ELASTICSEARCH_PASSWORD, or ELASTICSEARCH_API_KEY environment variables. Supports basic auth, API key, and TLS.
{ "mcpServers": { "elasticsearch": { "command": "python", "args": [ "-m", "elasticsearch_mcp_server" ], "env": { "ELASTICSEARCH_HOST": "https://your-cluster:9200", "ELASTICSEARCH_API_KEY": "<your-api-key>" } } } }
PrereqRequires ELASTICSEARCH_HOST plus auth credentials (ELASTICSEARCH_API_KEY or ELASTICSEARCH_USERNAME + ELASTICSEARCH_PASSWORD). PyPI: `elasticsearch-mcp-server`. Supports both Elasticsearch and OpenSearch endpoints. Path: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).
{ "mcpServers": { "elasticsearch": { "command": "python", "args": [ "-m", "elasticsearch_mcp_server" ], "env": { "ELASTICSEARCH_HOST": "https://your-cluster:9200", "ELASTICSEARCH_API_KEY": "<your-api-key>" } } } }
{ "mcpServers": { "elasticsearch": { "command": "python", "args": [ "-m", "elasticsearch_mcp_server" ], "env": { "ELASTICSEARCH_HOST": "https://your-cluster:9200", "ELASTICSEARCH_API_KEY": "<your-api-key>" } } } }
{ "mcpServers": { "elasticsearch": { "command": "python", "args": [ "-m", "elasticsearch_mcp_server" ], "env": { "ELASTICSEARCH_HOST": "https://your-cluster:9200", "ELASTICSEARCH_API_KEY": "<your-api-key>" } } } }
{ "mcpServers": { "elasticsearch": { "command": "python", "args": [ "-m", "elasticsearch_mcp_server" ], "env": { "ELASTICSEARCH_HOST": "https://your-cluster:9200", "ELASTICSEARCH_API_KEY": "<your-api-key>" } } } }

6 TOOLS AVAILABLE

list_indices
List indices on the cluster
Read
get_mappings
Get mappings for an index
Read
search
Run a search query (DSL or simple query string)
Read
get_cluster_health
Cluster health summary
Read
count_documents
Count documents matching a query
Read
aggregate
Run aggregation queries (terms, date histogram, etc.)
Read

OUR ASSESSMENT

Strengths
  • 270 GitHub stars and Apache-2.0 licence.
  • 22 commits on main in the last 30 days.
  • Supports both Elasticsearch and OpenSearch.
  • Tool surface covers search, count, mappings, indices, cluster health, aggregations.
  • Python implementation with pip install path.
Weaknesses
  • Self-hosted: operator points the MCP at their cluster.
  • Authentication options vary by deployment (basic auth, API keys, mTLS).
  • Aggregation tool inputs are DSL-shaped; agents trained only on standard SQL may need help with Elasticsearch DSL.
Security Notes

The MCP carries Elasticsearch credentials configured at startup. Scope to a read-only role for diagnostic agents. For production clusters, run the MCP in the same network segment as the Elasticsearch endpoint and avoid exposing the MCP HTTP transport to untrusted networks.

Best For

Teams running Elasticsearch or OpenSearch who want agents to query indices and run aggregations from inside the editor; SRE workflows that triage cluster health from agent prompts; multi-index search agents that need DSL passthrough.

TECHNICAL DETAILS

Language
python
Transport
stdio
Clients
Claude DesktopClaude CodeCursorVS CodeWindsurf
License
Apache-2.0
npm
elasticsearch-mcp-server
Last Release
elasticsearch-mcp-server (PyPI latest)MAY 3, 2026
First Released
APR 1, 2025

ADOPTION METRICS

// GitHub Stars
270

// Reading this270 stars on the cr7258/elasticsearch-mcp-server repo. 22 commits on main in the last 30 days, second-highest cadence in this batch.

// Popularity Rank
#3
Globally · #9 in Database

// Reading thisStrong search-engine database option to pair with the existing Postgres, MongoDB, ClickHouse, Redis entries.

SOURCES & VERIFICATION

We don't take any single directory's word for it. Before scoring, we cross-reference 4 public MCP sources, install the server ourselves against the clients we cover, and record when we last re-verified.

01
Discovered
Manual submission
First indexed MAY 3, 2026
02
Cross-referenced
4 directories
PulseMCP, MCP.so, Glama, Smithery
03
Verified against
Claude Desktop, Cursor
Installed and tested across clients
04
Last re-checked
MAY 3, 2026
Weekly re-verification
// How other directories see it

The same server, 4 different lenses. We reconcile these signals into our editorial score, which is why our number sometimes diverges from a directory-aggregate star count.

SourceTheir ratingTheir star countTheir downloadsLast synced
AutomationSwitch This page4.4editorial270MAY 3, 2026
PulseMCP— unratedunavailableunavailableMAY 3, 2026
MCP.so— unratedunavailableunavailableMAY 3, 2026
Glama— unratedunavailableunavailableMAY 3, 2026
Smithery— unratedunavailableunavailableMAY 3, 2026

// Counts are directory-reported; we don't adjust them. Discrepancies usually come from different snapshot times or star-caching.

OTHER DATABASE MCP SERVERS

Official5

Postgres MCP

Anthropic

Official MCP server for PostgreSQL. Provides read and write access to PostgreSQL databases with schema introspection, query execution, and transaction support. The reference implementation for database MCP servers.

14 tools84,955
Vendor5

Supabase

Supabase

Persistence layer with full Postgres access and Row Level Security awareness. Query tables, manage schemas, handle auth users, and work with storage buckets.

18 tools2,663
Official4.5

ClickHouse MCP

ClickHouse

Official ClickHouse MCP server with both ClickHouse Tools (production cluster queries) and chDB Tools (embedded ClickHouse for local analytics). Apache-2.0 with destructive-operation protection: write access is opt-in via configuration.

5 tools766
Official4.4

Redis MCP

Redis

Official Redis MCP server with natural-language interface for managing and searching Redis data. EntraID authentication for Azure Managed Redis included; Redis ACL configurable via environment variables. Tool coverage spans strings, lists, hashes, sets, sorted sets, JSON, vectors, and search.

8 tools499
Vendor4

MindsDB

MindsDB

MindsDB ships native MCP server support as part of the main project (mindsdb/mindsdb, 39,093 stars). Federated query layer over 200+ data sources with built-in MCP endpoint for AI agent access to enterprise data.

6 tools39,093
Vendor4

MongoDB MCP Server

MongoDB Inc.

Vendor-built MongoDB MCP server covering both direct database operations (against any MongoDB connection string) and MongoDB Atlas API operations (via Service Accounts credentials). Ships with --readOnly enabled by default in every official install snippet.

8 tools1,011
// Get in touch

DISCUSS YOUR
MCP REQUIREMENTS.

Evaluating a server, scoping an internal deployment, or working out whether MCP is the right fit at all. Start the conversation and we will point you at the right piece of the ecosystem.

Discuss Your MCP Requirements →