Connector guide7-minute read16 MCP tools7 languages

How to Connect Elasticsearch to Meta Muse via MCP

Let your AI explore and query your Elasticsearch cluster on Elastic Cloud, Serverless or your own servers: list indices and data streams, read mappings, search, aggregate, count, run ES|QL and, with your confirmation, write documents.

HCBy HelpCode teamUpdated 7 min read Open-source on GitHub

No credit card · 7-day trial · Self-host alternative available

Elasticsearch

Elasticsearch

Let your AI explore and query your Elasticsearch cluster on Elastic Cloud, Serverless or your own servers: list indices and data streams, read mappings, search, aggregate, count, run ES|QL and, with your confirmation, write documents.

tools

16

Region

INTL

Category

Databases

Authentication

API Key

Required env vars

ELASTICSEARCH_URLELASTICSEARCH_API_KEY
Install in one click on Cloud

7-day free trial · No credit card

  • 7-day free trial
    No credit card required
  • GDPR & SOC 2 ready
    EU data residency, audit logs
  • Open-source on GitHub
    Open source · AGPL-3.0
  • Works with ChatGPT, Claude, Gemini
    Any MCP-compatible client

Skip the install. Get this working in under 2 minutes.

Start a free trial on cloud.anythingmcp.com, add the Elasticsearch in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.

Start free trial

Summary

Let your AI explore and query your Elasticsearch cluster on Elastic Cloud, Serverless or your own servers: list indices and data streams, read mappings, search, aggregate, count, run ES|QL and, with your confirmation, write documents.

Try asking

Example prompts for Elasticsearch

Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.

Elasticsearch · live via MCP
Share
Opus 4.7

Claude is AI and can make mistakes. Please double-check responses.

💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Elasticsearch, paste your credentials, mint an MCP API key and you're done. No Docker, no git clone, no local server.

Elasticsearch + Meta Muse

Let your AI explore and query your Elasticsearch cluster on Elastic Cloud, Serverless or your own servers: list indices and data streams, read mappings, search, aggregate, count, run ES|QL and, with your confirmation, write documents.

Prerequisites

See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:

ELASTICSEARCH_URL, ELASTICSEARCH_API_KEY

Step 1 — Get credentials

  1. Find your Elasticsearch endpoint. Elastic Cloud Hosted: open the deployment at https://cloud.elastic.co and copy the Elasticsearch endpoint, e.g. https://my-deployment.es.europe-west3.gcp.cloud.es.io. Serverless: open the project and copy its Elasticsearch endpoint. Self-managed: the HTTPS address and port your cluster answers on, e.g. https://search.example.com:9200. Paste it into ELASTICSEARCH_URL without a trailing slash. Use the Elasticsearch endpoint, not the Kibana address.
  2. Create an API key in Kibana under Stack Management → API keys → Create API key (Serverless: project settings → API keys). Name it, for example anythingmcp, set an expiry and turn on Control security privileges to limit it (see below).
  3. Copy the Encoded value (base64): Elastic shows it only once. Paste it into ELASTICSEARCH_API_KEY and install the connector. The id and api_key values on their own do not work, and username and password are not supported.
  4. Check the setup with elasticsearch_whoami: it needs no privileges and shows who the key belongs to.

Where your cluster runs: Elastic Cloud Hosted, Elastic Cloud Serverless and self-managed clusters, version 8 or later. AnythingMCP Cloud needs a cluster it can reach over the internet; a self-hosted AnythingMCP can also reach a cluster in your own network once an admin allows that host.

Read-only key (recommended): use these role descriptors in the Kibana form, or run the request in Kibana Dev Tools and copy encoded from the answer:

POST /_security/api_key
{
  "name": "anythingmcp-read",
  "expiration": "365d",
  "role_descriptors": {
    "anythingmcp_read": {
      "cluster": ["monitor"],
      "indices": [
        { "names": ["*"], "privileges": ["read", "view_index_metadata", "monitor"] }
      ]
    }
  }
}

Replace "*" with the index patterns the AI may see, e.g. ["products", "logs-*"]. read covers search, count, aggregations, ES|QL and single documents; view_index_metadata covers mappings, aliases and data streams; monitor covers the index list and cluster health. A key never has more rights than the user who creates it.

What the AI can do: list indices, aliases and data streams; read an index's field mapping before querying it; search with the Query DSL (10 hits by default, at most 100 per call); run aggregations such as counts per value, sums, averages and date histograms; count matches; run ES|QL queries for tabular answers (at most 500 rows); and read single documents. Common vector fields are left out of search results. Cluster health is not available on Serverless, where Elastic runs the cluster.

Writes ask first: elasticsearch_index_document creates or replaces a whole document, and elasticsearch_update_document changes some fields of one. Before each, the AI shows you the index, the _id and the content and waits for your yes. Both need the write privilege, so with the read-only key above they fail with 403, which is the intended safety net.

Switched off at install: elasticsearch_delete_document and elasticsearch_delete_by_query. Deletes cannot be undone, and a delete by query can remove millions of documents. An administrator turns them on deliberately; the AI then counts the matching documents first and asks before deleting.

Common errors: 401: the key is wrong, expired or invalidated, or the id was pasted instead of the Encoded value. 403 security_exception: the key lacks the privilege named in the message. 404 index_not_found_exception: unknown index name. 400 parsing_exception or verification_exception: the query has a mistake; the message names the field or position. 429: the cluster is overloaded; wait and retry.

