Elasticsearch MCP Server for ES 5.x-9.x with a query harness, field validation and full API access
Connect Runs on your machine
claude mcp add elasticsearch -e ES_URL=<ES_URL> -e ES_API_KEY=<ES_API_KEY> -e ES_USERNAME=<ES_USERNAME> -e ES_PASSWORD=<ES_PASSWORD> -e ES_CA_CERT=<ES_CA_CERT> -e NODE_TLS_REJECT_UNAUTHORIZED=<NODE_TLS_REJECT_UNAUTHORIZED> -e MAX_TOKEN_CALL=<MAX_TOKEN_CALL> -- npx -y @tocharianou/[email protected]
{
"mcpServers": {
"elasticsearch": {
"command": "npx",
"args": [
"-y",
"@tocharianou/[email protected]"
],
"env": {
"ES_URL": "<ES_URL>",
"ES_API_KEY": "<ES_API_KEY>",
"ES_USERNAME": "<ES_USERNAME>",
"ES_PASSWORD": "<ES_PASSWORD>",
"ES_CA_CERT": "<ES_CA_CERT>",
"NODE_TLS_REJECT_UNAUTHORIZED": "<NODE_TLS_REJECT_UNAUTHORIZED>",
"MAX_TOKEN_CALL": "<MAX_TOKEN_CALL>"
}
}
}
}
{
"mcpServers": {
"elasticsearch": {
"command": "npx",
"args": [
"-y",
"@tocharianou/[email protected]"
],
"env": {
"ES_URL": "<ES_URL>",
"ES_API_KEY": "<ES_API_KEY>",
"ES_USERNAME": "<ES_USERNAME>",
"ES_PASSWORD": "<ES_PASSWORD>",
"ES_CA_CERT": "<ES_CA_CERT>",
"NODE_TLS_REJECT_UNAUTHORIZED": "<NODE_TLS_REJECT_UNAUTHORIZED>",
"MAX_TOKEN_CALL": "<MAX_TOKEN_CALL>"
}
}
}
}
{
"servers": {
"elasticsearch": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@tocharianou/[email protected]"
],
"env": {
"ES_URL": "<ES_URL>",
"ES_API_KEY": "<ES_API_KEY>",
"ES_USERNAME": "<ES_USERNAME>",
"ES_PASSWORD": "<ES_PASSWORD>",
"ES_CA_CERT": "<ES_CA_CERT>",
"NODE_TLS_REJECT_UNAUTHORIZED": "<NODE_TLS_REJECT_UNAUTHORIZED>",
"MAX_TOKEN_CALL": "<MAX_TOKEN_CALL>"
}
}
}
}
Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.
Tools
This server runs locally, so its tools are listed by your MCP client once it starts.
Environment variables
| Name | Description |
|---|---|
ES_URLRequired | Your Elasticsearch instance URL (e.g., https://localhost:9200) |
ES_API_KEYOptional, secret | Elasticsearch API key for authentication |
ES_USERNAMEOptional | Elasticsearch username for basic authentication |
ES_PASSWORDOptional, secret | Elasticsearch password for basic authentication |
ES_CA_CERTOptional | Path to custom CA certificate for Elasticsearch SSL/TLS |
NODE_TLS_REJECT_UNAUTHORIZEDOptional | Set to '0' to disable SSL certificate validation (development only) |
MAX_TOKEN_CALLOptional | Maximum tokens per API call |
Details
| Package | @tocharianou/[email protected] (NPM, stdio) |
| Package | @tocharianou/[email protected] (NPM, streamable-http) |
| First published | 11 Oct 2026 |
| Last updated | 11 Oct 2026 |
| Registry name | io.github.TocharianOU/elasticsearch |
More databases servers See all
Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.
