Elasticsearch/OpenSearch MCP Server

Elasticsearch MCP connects multiple search clusters, with an explicit target name and access scoped to the supplied credentials.

  • 315 ★ on the repository
  • Last commit
  • Apache-2.0
MCP server

Broad access

Why this level

  • By default the agent can delete indices and documents and send general API requests with the connected account’s permissions.
All reasons and checks

cr7258/elasticsearch-mcp-server

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/elasticsearch-opensearch-mcp-server

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • By default the agent can delete indices and documents and send general API requests with the connected account’s permissions.

This is third-party code. Review the repository files before installing.

What it does

Elasticsearch/OpenSearch MCP Server exposes search and cluster-management tools to an agent. It reads documents, inspects index mappings and checks cluster health and statistics. A separate analyzer operation shows how text becomes search tokens. Writes are available by default, including index creation, document updates and deletion. For research, an administrator can hide write tools and issue read-only credentials.

Who it is for. Search-cluster administrators investigating query results and index health with an agent.

Good fit when

  • Search misses a word, and the agent inspects how the analyzer splits it into tokens.
  • Before changing a query, you inspect the index fields and settings.
  • During an incident, an administrator collects node health and cluster statistics.
  • Several test clusters share one connection, and you compare them by name.

Not a fit when

  • The agent must be unable to delete data, but write tools remain enabled.
  • The HTTP endpoint would be publicly accessible without authentication.
  • You need a visual dashboard for direct human use without an agent.

Example request

Inspect the test index mapping and explain why this query misses the expected documents. Make no changes.

MCP

Transport
stdio, sse, http
Authentication
key is optional

Environment variables

ELASTICSEARCH_API_KEY secret
Elasticsearch API key scoped to the required operations.
ELASTICSEARCH_HOSTS
Comma-separated Elasticsearch hosts.
DISABLE_HIGH_RISK_OPERATIONS
Set true to hide write tools.

Limitations

Package selection depends on the cluster: the default targets Elasticsearch 8.x, while 7.x and 9.x have separate package names. OpenSearch uses its own package and username/password authentication. Certificate verification is disabled by default, so enable it explicitly for production connections. The HTTP server accepts unauthenticated access without `MCP_API_KEY`; restrict network reachability and configure a separate connection key.

How to disable. Remove the MCP connection and stop the server. Revoke the cluster credential if no other applications still use it.

FAQ

How do I remove write operations?

Set `DISABLE_HIGH_RISK_OPERATIONS=true` before startup. Creation, deletion and the general API request should disappear from the tool list.

Can I connect multiple clusters?

Yes. Define named configurations and pass `cluster` in requests. Verify the target before each operation.

Where does a request without a cluster name go?

To the cluster named in `DEFAULT_CLUSTER`, or the first configured cluster. Set the value explicitly to avoid sending a request to another environment.

Can I inspect a data stream?

Yes. The server reads data-stream information and searches its documents. Creating a stream requires a matching index template.

Does Claude Desktop require a network port?

No. A stdio connection launches a local process. HTTP and SSE provide separate network transports.

Discussion

No questions or reviews yet.

Official

Official MCP server from the OpenSearch project exposes a cluster to agents: indexes, mappings, DSL search and shard state.

MCP serverExtended access158Repository stars
Official

An MCP server gives agents search and answers over local documents using hybrid retrieval, reranking and section links.

MCP serverExtended access662Repository stars
Official

Official MongoDB MCP server: queries and aggregations, index management, Atlas clusters and local deployments

MCP serverBroad access1.2KRepository stars

An MCP server for searching and downloading academic papers from arXiv, PubMed, bioRxiv, Semantic Scholar and other open sources

MCP serverExtended access3KRepository stars

MCP server that gives an agent access to MySQL: schema inspection and queries, read-only by default, writes behind flags

MCP serverExtended access2.2KRepository stars
Official

Redis's official MCP server: strings, hashes, streams, JSON and vector search from your agent

MCP serverBroad access641Repository stars

README in short

Deployment options include a Docker image and a Helm chart. Multi-cluster settings can live in a JSON file, with the agent selecting a cluster by name in each request.

README badge

Report a problem

Foxx AIElasticsearch/OpenSearch MCP Server
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.