The connector talks to Elasticsearch only, not to Kibana. It does not create or delete indices, change mappings or settings, or cover snapshots, ingest pipelines, security administration or the bulk API.

Step 2 — Install the adapter

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

Step 3 — Add the connector in Muse

Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide shows YOUR_SERVER_ID.

Muse adds remote MCP servers as custom connectors and signs in to them with OAuth.

  1. In Muse, open Settings → Connectors and choose Add custom connector.
  2. Paste the MCP server URL https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID.
  3. Muse opens the AnythingMCP sign-in page: sign in and approve access.
  4. In a chat, ask Muse for something that needs the Elasticsearch tools.

You can also set it up from a chat, on the web, in the iOS and Android apps or in WhatsApp. Send Muse this message:

Create a Custom Connector for a new remote MCP server, then connect to it:
Name: AnythingMCP
Transport: remote streamable HTTP
URL: https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID
Auth: OAuth

Self-hosting? Use your instance's public HTTPS address instead of https://cloud.anythingmcp.com. Muse connects from Meta's cloud, so localhost does not work.

Available tools

ToolWhat it does
elasticsearch_whoamiShow who the connector is signed in as: the user behind the API key, the key's name and id and the authentication type
elasticsearch_cluster_infoGet basic information about the cluster: name, uuid, Elasticsearch version and build flavor (serverless on Elastic Cloud Serverless)
elasticsearch_cluster_healthGet the cluster health: status (green, yellow or red), node counts, active, relocating, initializing and unassigned shards and pending tasks
elasticsearch_list_indicesList indices with their health, status, document count, store size, primary and replica shard counts and creation date, sorted by name (at…
elasticsearch_get_mappingGet the field mapping of an index or data stream: every field with its type (text, keyword, date, long, dense_vector...)
elasticsearch_searchSearch an index, data stream or alias with the Query DSL and get the matching documents (total, and per hit _index, _id, _score, _source…
elasticsearch_aggregateRun aggregations over an index or data stream without returning documents: counts per value (terms), sums and averages, date histograms…
elasticsearch_countCount the documents in an index, data stream or alias that match a query (all documents without a query)
elasticsearch_esql_queryRun an ES|QL query, a piped language for filtering, aggregating and joining (Elasticsearch 8.11 or later, and Serverless)
elasticsearch_get_documentGet one document by its _id from an index: found, _version and the _source, optionally only some fields
elasticsearch_list_aliasesList index aliases: alias name, the index it points to, whether it has a filter and whether it is the write index
elasticsearch_list_data_streamsList data streams (time series such as logs and metrics): name, health status, index template, generation, number of backing indices…
elasticsearch_index_documentCreate or replace a whole document under a given _id in an index
elasticsearch_update_documentChange some fields of an existing document by _id, leaving the others as they are (a partial update with doc)
elasticsearch_delete_documentDelete one document by _id
elasticsearch_delete_by_queryDelete every document that matches a query

Example prompts

  • "Which indices do we have, how many documents does each hold and how big are they?"
  • "Search the products index for wireless headphones under 100 euros and show name, brand and price."
  • "With ES|QL, count the errors per host in logs- over the last 24 hours and show the top 10."*
  • "How many orders per day did we get in September? Use a date histogram on the orders index."
  • "Set the stock field of product 4711 in the products index to 0. Show me the change before you make it."

FAQ

Where is Muse available? Meta currently offers Muse in the US and Canada, on the web, in the iOS and Android apps and in WhatsApp.

Does Meta review this connector? No. Meta doesn't review custom connectors. Muse sees only the tools you switched on for this MCP server in AnythingMCP, and you can disconnect it anytime under Settings → Connectors.

Next steps

Was this guide helpful?

Your Elasticsearch agent is one click away.

Install the connector, paste the key, prompt Meta Muse. Free for 7 days, no credit card.

Related guides

Connectors

How to Connect Elasticsearch to ChatGPT via MCP

Let your AI explore and query your Elasticsearch cluster on Elastic Cloud, Serverless or your own servers: list indices and data streams, read mappings, search, aggregate, count, run ES|QL and, with your confirmation, write documents.

Connectors

How to Connect Elasticsearch to Claude via MCP

Let your AI explore and query your Elasticsearch cluster on Elastic Cloud, Serverless or your own servers: list indices and data streams, read mappings, search, aggregate, count, run ES|QL and, with your confirmation, write documents.

Connectors

How to Connect Elasticsearch to Cursor via MCP

Let your AI explore and query your Elasticsearch cluster on Elastic Cloud, Serverless or your own servers: list indices and data streams, read mappings, search, aggregate, count, run ES|QL and, with your confirmation, write documents.

Connectors

How to Connect Elasticsearch to Gemini via MCP

Let your AI explore and query your Elasticsearch cluster on Elastic Cloud, Serverless or your own servers: list indices and data streams, read mappings, search, aggregate, count, run ES|QL and, with your confirmation, write documents.

Connectors

Elasticsearch to MCP: Search, Aggregations and ES|QL in any AI Agent

Let your AI explore and query your Elasticsearch cluster on Elastic Cloud, Serverless or your own servers: list indices and data streams, read mappings, search, aggregate, count, run ES|QL and, with your confirmation, write documents.

Connectors

How to Connect Avito to Meta Muse via MCP

Let your AI work with your Avito business account: list your ads and change their prices, read views, contacts and calls statistics, check autoload uploads and their errors, the feed format and your wallet, and read Avito Messenger chats. Sending messages and changing autoload settings are optional and off by default.