Elastic MCP Server

Connect to your Elasticsearch cluster from any MCP-compatible client (such as Claude Desktop) using the Model Context Protocol (MCP). This server

Local serverstdioPython

What is the Elastic MCP Server?

Connect to your Elasticsearch cluster from any MCP-compatible client (such as Claude Desktop) using the Model Context Protocol (MCP). This server exposes your

Configuration and credentials

  • Python 3.8+ - Elasticsearch running and accessible - uv or pip for dependency management

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
search_indexSearch an index with a query string.
list_indicesList all indices (excluding system indices).
get_index_mappingsGet mappings for a specific index.

How to install the Elastic MCP Server

{
  "mcpServers": {
    "Elastic MCP Server": {
      "command": "uv",
      "args": [
        "run",
        "--with-requirements",
        "<absolute path to requirements.txt>",
        "fastmcp",
        "run",
        "<absolute path to elastic_tool.py>"
      ],
      "env": {
        "ELASTIC_URL": "http://localhost:9200",
        "ELASTIC_USERNAME": "your_username",
        "ELASTIC_PASSWORD": "YOUR_ELASTIC_PASSWORD"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  • Python 3.8+ - Elasticsearch running and accessible - uv or pip for dependency management
VariableDescriptionRequired
ELASTIC_URLDeclared in the maintainer’s client configuration.Check documentation
ELASTIC_USERNAMEDeclared in the maintainer’s client configuration.Check documentation
ELASTIC_PASSWORDDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use Elastic MCP to search index.”
  • “Use Elastic MCP to list indices.”
  • “Use Elastic MCP to get index mappings.”

Frequently asked questions

Connect to your Elasticsearch cluster from any MCP-compatible client (such as Claude Desktop) using the Model Context Protocol (MCP). This server exposes your Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.