# Elasticsearch

> Elasticsearch is an open-source MCP server for databases. Elasticsearch MCP Server for ES 5.x-9.x with a query harness, field validation and full API access. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Open source
- **Repository:** https://github.com/tocharianou/elasticsearch-mcp
- **MCP Registry name:** io.github.TocharianOU/elasticsearch
- **Categories:** databases
- **Listing updated:** 2026-11-13

## About

Elasticsearch MCP Server for ES 5.x-9.x with a query harness, field validation and full API access

## Install

### Claude Code (Terminal)

```sh
claude mcp add elasticsearch --env ES_URL='<ES_URL>' --env ES_API_KEY='<ES_API_KEY>' --env ES_PASSWORD='<ES_PASSWORD>' -- npx -y @tocharianou/elasticsearch-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "<ES_URL>",
        "ES_API_KEY": "<ES_API_KEY>",
        "ES_PASSWORD": "<ES_PASSWORD>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "<ES_URL>",
        "ES_API_KEY": "<ES_API_KEY>",
        "ES_PASSWORD": "<ES_PASSWORD>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "elasticsearch": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "<ES_URL>",
        "ES_API_KEY": "<ES_API_KEY>",
        "ES_PASSWORD": "<ES_PASSWORD>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "<ES_URL>",
        "ES_API_KEY": "<ES_API_KEY>",
        "ES_PASSWORD": "<ES_PASSWORD>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "<ES_URL>",
        "ES_API_KEY": "<ES_API_KEY>",
        "ES_PASSWORD": "<ES_PASSWORD>"
      }
    }
  }
}
```

## FAQ

### Is Elasticsearch free?

Yes. Elasticsearch is open source, so you can use and self-host it for free.

### How do I add Elasticsearch to Claude Code?

Run this command in your terminal: claude mcp add elasticsearch --env ES_URL='<ES_URL>' --env ES_API_KEY='<ES_API_KEY>' --env ES_PASSWORD='<ES_PASSWORD>' -- npx -y @tocharianou/elasticsearch-mcp

### What are the best alternatives to Elasticsearch?

The closest alternatives to Elasticsearch are Midplane, PlatypusDB, Lorebase, Sovaria and model2data studio.

## Alternatives

- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [PlatypusDB](https://ai-powered.com/mcp/platypusdb): PlatypusDB is an open-source MCP server for databases.
- [Lorebase](https://ai-powered.com/mcp/lorebase): Lorebase is an open-source MCP server for knowledge and memory.
- [Sovaria](https://ai-powered.com/mcp/sovaria): Sovaria is a freemium MCP server for databases.
- [model2data studio](https://ai-powered.com/mcp/model2data-studio): model2data studio is a freemium MCP server for databases.
- [semlayer](https://ai-powered.com/mcp/semlayer): semlayer is a free MCP server for databases.
- [bricksentry](https://ai-powered.com/mcp/bricksentry): bricksentry is an open-source MCP server for databases.
- [MCP Toolbox for Databases](https://ai-powered.com/mcp/mcp-toolbox-for-databases-2): MCP Toolbox for Databases is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/elasticsearch
