
aeazer/mcp-elasticsearch
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
An Elasticsearch MCP (Model Context Protocol) server
Обзор
Read this in other languages: English, 中文 An Elasticsearch MCP (Model Context Protocol) server built on github.com/modelcontextprotocol/go-sdk, providing seamless integration with Elasticsearch 7, 8, and 9 versions. - 🔗 : Supports stdio, Streamable HTTP, and SSE protocols (SSE deprecated) - 📊 : Compatible with Elasticsearch 7, 8, and 9 - ⚙️ : Configure via environment variables - 🔧 : Complete set of Elasticsearch operation tools - 🌐 : Docker support with optimized builds - 🐳 : Pre-built Docker images available - es_cluster_info: Get cluster information and version details - es_cluster_health: Get cluster health status and metrics - es_index_create: Create new indices with settings and mappings - es_index_delete: Delete existing indices - es_index_exists: Check if an index exists - es_index_list: List all indices with metadata - es_document_index: Index documents with optional ID - es_document_get: Retrieve documents by ID - es_document_update: Update existing documents -...
README
Показан фрагмент оригинального README. Открыть оригинал.
Elasticsearch MCP Server
Read this in other languages: English, 中文
Overview
An Elasticsearch MCP (Model Context Protocol) server built on github.com/modelcontextprotocol/go-sdk, providing seamless integration with Elasticsearch 7, 8, and 9 versions.
Features
- 🔗 Multi-Protocol Support: Supports stdio, Streamable HTTP, and SSE protocols (SSE deprecated)
- 📊 Multi-Version Compatibility: Compatible with Elasticsearch 7, 8, and 9
- ⚙️ Environment Configuration: Configure via environment variables
- 🔧 Rich Toolset: Complete set of Elasticsearch operation tools
- 🌐 Production Ready: Docker support with optimized builds
- 🐳 Container Ready: Pre-built Docker images available
Supported Tools
Cluster Operations
es_cluster_info: Get cluster information and version detailses_cluster_health: Get cluster health status and metrics
Index Management
es_index_create: Create new indices with settings and mappingses_index_delete: Delete existing indiceses_index_exists: Check if an index existses_index_list: List all indices with metadata
Document Operations
es_document_index: Index documents with optional IDes_document_get: Retrieve documents by IDes_document_update: Update existing documentses_document_delete: Delete documents by ID
Search Operations
es_search: Execute search queries with filters, sorting, and field selection- Supports:
index,query,size,from,sort,_source - Full Elasticsearch Query DSL support
- Supports:
Bulk Operations
es_bulk: Execute multiple operations in a single request
Quick Start
Choose one of the following methods to run the Elasticsearch MCP server:
Method 1: Use Pre-built Docker Image (Recommended)
# Basic usage with local Elasticsearch
docker run --rm \
-e ES_ADDRESSES=http://localhost:9200 \
ghcr.io/aeazer/mcp-elasticsearch:latest
# HTTP mode for remote access
docker run -d -p 8080:8080 \
-e MCP_PROTOCOL=http \
-e ES_ADDRESSES=http://your-elasticsearch:9200 \
ghcr.io/aeazer/mcp-elasticsearch:latest
# With authentication
docker run -d -p 8080:8080 \
-e MCP_PROTOCOL=http \
-e ES_ADDRESSES=https://your-elasticsearch:9200 \
-e ES_USERNAME=elastic \
-e ES_PASSWORD=your-password \
-e ES_SSL=true \
ghcr.io/aeazer/mcp-elasticsearch:latest
Method 2: Build Docker Image
# Clone the repository
git clone https://github.com/AeaZer/mcp-elasticsearch.git
cd mcp-elasticsearch
# Build Docker image
docker build -t mcp-elasticsearch .
# Run the container
docker run -e ES_ADDRESSES=http://localhost:9200 -e ES_VERSION=8 mcp-elasticsearch
Method 3: Compile from Source
# Clone the repository
git clone https://github.com/AeaZer/mcp-elasticsearch.git
cd mcp-elasticsearch
# Download dependencies and build
go mod download
go build -o mcp-elasticsearch main.go
Установка
docker run --rm \Конфигурация
{
"mcpServers": {
"elasticsearch": {
"command": "mcp-elasticsearch",
"env": {
"ES_ADDRESSES": "http://localhost:9200",
"ES_VERSION": "8"
}
}
}
}