home / mcp / elasticsearch mcp server
Elasticsearch MCP server with available features including mappings management, search and indexing, and index management etc.
Configuration
View docs{
"mcpServers": {
"awesimon-elasticsearch-mcp": {
"command": "npx",
"args": [
"-y",
"@awesome-ai/elasticsearch-mcp"
],
"env": {
"ES_HOST": "your-elasticsearch-host",
"ES_API_KEY": "your-api-key",
"ES_CA_CERT": "/path/to/ca.crt",
"ES_PASSWORD": "elastic_password",
"ES_USERNAME": "elastic_user"
}
}
}
}You connect your MCP Client to your Elasticsearch data using a dedicated MCP Server. It translates natural language requests into Elasticsearch operations so you can interact with indices, mappings, searches, and cluster health through conversations.
You interact with Elasticsearch through natural language in your MCP Client. The Elasticsearch MCP Server analyzes what you ask, runs the corresponding Elasticsearch operations (such as listing indices, fetching mappings, or performing a search), and returns results in a user-friendly format for you to review.
Typical workflows include: asking for cluster health, listing indices, creating or updating mappings, performing searches, and bulk data operations. You can also manage index templates and reindex data between indices. Use your MCP Client to start a conversation and simply ask questions like health checks, index lists, or data queries. The server handles the rest and presents results clearly.
{
"mcpServers": {
"elasticsearch_mcp": {
"command": "npx",
"args": [
"-y",
"@awesome-ai/elasticsearch-mcp"
],
"env": {
"ES_HOST": "your-elasticsearch-host",
"ES_API_KEY": "your-api-key"
}
}
}
}Open your MCP Client and configure a new MCP Server with the above settings. This uses the published package to run the MCP server.
Configuration and startup notes help you tailor the server to your Elasticsearch deployment. You can connect to a single Elasticsearch node or configure multiple nodes for high availability.
Security: provide authentication to Elasticsearch using either an API key or a username/password pair. You must supply one of these methods to establish a trusted connection.
Examples and environments shown below illustrate common setups and local development workflows so you can run and test the MCP Server with your own Elasticsearch instance.
If you run into connection or authentication issues, verify the ES_HOST and credentials you configured match your Elasticsearch deployment. Check that the MCP Client is connected to the MCP Server and that the server process is running. Use the MCP Inspector to observe requests and responses during development.
Get cluster health status, with optional index-level details.
List available indices, with optional regex support.
Create an Elasticsearch index with optional settings and mappings.
Reindex data from a source index to a target index with optional query and script.
Retrieve field mappings for a specific index.
Create or update a mapping for an index.
Execute a search using the provided query DSL.
Bulk insert data into an index.
Create or update an index template.
Retrieve information about index templates.
Delete an index template.