================== /// MCP /// /// ELA /// ================== [server:online] [protocol:ready]
elasticsearch-mcp-server
by cr7258
Model Context Protocol (MCP) server that exposes Elasticsearch / OpenSearch operations (indices, documents, cluster, aliases) through CLI and HTTP/SSE transports.
182
36
Open SourceInstallation
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).
Documentation
License: Apache License 2.0
Updated 7/30/2025