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.
7 дней бесплатно · без карты · EU-хостинг
Спроси Elasticsearch что угодно
Попробуй реальный промпт против Elasticsearch via AnythingMCP — Claude вызывает tools, возвращает ответ. Нажми Enter на своём сообщении, чтобы установить в Cloud.
Установить Elasticsearch в CloudClaude — это AI, он может ошибаться. Проверяйте ответы.
Настройка за 2 минуты
- 1Запусти free trial на cloud.anythingmcp.com.
- 2Нажми Elasticsearch в коннектор-сторе. Вставь учётные данные.
- 3Выпусти MCP API ключ и направьте AI-клиент на MCP URL.
Гиды по Elasticsearch
Пошаговая настройка для основных AI-клиентов.
Настройка Elasticsearch
Прямо из определения коннектора: где взять учётные данные, какие права им нужны и с каким API работает этот адаптер. Предоставлено автором коннектора на английском языке.
Elasticsearch
This connector calls the Elasticsearch REST API of the user's own cluster: Elastic Cloud Hosted, Elastic Cloud Serverless or a self-managed cluster. It can list indices, aliases and data streams, read mappings, search with the Query DSL, aggregate, count, run ES|QL queries, read single documents and, when the key allows it, write documents. It talks to Elasticsearch only, not to Kibana.
Setup (about 3 minutes)
- Find the Elasticsearch endpoint. Elastic Cloud Hosted: open the deployment in 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 the Elasticsearch endpoint (e.g.https://my-project-a1b2c3.es.eu-west-1.aws.elastic.cloud). Self-managed: the HTTPS address and port the cluster answers on (e.g.https://search.example.com:9200). It must be reachable from the internet for AnythingMCP Cloud; a self-hosted AnythingMCP can reach a cluster in the same network once an admin allows that host. Paste it intoELASTICSEARCH_URLwithout a trailing slash. - Create an API key. In Kibana: Stack Management > API keys > Create API key (Serverless: project settings > API keys). Give it a name such as
anythingmcpand an expiry, and turn on Control security privileges to limit it (see below). Copy the Encoded value (base64, it ends in = in most cases): Elastic shows it only once. Paste it intoELASTICSEARCH_API_KEY. It is sent asAuthorization: ApiKey <encoded>. Username and password (basic auth) are not supported by this connector; create an API key instead.
Read-only key (recommended): use these role descriptors in the Kibana form, or run this in Kibana Dev Tools while signed in as a user who may create keys:
POST /_security/api_key
{
"name": "anythingmcp-read",
"expiration": "365d",
"role_descriptors": {
"anythingmcp_read": {
"cluster": ["monitor"],
"indices": [
{ "names": ["*"], "privileges": ["read", "view_index_metadata", "monitor"] }
]
}
}
}
Copy encoded from the answer. 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; the monitor cluster privilege covers cluster info and health. A key can never have more rights than the user who creates it.
Writes: elasticsearch_index_document and elasticsearch_update_document need write (or index) on the target indices in addition; with the read-only key above they fail with 403, which is the intended safety net. Every write asks the user to confirm first. elasticsearch_delete_document and elasticsearch_delete_by_query are installed switched off; an admin turns them on deliberately, and they need the delete (or write) privilege.
Which tool
- Orientation:
elasticsearch_whoami(who the key belongs to; needs no privileges),elasticsearch_cluster_info,elasticsearch_cluster_health(not on Serverless),elasticsearch_list_indices,elasticsearch_list_aliases,elasticsearch_list_data_streams. - Before querying an index, call
elasticsearch_get_mapping: field names and types decide the query.textfields takematch,keywordfields taketerm/termsand sort and aggregate; a text field often has a.keywordsub-field for that. elasticsearch_search: Query DSL search, 10 hits by default, at most 100 per call; usesource_fieldsto keep answers small,fromorsearch_afterwithsortto page.elasticsearch_aggregate: counts per value, sums, averages, date histograms, without documents.elasticsearch_count: just the number of matches.elasticsearch_esql_query: ES|QL for tabular questions (FROM ... | WHERE ... | STATS ... BY ... | SORT ... | LIMIT n); always end withLIMIT, at most 500 rows are passed on. Pass user-supplied values throughparamswith?placeholders.elasticsearch_get_document: one document by_indexand_id.
Vectors: dense vector fields are not useful in a chat. Since Elasticsearch 9.2 new indices leave them out of _source by default; otherwise common names (embedding, vector, ...) are dropped from search output, and source_fields or source_excludes keep others out.
Errors: 401 means the API key is wrong, expired or invalidated. 403 security_exception ... is unauthorized names the privilege the key lacks. 404 index_not_found_exception is an unknown index name (check elasticsearch_list_indices). 400 parsing_exception or verification_exception (ES|QL) points at the query; the message names the field or position. 429 means the cluster is overloaded; wait and retry.
Out of scope here: Kibana (dashboards, saved objects), creating or deleting indices, changing mappings or settings, snapshots, ingest pipelines, security administration and the bulk API.
Твой AI в двух кликах от Elasticsearch.
Установи коннектор, вставь учётные данные, спроси AI. 7 дней бесплатно, без карты.