Elasticsearch MCP Server

Connect your AI agents to Elasticsearch and OpenSearch clusters for seamless search, index management, and real-time analytics inside FlowHunt.

Elasticsearch MCP Server

What does “Elasticsearch” MCP Server do?

The Elasticsearch MCP Server is a Model Context Protocol (MCP) implementation that enables seamless interaction with Elasticsearch and OpenSearch clusters. Serving as a bridge between AI assistants and these powerful search engines, it allows users to perform advanced search queries, analyze indices, and manage clusters programmatically. By exposing a suite of tools, the server empowers developers to automate document searches, index management, and cluster operations directly from their AI-driven workflows. This enhances productivity in tasks such as data exploration, monitoring, and content retrieval, making the Elasticsearch MCP Server an invaluable asset for integrating real-time search and analytics capabilities into AI development environments.

List of Prompts

(No prompt templates were mentioned in the repository. Section left intentionally blank.)

List of Resources

(No explicit MCP resources are listed in the available documentation or repository files.)

List of Tools

  • general_api_request: Perform a general HTTP API request to Elasticsearch/OpenSearch, useful for APIs without dedicated tools.
  • list_indices: List all indices in the cluster.
  • get_index: Retrieve detailed information (mappings, settings, aliases) for one or more indices.
  • create_index: Create a new index in the cluster.
  • delete_index: Delete an existing index from the cluster.
  • search_documents: Search for documents within indices.

Use Cases of this MCP Server

  • Index Management: Effortlessly create and delete indices, allowing developers to automate data schema changes or manage environments for testing and production.
  • Cluster Exploration: List and inspect indices to monitor cluster health, usage patterns, and optimize storage strategies.
  • Data Search and Retrieval: Search for documents using rich query capabilities, facilitating information extraction, analytics, and context provisioning for AI agents.
  • Custom API Interactions: Use the general_api_request tool to access any Elasticsearch/OpenSearch API endpoint, enabling advanced diagnostics or custom workflows.
  • Automated Monitoring: Integrate with AI assistants to periodically check index status or cluster health, generating alerts and summaries for ops teams.

How to set it up

Windsurf

  1. Ensure you have the necessary prerequisites, such as Node.js and Docker (if containerizing).
  2. Open your Windsurf configuration file (usually windsurf.json or equivalent).
  3. Add the Elasticsearch MCP Server to your mcpServers section:
    {
      "mcpServers": {
        "elasticsearch-mcp": {
          "command": "elasticsearch-mcp-server",
          "args": ["serve"]
        }
      }
    }
    
  4. Save the configuration and restart Windsurf.
  5. Verify the setup by checking if the server appears in your MCP dashboard.

Securing API Keys Use environment variables to secure connection details:

{
  "elasticsearch-mcp": {
    "command": "elasticsearch-mcp-server",
    "args": ["serve"],
    "env": {
      "ELASTICSEARCH_URL": "${ELASTICSEARCH_URL}",
      "ELASTICSEARCH_API_KEY": "${ELASTICSEARCH_API_KEY}"
    }
  }
}

Claude

  1. Install dependencies and ensure Claude supports MCP integration.
  2. Open the Claude configuration file.
  3. Insert the following JSON in the mcpServers section:
    {
      "elasticsearch-mcp": {
        "command": "elasticsearch-mcp-server",
        "args": ["serve"]
      }
    }
    
  4. Save changes and restart Claude.
  5. Confirm integration by running a test query.

Securing API Keys

{
  "elasticsearch-mcp": {
    "command": "elasticsearch-mcp-server",
    "args": ["serve"],
    "env": {
      "ELASTICSEARCH_URL": "${ELASTICSEARCH_URL}",
      "ELASTICSEARCH_API_KEY": "${ELASTICSEARCH_API_KEY}"
    }
  }
}

Cursor

  1. Ensure prerequisites are installed on your system.
  2. Edit the cursor.json configuration file.
  3. Register the server as follows:
    {
      "mcpServers": {
        "elasticsearch-mcp": {
          "command": "elasticsearch-mcp-server",
          "args": ["serve"]
        }
      }
    }
    
  4. Save the file and restart Cursor.
  5. Test the server connection within Cursor.

Securing API Keys

{
  "elasticsearch-mcp": {
    "command": "elasticsearch-mcp-server",
    "args": ["serve"],
    "env": {
      "ELASTICSEARCH_URL": "${ELASTICSEARCH_URL}",
      "ELASTICSEARCH_API_KEY": "${ELASTICSEARCH_API_KEY}"
    }
  }
}

Cline

  1. Install all Cline dependencies.
  2. Open your Cline configuration file.
  3. Add the Elasticsearch MCP Server:
    {
      "mcpServers": {
        "elasticsearch-mcp": {
          "command": "elasticsearch-mcp-server",
          "args": ["serve"]
        }
      }
    }
    
  4. Save and restart Cline.
  5. Validate the integration by executing an MCP call.

Securing API Keys

{
  "elasticsearch-mcp": {
    "command": "elasticsearch-mcp-server",
    "args": ["serve"],
    "env": {
      "ELASTICSEARCH_URL": "${ELASTICSEARCH_URL}",
      "ELASTICSEARCH_API_KEY": "${ELASTICSEARCH_API_KEY}"
    }
  }
}

How to use this MCP inside flows

Using MCP in FlowHunt

To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

FlowHunt MCP flow

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:

{
  "elasticsearch-mcp": {
    "transport": "streamable_http",
    "url": "https://yourmcpserver.example/pathtothemcp/url"
  }
}

Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “elasticsearch-mcp” to whatever the actual name of your MCP server is and replace the URL with your own MCP server URL.


Overview

SectionAvailabilityDetails/Notes
OverviewOverview available in README.md
List of PromptsNo prompt templates found
List of ResourcesNot listed in repo
List of ToolsTools listed in README.md
Securing API Keys.env.example and JSON env example provided
Sampling Support (less important in evaluation)Not mentioned

Our opinion

The Elasticsearch MCP Server provides excellent tooling for integrating search and index management into AI workflows and has solid documentation for setup and usage. However, the lack of prompt templates, explicit MCP resources, and no mention of Roots or Sampling slightly limits its out-of-the-box capabilities for more advanced agentic workflows.

MCP Score

Has a LICENSE✅ (Apache-2.0)
Has at least one tool
Number of Forks34
Number of Stars162

Frequently asked questions

What is the Elasticsearch MCP Server?

It is a Model Context Protocol server that enables AI agents and workflows to interact directly with Elasticsearch or OpenSearch clusters. You can search documents, manage indices, and automate cluster operations from within FlowHunt or any supported client.

What tools does the server provide?

The server offers tools for listing and managing indices, running document searches, retrieving index details, and making general HTTP API requests to Elasticsearch/OpenSearch endpoints.

How do I secure my Elasticsearch credentials?

Always use environment variables (such as ELASTICSEARCH_URL and ELASTICSEARCH_API_KEY) in your MCP server configuration. This keeps sensitive information out of code and config files.

Can I use this server with both Elasticsearch and OpenSearch?

Yes, the server is compatible with both Elasticsearch and OpenSearch clusters, supporting a wide range of API operations for each.

What are common use cases?

Popular use cases include real-time search within AI workflows, index management, automated monitoring of cluster health, analytics, and integrating advanced search capabilities into your AI-powered apps.

Integrate Elasticsearch MCP Server with FlowHunt

Enable your AI agents to search, analyze, and manage Elasticsearch/OpenSearch clusters programmatically. Start building smarter, search-powered workflows today.

Learn more