PluginBench
MCP Server
Maintained
Apache-2.0

Elasticsearch MCP Server

io.github.TocharianOU/elasticsearch

What is the Elasticsearch MCP server?

Elasticsearch MCP Server with multi-version support (ES 5.x-9.x) and comprehensive API access

How to install Elasticsearch

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • ES_URL
    required

    Your Elasticsearch instance URL (e.g., https://localhost:9200)

  • ES_API_KEY
    secret

    Elasticsearch API key for authentication

  • ES_USERNAME

    Elasticsearch username for basic authentication

  • ES_PASSWORD
    secret

    Elasticsearch password for basic authentication

  • ES_CA_CERT

    Path to custom CA certificate for Elasticsearch SSL/TLS

  • NODE_TLS_REJECT_UNAUTHORIZED

    Set to '0' to disable SSL certificate validation (development only)

  • MAX_TOKEN_CALL

    Maximum tokens per API call

  • MCP_TRANSPORT
    required

    Transport mode selection

  • MCP_HTTP_PORT

    HTTP server port (when using HTTP transport)

  • MCP_HTTP_HOST

    HTTP server host (when using HTTP transport)

Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "<YOUR_ES_URL>",
        "ES_API_KEY": "<YOUR_ES_API_KEY>",
        "ES_USERNAME": "<YOUR_ES_USERNAME>",
        "ES_PASSWORD": "<YOUR_ES_PASSWORD>",
        "ES_CA_CERT": "<YOUR_ES_CA_CERT>",
        "NODE_TLS_REJECT_UNAUTHORIZED": "<YOUR_NODE_TLS_REJECT_UNAUTHORIZED>",
        "MAX_TOKEN_CALL": "<YOUR_MAX_TOKEN_CALL>",
        "MCP_TRANSPORT": "<YOUR_MCP_TRANSPORT>",
        "MCP_HTTP_PORT": "<YOUR_MCP_HTTP_PORT>",
        "MCP_HTTP_HOST": "<YOUR_MCP_HTTP_HOST>"
      }
    }
  }
}
Cursor
~/.cursor/mcp.json
{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "<YOUR_ES_URL>",
        "ES_API_KEY": "<YOUR_ES_API_KEY>",
        "ES_USERNAME": "<YOUR_ES_USERNAME>",
        "ES_PASSWORD": "<YOUR_ES_PASSWORD>",
        "ES_CA_CERT": "<YOUR_ES_CA_CERT>",
        "NODE_TLS_REJECT_UNAUTHORIZED": "<YOUR_NODE_TLS_REJECT_UNAUTHORIZED>",
        "MAX_TOKEN_CALL": "<YOUR_MAX_TOKEN_CALL>",
        "MCP_TRANSPORT": "<YOUR_MCP_TRANSPORT>",
        "MCP_HTTP_PORT": "<YOUR_MCP_HTTP_PORT>",
        "MCP_HTTP_HOST": "<YOUR_MCP_HTTP_HOST>"
      }
    }
  }
}
Windsurf
~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "elasticsearch": {
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "<YOUR_ES_URL>",
        "ES_API_KEY": "<YOUR_ES_API_KEY>",
        "ES_USERNAME": "<YOUR_ES_USERNAME>",
        "ES_PASSWORD": "<YOUR_ES_PASSWORD>",
        "ES_CA_CERT": "<YOUR_ES_CA_CERT>",
        "NODE_TLS_REJECT_UNAUTHORIZED": "<YOUR_NODE_TLS_REJECT_UNAUTHORIZED>",
        "MAX_TOKEN_CALL": "<YOUR_MAX_TOKEN_CALL>",
        "MCP_TRANSPORT": "<YOUR_MCP_TRANSPORT>",
        "MCP_HTTP_PORT": "<YOUR_MCP_HTTP_PORT>",
        "MCP_HTTP_HOST": "<YOUR_MCP_HTTP_HOST>"
      }
    }
  }
}
VS Code
.vscode/mcp.json
{
  "servers": {
    "elasticsearch": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "<YOUR_ES_URL>",
        "ES_API_KEY": "<YOUR_ES_API_KEY>",
        "ES_USERNAME": "<YOUR_ES_USERNAME>",
        "ES_PASSWORD": "<YOUR_ES_PASSWORD>",
        "ES_CA_CERT": "<YOUR_ES_CA_CERT>",
        "NODE_TLS_REJECT_UNAUTHORIZED": "<YOUR_NODE_TLS_REJECT_UNAUTHORIZED>",
        "MAX_TOKEN_CALL": "<YOUR_MAX_TOKEN_CALL>",
        "MCP_TRANSPORT": "<YOUR_MCP_TRANSPORT>",
        "MCP_HTTP_PORT": "<YOUR_MCP_HTTP_PORT>",
        "MCP_HTTP_HOST": "<YOUR_MCP_HTTP_HOST>"
      }
    }
  }
}
Claude Code
claude mcp add elasticsearch --env ES_URL=<YOUR_ES_URL> --env ES_API_KEY=<YOUR_ES_API_KEY> --env ES_USERNAME=<YOUR_ES_USERNAME> --env ES_PASSWORD=<YOUR_ES_PASSWORD> --env ES_CA_CERT=<YOUR_ES_CA_CERT> --env NODE_TLS_REJECT_UNAUTHORIZED=<YOUR_NODE_TLS_REJECT_UNAUTHORIZED> --env MAX_TOKEN_CALL=<YOUR_MAX_TOKEN_CALL> --env MCP_TRANSPORT=<YOUR_MCP_TRANSPORT> --env MCP_HTTP_PORT=<YOUR_MCP_HTTP_PORT> --env MCP_HTTP_HOST=<YOUR_MCP_HTTP_HOST> -- npx -y @tocharianou/elasticsearch-mcp

Related MCP servers

Kibana

Maintained

Kibana MCP Server with dynamic API discovery and comprehensive Elastic Stack integration

71
TypeScript
Apache-2.0
View repository →