elasticsearch-mcp-server  by cr7258

Interact with Elasticsearch and OpenSearch via MCP protocol

Created 1 year ago
265 stars

Top 96.3% on SourcePulse

GitHubView on GitHub
Project Summary

This Model Context Protocol (MCP) server provides a standardized interface for interacting with Elasticsearch and OpenSearch. It empowers developers and researchers by offering a programmatic way to manage indices, documents, and cluster operations, simplifying complex data interactions.

How It Works

The server implements the Model Context Protocol (MCP) to abstract the complexities of Elasticsearch and OpenSearch APIs. It exposes a rich set of tools for general API requests, index and data stream management, document indexing/searching/deletion, cluster health and statistics, alias manipulation, and text analysis. This approach allows for consistent interaction across different versions and distributions of Elasticsearch and OpenSearch.

Quick Start & Requirements

  • Primary install/run command: Use uvx for PyPI installation or uv for local development.
  • Prerequisites: An Elasticsearch or OpenSearch cluster (Docker Compose examples are provided).
  • Dependencies: uvx or uv tool.
  • Configuration: Environment variables are used for authentication (username/password, API key), connection settings (ELASTICSEARCH_HOSTS, OPENSEARCH_HOSTS), SSL verification, request timeouts, and MCP server authentication (MCP_API_KEY). High-risk operations can be disabled via DISABLE_HIGH_RISK_OPERATIONS or DISABLE_OPERATIONS.
  • Demo: https://github.com/user-attachments/assets/f7409e31-fac4-4321-9c94-b0ff2ea7ff15

Highlighted Details

  • Comprehensive toolset covering index, document, cluster, alias, and analyzer operations.
  • Supports multiple transport protocols: stdio, sse, and streamable-http.
  • Robust security configuration options, including basic auth, API key authentication, and MCP server-level Bearer token authentication.
  • Compatibility with Elasticsearch 7.x, 8.x, 9.x, and OpenSearch 1.x, 2.x, 3.x, with specific variants available for different versions.

Maintenance & Community

No specific information regarding contributors, sponsorships, or community channels (e.g., Discord, Slack) is present in the provided README.

Licensing & Compatibility

  • License: Apache License Version 2.0.
  • Compatibility: Permissive license compatible with commercial use and closed-source linking.

Limitations & Caveats

For HTTP transports (sse, streamable-http), setting MCP_API_KEY is crucial for production deployments to prevent unauthorized access; otherwise, the server is accessible without authentication. The stdio transport relies on local process communication and does not require authentication. High-risk write operations can be disabled for enhanced security.

Health Check
Last Commit

2 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
10 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Assaf Elovic Assaf Elovic(Cofounder of Tavily), and
9 more.

Vane by ItzCrazyKns

0.4%
34k
AI-powered search engine alternative
Created 2 years ago
Updated 1 day ago
Feedback? Help us improve.