Elasticsearch
Elasticsearch MCP Server for ES 5.x-9.x with a query harness, field validation and full…
- Pricing
- Open source
- Runs
- Locally or Remotely
- Version
- 0.9.1
- Listing updated
- 4 days ago
About Elasticsearch
Elasticsearch is an open-source MCP server for databases. It can run locally on your machine or as a hosted remote server.
Elasticsearch MCP Server for ES 5.x-9.x with a query harness, field validation and full API access
Install
Run in a 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-mcpAdd to claude_desktop_config.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>"
}
}
}
}Add to ~/.cursor/mcp.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>"
}
}
}
}Add to .vscode/mcp.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>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.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>"
}
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"elasticsearch": {
"command": "npx",
"args": [
"-y",
"@tocharianou/elasticsearch-mcp"
],
"env": {
"ES_URL": "<ES_URL>",
"ES_API_KEY": "<ES_API_KEY>",
"ES_PASSWORD": "<ES_PASSWORD>"
}
}
}
}Configuration
ES_URLYour Elasticsearch instance URL (e.g., https://localhost:9200)RequiredES_API_KEYElasticsearch API key for authenticationES_USERNAMEElasticsearch username for basic authenticationES_PASSWORDElasticsearch password for basic authenticationES_CA_CERTPath to custom CA certificate for Elasticsearch SSL/TLSNODE_TLS_REJECT_UNAUTHORIZEDSet to '0' to disable SSL certificate validation (development only)MAX_TOKEN_CALLMaximum tokens per API callMCP_TRANSPORTTransport mode selectionRequiredMCP_HTTP_PORTHTTP server port (when using HTTP transport)MCP_HTTP_HOSTHTTP server host (when using HTTP transport)ES_URLYour Elasticsearch instance URL (e.g., https://localhost:9200)RequiredES_API_KEYElasticsearch API key for authenticationES_USERNAMEElasticsearch username for basic authenticationES_PASSWORDElasticsearch password for basic authenticationES_CA_CERTPath to custom CA certificate for Elasticsearch SSL/TLSNODE_TLS_REJECT_UNAUTHORIZEDSet to '0' to disable SSL certificate validation (development only)MAX_TOKEN_CALLMaximum tokens per API call
Pricing
Open source
Elasticsearch 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 to Elasticsearch

Midplane
MCP serverPostgres gateway for AI agents with table grants, column masking and approval for writes
Runs locally- Open source
- 5 GitHub stars
- Databases

PlatypusDB
MCP serverGives MCP clients access to your PlatypusDB database connections, scoped per agent
Runs locally- Open source
- Databases

Lorebase
MCP serverLets agents read and change a governed, versioned Postgres knowledge graph
Runs locally- Open source
- Knowledge and memory
Sovaria
MCP serverManage a Sovaria backend (Postgres, auth, storage, functions) from an AI assistant
Not checked yet- 4 tools
- Remote
- Freemium
- Databases

model2data studio
MCP serverGenerate realistic connected test data, dbt projects and dashboards from a schema
- Remote
- Freemium
- Databases

semlayer
MCP serverInfers a semantic layer from your data warehouse and serves it to agents
Runs locally- Free
- Databases