Skip to content
Install
mcp-registry/elasticsearch-mcp-server
elasticsearch-mcp-server logo

elasticsearch-mcp-server

Author: cr7258

Description: Model Context Protocol (MCP) server that exposes Elasticsearch / OpenSearch operations (indices, documents, cluster, aliases) through CLI and HTTP/SSE transports.

Stars: 182

Forks: 36

License: Apache License 2.0

Category: Open Source

Overview

Installation

1. Clone the repository:
git clone https://github.com/cr7258/elasticsearch-mcp-server.git cd elasticsearch-mcp-server
2. Create and activate a Python virtual-environment (recommended):
python -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate
3. Install server dependencies:
pip install -r requirements.txt
4. Configure connection information through environment variables or ./config.yaml (check the repo):
MCP_ES_HOST =localhost MCP_ES_PORT =9200 MCP_ES_USERNAME =<user-if-needed> MCP_ES_PASSWORD =<pass-if-needed> # For OpenSearch just replace host/port with your cluster endpoint.
5. (Optional) Run unit-tests to verify installation:
pytest
6. Start the MCP server:
python -m mcp_server # or: uvicorn mcp_server.main:app --host 0.0.0.0 --port 8080
7. The API will be reachable at http://localhost:8080/ (Swagger/OpenAPI docs usually at /docs).

License: Apache License 2.0
Updated 7/30/2025