cr7258/elasticsearch-mcp-server
A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction.
What it solves
This project provides a Model Context Protocol (MCP) server that allows AI models to interact directly with Elasticsearch and OpenSearch clusters. It bridges the gap between LLMs and search indices, enabling models to search for documents, manage indices, and analyze cluster health without needing a custom API layer for every operation.
How it works
The server implements the MCP standard to expose a set of tools that the AI model can call. These tools map to Elasticsearch/OpenSearch API calls, covering document operations (search, index, get, delete), index management (create, delete, list), cluster health checks, and alias operations. It supports multiple authentication methods, including API keys and basic authentication, and can be configured to target multiple named clusters simultaneously.
Who it’s for
- AI Application Developers building RAG (Retrieval-Augmented Generation) systems or AI agents that need to query and manage search indices.
- DevOps and SREs who want to use LLMs to monitor and manage their search clusters via a natural language interface.
- Data Engineers who need a way to integrate search data into AI workflows.
Highlights
- Comprehensive Toolset: Includes tools for general API requests, index and document operations, and cluster statistics.
- Multi-Cluster Support: Ability to configure and target multiple named clusters via environment variables or JSON files.
- Token Optimization: Optional support for GCF (Graph Compact Format) to reduce token usage by up to 40% for large record sets.
- Security Controls: Ability to disable high-risk write operations to ensure the server remains read-only.
- Flexible Deployment: Supports stdio, SSE, and Streamable HTTP transports, with Kubernetes deployment options via Helm charts.
Related
- Project
- Project
- Project
- Project
- Project