Skip to content
appsgit

Elasticsearch MCP Server

Elasticsearch MCP Server is an MCP server that adds database tools to AI assistants such as Claude Desktop, Claude Code and Cursor. MCP server for interacting with Elasticsearch. It has 308 GitHub stars, is released under the Apache-2.0 license and runs locally with uvx elasticsearch-mcp-server.

github.com/cr7258/elasticsearch-mcp-server (opens in a new tab)

  • Needs API key
  • Databases
  • Apache-2.0
  • Actively maintained

Install Elasticsearch MCP Server

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.json
{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "command": "uvx",
      "args": [
        "elasticsearch-mcp-server"
      ],
      "env": {
        "ELASTICSEARCH_API_KEY": "your-value",
        "ELASTICSEARCH_PASSWORD": "your-value"
      }
    }
  }
}

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

Claude Code

claude mcp add --env ELASTICSEARCH_API_KEY=your-value --env ELASTICSEARCH_PASSWORD=your-value --transport stdio elasticsearch-mcp-server -- uvx elasticsearch-mcp-server

Cursor

.cursor/mcp.json
{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "elasticsearch-mcp-server"
      ],
      "env": {
        "ELASTICSEARCH_API_KEY": "your-value",
        "ELASTICSEARCH_PASSWORD": "your-value"
      }
    }
  }
}

Project file; use ~/.cursor/mcp.json to enable it in every project.

VS Code

.vscode/mcp.json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "elasticsearch_api_key",
      "description": "ELASTICSEARCH_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "elasticsearch_password",
      "description": "ELASTICSEARCH_PASSWORD",
      "password": true
    }
  ],
  "servers": {
    "elasticsearch-mcp-server": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "elasticsearch-mcp-server"
      ],
      "env": {
        "ELASTICSEARCH_API_KEY": "${input:elasticsearch_api_key}",
        "ELASTICSEARCH_PASSWORD": "${input:elasticsearch_password}"
      }
    }
  }
}

Config formats checked against the official docs on Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
ELASTICSEARCH_HOSTSNoComma-separated list of Elasticsearch hosts (e.g., https://localhost:9200)
ELASTICSEARCH_API_KEYsecretNoAPI key for Elasticsearch or Elastic Cloud authentication (recommended)
ELASTICSEARCH_USERNAMENoUsername for basic authentication (alternative to API key)
ELASTICSEARCH_PASSWORDsecretNoPassword for basic authentication (used with ELASTICSEARCH_USERNAME)
ELASTICSEARCH_VERIFY_CERTSNoWhether to verify SSL certificates (true/false)

About Elasticsearch MCP Server

A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction. This server enables searching documents, analyzing indices, and managing cluster through a set of tools.

FAQ

Elasticsearch MCP Server FAQ

Still curious? Email info@appsgit.com.

What is Elasticsearch MCP Server?

Elasticsearch MCP Server is an MCP server that adds database tools to AI assistants such as Claude Desktop, Claude Code and Cursor. MCP server for interacting with Elasticsearch. It has 308 GitHub stars, is released under the Apache-2.0 license and runs locally with uvx elasticsearch-mcp-server. The source code is at github.com/cr7258/elasticsearch-mcp-server.

How do I install the Elasticsearch MCP Server MCP server?

Add the command uvx elasticsearch-mcp-server to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is Elasticsearch MCP Server free?

The server is open source under the Apache-2.0 license, so running it is free. It needs credentials (ELASTICSEARCH_API_KEY and ELASTICSEARCH_PASSWORD) for the service it connects to, which may require a paid account.

Is Elasticsearch MCP Server actively maintained?

The most recent commit was on Oct 2, 2026. The latest release is v2.1.4, published Oct 2, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.