Skip to content
VS Code

Elasticsearch for VS Code

io.github.tocharianou/elasticsearch

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

client:VS Code transport:stdio runtime:npm

Install Elasticsearch in VS Code

.vscode/mcp.json

{
  "inputs": [
    {
      "type": "promptString",
      "id": "es-url",
      "description": "ES_URL",
      "password": true
    },
    {
      "type": "promptString",
      "id": "es-api-key",
      "description": "ES_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "es-username",
      "description": "ES_USERNAME",
      "password": true
    },
    {
      "type": "promptString",
      "id": "es-password",
      "description": "ES_PASSWORD",
      "password": true
    },
    {
      "type": "promptString",
      "id": "es-ca-cert",
      "description": "ES_CA_CERT",
      "password": true
    },
    {
      "type": "promptString",
      "id": "node-tls-reject-unauthorized",
      "description": "NODE_TLS_REJECT_UNAUTHORIZED",
      "password": true
    },
    {
      "type": "promptString",
      "id": "max-token-call",
      "description": "MAX_TOKEN_CALL",
      "password": true
    }
  ],
  "servers": {
    "elasticsearch": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@tocharianou/elasticsearch-mcp"
      ],
      "env": {
        "ES_URL": "${input:es-url}",
        "ES_API_KEY": "${input:es-api-key}",
        "ES_USERNAME": "${input:es-username}",
        "ES_PASSWORD": "${input:es-password}",
        "ES_CA_CERT": "${input:es-ca-cert}",
        "NODE_TLS_REJECT_UNAUTHORIZED": "${input:node-tls-reject-unauthorized}",
        "MAX_TOKEN_CALL": "${input:max-token-call}"
      }
    }
  }
}

VS Code prompts for each input the first time the server starts, so no secret is written to the file. VS Code docs

Elasticsearch in other clients