LogoSTMCP
Download
elasticsearch-mcp-server

Elasticsearch/OpenSearch MCP Server

A Model Context Protocol server for Elasticsearch and OpenSearch that enables document search, index management, and cluster operations through AI assistants with comprehensive tooling for data interaction.

Tools

1. general_api_request

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

2. list_indices

List all indices.

3. get_index

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

4. create_index

Create a new index.

5. delete_index

Delete an index.

6. create_data_stream

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

7. get_data_stream

Get information about one or more data streams.

8. delete_data_stream

Delete one or more data streams and their backing indices.

9. search_documents

Search for documents.

10. index_document

Creates or updates a document in the index.

11. get_document

Get a document by ID.

12. delete_document

Delete a document by ID.

13. delete_by_query

Deletes documents matching the provided query.

14. get_cluster_health

Returns basic information about the health of the cluster.

15. get_cluster_stats

Returns high-level overview of cluster statistics.

16. list_aliases

List all aliases.

17. get_alias

Get alias information for a specific index.

18. put_alias

Create or update an alias for a specific index.

19. delete_alias

Delete an alias for a specific index.

Open Graph image for Elasticsearch/OpenSearch MCP Server

JSON Config

{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "command": "uvx",
      "args": [
        "elasticsearch-mcp-server"
      ],
      "env": {
        "ELASTICSEARCH_HOSTS": "https://localhost:9200",
        "ELASTICSEARCH_USERNAME": "elastic",
        "ELASTICSEARCH_PASSWORD": "test123"
      }
    }
  }
}

Useful Links

Information

  • Author@cr7258
  • Published date2025/09/19