cr7258 avatar

Elasticsearch Mcp Server

cr7258/elasticsearch-mcp-server

The Elasticsearch/OpenSearch MCP server provides tools for interacting with Elasticsearch and OpenSearch clusters, enabling document search, index management, cluster monitoring, and alias operations through a standardized interface. It offers capabilities including searching and managing documents, creating and deleting indices, analyzing text tokenization, viewing cluster health and statistics, and performing general API requests for operations without dedicated tools. The server supports basic authentication and solves the problem of integrating Elasticsearch/OpenSearch functionality into AI applications that use the Model Context Protocol.

GitHub stars
289
tools
20
auth
Secret needed
transport
STDIO
env vars
5
last updated
Sep 15, 2025

Tools

20 tools

Public tool metadata for what this MCP can expose to an agent.

general_api_requestPerform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.

Perform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.

No parameter schema in public metadata yet.

list_indicesList all indices.

List all indices.

No parameter schema in public metadata yet.

get_indexReturns information (mappings, settings, aliases) about one or more indices.

Returns information (mappings, settings, aliases) about one or more indices.

No parameter schema in public metadata yet.

create_indexCreate a new index.

Create a new index.

No parameter schema in public metadata yet.

delete_indexDelete an index.

Delete an index.

No parameter schema in public metadata yet.

create_data_streamCreate a new data stream (requires matching index template).

Create a new data stream (requires matching index template).

No parameter schema in public metadata yet.

get_data_streamGet information about one or more data streams.

Get information about one or more data streams.

No parameter schema in public metadata yet.

delete_data_streamDelete one or more data streams and their backing indices.

Delete one or more data streams and their backing indices.

No parameter schema in public metadata yet.

search_documentsSearch for documents.

Search for documents.

No parameter schema in public metadata yet.

index_documentCreates or updates a document in the index.

Creates or updates a document in the index.

No parameter schema in public metadata yet.

get_documentGet a document by ID.

Get a document by ID.

No parameter schema in public metadata yet.

delete_documentDelete a document by ID.

Delete a document by ID.

No parameter schema in public metadata yet.

delete_by_queryDeletes documents matching the provided query.

Deletes documents matching the provided query.

No parameter schema in public metadata yet.

get_cluster_healthReturns basic information about the health of the cluster.

Returns basic information about the health of the cluster.

No parameter schema in public metadata yet.

get_cluster_statsReturns high-level overview of cluster statistics.

Returns high-level overview of cluster statistics.

No parameter schema in public metadata yet.

list_aliasesList all aliases.

List all aliases.

No parameter schema in public metadata yet.

get_aliasGet alias information for a specific index.

Get alias information for a specific index.

No parameter schema in public metadata yet.

put_aliasCreate or update an alias for a specific index.

Create or update an alias for a specific index.

No parameter schema in public metadata yet.

delete_aliasDelete an alias for a specific index.

Delete an alias for a specific index.

No parameter schema in public metadata yet.

analyze_textAnalyze text using a specified analyzer or custom analysis chain. Useful for debugging search queries and understanding how text is tokenized.

Analyze text using a specified analyzer or custom analysis chain. Useful for debugging search queries and understanding how text is tokenized.

No parameter schema in public metadata yet.

Sponsors

Configuration

ELASTICSEARCH_HOSTSdefault: https://localhost:9200

Comma-separated list of Elasticsearch hosts (e.g., https://localhost:9200)

ELASTICSEARCH_API_KEYsecret

API key for Elasticsearch or Elastic Cloud authentication (recommended)

ELASTICSEARCH_USERNAME

Username for basic authentication (alternative to API key)

ELASTICSEARCH_PASSWORDsecret

Password for basic authentication (used with ELASTICSEARCH_USERNAME)

ELASTICSEARCH_VERIFY_CERTSdefault: false

Whether to verify SSL certificates (true/false)

Readme

Elasticsearch/OpenSearch MCP Server

MseeP.ai Security Assessment Badge

Trust Score

Overview

A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction. This server enables searching documents, analyzing indices, and managing cluster through a set of tools.

Elasticsearch MCP Server

Demo

https://github.com/user-attachments/assets/f7409e31-fac4-4321-9c94-b0ff2ea7ff15

Features

General Operations

  • general_api_request: Perform a general HTTP API request. Use this tool for any Elasticsearch/OpenSearch API that does not have a dedicated tool.

Index Operations


View the full README on GitHub

Details

Repository
github.com/cr7258/elasticsearch-mcp-server
Category
Databases
Package
elasticsearch-mcp-server
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Related Databases MCP servers

View all
1tocharianou avatarElasticsearchtocharianou/elasticsearch-mcpElasticsearch MCP Server for ES 5.x-9.x with a query harness, field validation and full API access8stars
2timescale avatarTiger Skillstimescale/tiger-skills-mcp-serverProvider agnostic skills implementation, with skills sourced from local paths or GitHub repositories7stars
3neverinfamous avatarMysql Mcpneverinfamous/mysql-mcpEnterprise-grade MySQL MCP Server with OAuth 2.0, 106 tools, and Docker deployment5stars
4marcelo-ochoa avatarMysqlmarcelo-ochoa/serversAn MCP server for MySQL databases.0stars
5yawlabs avatarRedis MCP Serveryawlabs/redis-mcpRead-first Redis MCP: SCAN key explorer, keyspace/TTL/memory/slowlog stats, DBA advisor2stars
6tharanabope avatarSQL Server MCP (macOS)tharanabope/sql-mcp-mac-windowsSQL Server MCP with RAG capabilities for macOS (Docker SQL Server support)0stars