Elasticsearch MCP Server
Elasticsearch MCP Server provides a bridge between MCP clients and your Elasticsearch data, allowing you to interact with indices through natural language. The server connects to your Elasticsearch cluster and provides access to data using the Model Context Protocol (MCP).
Key features:
- List all available Elasticsearch indices
- Get field mappings for a specific Elasticsearch index
- Perform Elasticsearch searches with the provided query DSL
- Execute ESQL queries
- Get shard information for all or specific indices
Technical requirements:
- An Elasticsearch instance version 8.x or 9.x
- Elasticsearch authentication credentials (API key or username/password)
- An MCP Client (e.g., Claude Desktop or Goose)
- Docker to run the server container
The server supports two communication protocols:
- stdio (recommended for Claude Desktop)
- streamable-HTTP (recommended for general use, as SSE is deprecated)
Elasticsearch MCP Server Setup Guide
- Create a service account and assign it the
lockbox.payloadViewerrole; - Create a secret in Lockbox with the credentials for accessing Elasticsearch:
- Elasticsearch API key;
- or Elasticsearch username and password (for basic authentication);
- In Marketplace, find the
Elasticsearch MCP Serverproduct and click Install; - In the Additional section, specify the previously created service account;
- In the Product Configuration section:
- In the Lockbox Secret field, specify the ID of the created secret;
- In the address field, enter the URL of your Elasticsearch cluster;
- If necessary, enable skipping SSL/TLS certificate verification;
- Select a subnet with configured Internet access and create a security group with allowed port
8080; - Create a virtual machine;
- After installation:
- The MCP server will be available at
http://<VM IP address>:8080/mcp; - To verify functionality, execute a test request:
curl --location 'http://<VM IP address>:8080/mcp' \ --header 'Accept: application/json, text/event-stream' \ --header 'Content-Type: application/json' \ --data '{ "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "client", "version": "1.0.0" } } }'
- The MCP server will be available at
Interacting with Elasticsearch data through natural language
Scenario: Listing all indices
User: “Show me all available Elasticsearch indices”
System: “Here’s a list of all available indices in your Elasticsearch cluster:
- customers
- products
- orders
- logs-2023
- logs-2024”
Scenario: Analyzing data structure
User: “What fields are in the customers index?”
System: “The customers index contains the following fields:
- id (type: keyword)
- name (type: text)
- email (type: keyword)
- age (type: integer)
- address (type: object)
- created_at (type: date)”
Scenario: Performing search queries
User: “Find all customers over 30 years old living in Moscow”
System: “I’ve performed a search based on your query. Found 15 customers matching the criteria. Here are the top 5 results:
- Ivan Petrov, 35 years old, email: ivan@example.com
- Maria Sidorova, 42 years old, email: maria@example.com
- Alexey Ivanov, 38 years old, email: alexey@example.com
- Ekaterina Smirnova, 31 years old, email: ekaterina@example.com
- Dmitry Kozlov, 45 years old, email: dmitry@example.com”
Yandex Cloud technical support is available 24/7 to respond to requests. The types of requests available and their response time depend on your pricing plan. You can activate paid support in the management console. Learn more about requesting technical support.
Yandex Cloud does not provide technical support for this product. If you have any issues, please refer to the developer’s information resources.