# Elasticsearch MCP Server

Elastic’s MCP server for listing indices, reading mappings and querying Elasticsearch from an agent.

The Elasticsearch MCP server from Elastic lets agents list indices, inspect field mappings, run searches and ES|QL queries, and read shard information on your cluster, using your own credentials.

- Canonical URL: https://meetnewai.com/mcp/elasticsearch-mcp
- Official URL: https://github.com/elastic/mcp-server-elasticsearch
- Pricing: Open source
- Verified: Checked Oct 18, 2026
- Repository: https://github.com/elastic/mcp-server-elasticsearch
- License: Apache-2.0

## MCP Install Config

```json
{
  "name": "elasticsearch",
  "remote": false,
  "launch": "docker run -i --rm -e ES_URL -e ES_API_KEY docker.elastic.co/mcp/elasticsearch stdio",
  "source": "https://github.com/elastic/mcp-server-elasticsearch",
  "checked": "2026-10-18",
  "snippets": [
    {
      "id": "json",
      "code": "{\n  \"mcpServers\": {\n    \"elasticsearch\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-e\",\n        \"ES_URL\",\n        \"-e\",\n        \"ES_API_KEY\",\n        \"docker.elastic.co/mcp/elasticsearch\",\n        \"stdio\"\n      ],\n      \"env\": {\n        \"ES_URL\": \"<ES_URL>\",\n        \"ES_API_KEY\": \"<ES_API_KEY>\"\n      }\n    }\n  }\n}"
    },
    {
      "id": "vscode",
      "code": "{\n  \"servers\": {\n    \"elasticsearch\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-e\",\n        \"ES_URL\",\n        \"-e\",\n        \"ES_API_KEY\",\n        \"docker.elastic.co/mcp/elasticsearch\",\n        \"stdio\"\n      ],\n      \"env\": {\n        \"ES_URL\": \"<ES_URL>\",\n        \"ES_API_KEY\": \"<ES_API_KEY>\"\n      }\n    }\n  }\n}"
    },
    {
      "id": "claude",
      "code": "claude mcp add elasticsearch -e ES_URL='<ES_URL>' -e ES_API_KEY='<ES_API_KEY>' -- docker run -i --rm -e ES_URL -e ES_API_KEY docker.elastic.co/mcp/elasticsearch stdio"
    }
  ]
}
```
