Is this an official Elastic MCP server?
No. This record represents a community Elasticsearch MCP implementation. It should not be presented as an Elastic-maintained official server.
Connects AI agents to Elasticsearch clusters for search, log analysis, metrics investigation, and cluster diagnostics.
Looking for more MCP servers? Browse the full MCP tools directory or explore more tools in Search.
Elasticsearch MCP sits at the intersection of search relevance and operational observability: an agent is not merely fetching documents, it is generating queries against an index topology where analyzers, mappings, aliases, shard behavior, and time-based indices determine what a result means. The hidden danger is that natural-language search can become an expensive wildcard, broad source retrieval, or accidental access to indices containing credentials, personal data, or raw logs. Use a read-only Elasticsearch role, index allowlists, source-field filtering, query timeouts, result limits, and explicit disclosure of the resolved index or alias. A silent failure occurs when an alias points to a different generation of indices, the time field is mapped differently, or the query uses the wrong analyzer; Elasticsearch returns valid results that appear plausible but answer a different question. Require the response to show the index or alias, query DSL, time range, sort, filters, and hit limits. The implementation in this record is community-maintained rather than an official Elastic product, so pin the repository or image, review dependencies, and test compatibility against the target Elasticsearch version. Its value is explainable search and incident investigation with query visibility, not unrestricted cluster administration.
Choose Elasticsearch MCP Server when fresh, real-time information matters and your AI assistant needs live search or research capabilities.
Good fit
Use the following configuration as a starting point for Claude Desktop or any compatible MCP client, then replace placeholder credentials with your own values.
{
"mcpServers": {
"elasticsearch": {
"command": "npx",
"args": ["-y", "@tocharianou/elasticsearch-mcp"],
"env": {
"ELASTICSEARCH_URL": "https://localhost:9200",
"ELASTICSEARCH_USERNAME": "readonly-user",
"ELASTICSEARCH_PASSWORD": "password"
}
}
}
}These setup steps cover the typical installation flow for this MCP server.
Pin and review the selected community implementation before installing it in a production environment.
Create an Elasticsearch role limited to read access on approved indices and aliases, with source-field restrictions where possible.
Set the cluster URL and credentials in protected environment configuration and require TLS certificate validation.
Test index discovery, mappings, aliases, bounded searches, aggregations, and cluster-health reads against a non-sensitive index.
Enforce query timeouts, result limits, source filtering, and index allowlists before connecting to production logs.
Pro-Tip: Never expose unrestricted _search or cluster-admin permissions to an agent; block broad wildcards, script execution, snapshot operations, and sensitive source fields unless a reviewed workflow explicitly requires them.
Common questions for Elasticsearch MCP Server.
No. This record represents a community Elasticsearch MCP implementation. It should not be presented as an Elastic-maintained official server.
Capabilities depend on the implementation and credentials. Use a read-only role for search and diagnostics, and keep index, document, mapping, and cluster mutations outside the default agent session.
A query can return valid but irrelevant results because an alias, analyzer, mapping, time field, or index pattern is wrong. Fix it by returning the resolved index or alias, mapping, query DSL, time range, analyzer behavior, and sort order.
Use index and field-level restrictions, source filtering, retention-aware access, redaction, query limits, and audit logs. Raw logs frequently contain credentials, tokens, identifiers, and internal topology.
| Feature | Elasticsearch MCP Server | Competitor |
|---|---|---|
| Search Context | ✅ Exposes Elasticsearch mappings, aliases, query DSL, and search results through MCP | ❌ Generic log-search API connectors |
| Incident Investigation | ✅ Can combine log, metric, and cluster-context queries conversationally | ❌ Static Kibana dashboard panels |
| Query Explainability | ✅ Can return the generated Elasticsearch query and resolved index scope | ❌ Opaque natural-language search widgets |
| Access Governance | ✅ Can be constrained by roles, index allowlists, source filters, and timeouts | ❌ Shared cluster administrator credentials |