Price Per TokenPrice Per Token

Elasticsearch MCP Server

by elastic

0

About

Elasticsearch MCP Server connects AI agents to Elasticsearch data through the Model Context Protocol, enabling natural language interactions with Elasticsearch indices for querying and analysis. Key features of Elasticsearch MCP Server: - Index discovery and exploration of available indices in your Elasticsearch cluster - Mapping retrieval to understand the structure and fields of your data - Search execution to query documents and retrieve specific data - Shard information access for cluster topology and data distribution details - Support for stdio and streamable-HTTP protocols - Available as a Docker container image from AWS Marketplace Note: This MCP server is deprecated and has been superseded by the Elastic Agent Builder MCP endpoint available in Elastic 9.2.0+ and Elasticsearch Serverless projects.

README

Elasticsearch MCP Server

> [!CAUTION] > This MCP server is deprecated and will only receive critical security updates going forward. > It has been superseded by the Elastic Agent Builder MCP endpoint, which is available in Elastic 9.2.0+ and Elasticsearch Serverless projects.

Use the Elasticsearch MCP Server for AI Agents

The Elasticsearch MCP Server connects your AI agents to Elasticsearch data using the Model Context Protocol (MCP). It enables natural language interactions with your Elasticsearch indices, allowing agents to query, analyze, and retrieve data without custom APIs.

Follow these steps to deploy and configure the Elasticsearch MCP Server container image from AWS Marketplace.

Before you begin

Before you start, ensure you have:

  • An Elasticsearch cluster (version 8.x or 9.x) accessible from your AWS environment
  • Elasticsearch authentication credentials:
  • - An API key, or - A username and password pair
  • Docker installed and running in your AWS environment (for example, on an EC2 instance or in a container service)
  • An MCP client configured (such as Claude Desktop, Cursor, VS Code, or another MCP-compatible tool)
  • Network connectivity between your deployment environment and your Elasticsearch cluster
  • > [!NOTE] > > These instructions apply to Elasticsearch MCP Server 0.4.0 and later. > For versions 0.3.1 and earlier, refer to the README for v0.3.1.

    Deploy the Elasticsearch MCP Server

    The Elasticsearch MCP Server is provided as a Docker container image available from AWS Marketplace. You can run it using either the stdio protocol (for direct client connections) or the streamable-HTTP protocol (for web-based integrations).

    #### Choose a protocol

    The server supports two protocols:

  • stdio: Direct communication between the MCP client and server. Use this when your client supports stdio and runs in the same environment.
  • streamable-HTTP: HTTP-based protocol recommended for web integrations, stateful sessions, and concurrent clients.
  • > Note: Server-Sent Events (SSE) is deprecated. Use streamable-HTTP instead.

    Configure the stdio protocol

    Use the stdio protocol when your MCP client connects directly to the server process.

    #### Set environment variables for stdio mode

    Set the following environment variables:

  • ES_URL: The URL of your Elasticsearch cluster (for example, https://your-cluster.es.amazonaws.com:9200)
  • For authentication, use one of these options:
  • - API key: Set ES_API_KEY to your Elasticsearch API key - Basic authentication: Set ES_USERNAME and ES_PASSWORD to your Elasticsearch credentials
  • (Optional) ES_SSL_SKIP_VERIFY: Set to true to skip SSL/TLS certificate verification when connecting to Elasticsearch. Only use this for development or testing environments.
  • #### Run the container in stdio mode

    Start the MCP server in stdio mode:

    docker run -i --rm \
      -e ES_URL \
      -e ES_API_KEY \
      docker.elastic.co/mcp/elasticsearch \
      stdio
    

    #### Configure Claude Desktop

    Add this configuration to your Claude Desktop configuration file:

    {
      "mcpServers": {
        "elasticsearch-mcp-server": {
          "command": "docker",
          "args": [
            "run", "-i", "--rm",
            "-e", "ES_URL",
            "-e", "ES_API_KEY",
            "docker.elastic.co/mcp/elasticsearch",
            "stdio"
          ],
          "env": {
            "ES_URL": "",
            "ES_API_KEY": ""
          }
        }
      }
    }
    

    Replace ` with your Elasticsearch cluster URL and with your API key.

    Configure the streamable-HTTP protocol

    Use the streamable-HTTP protocol for web-based integrations or when you need to support multiple concurrent clients.

    #### Set environment variables for HTTP mode

    Set the same environment variables as the stdio protocol:

  • ES_URL: The URL of your Elasticsearch cluster
  • For authentication, use one of these options:
  • - API key: Set
    ES_API_KEY to your Elasticsearch API key - Basic authentication: Set ES_USERNAME and ES_PASSWORD to your Elasticsearch credentials
  • (Optional) ES_SSL_SKIP_VERIFY: Set to true to skip SSL/TLS certificate verification
  • #### Run the container in HTTP mode

    Start the MCP server in HTTP mode:

    docker run --rm \
      -e ES_URL \
      -e ES_API_KEY \
      -p 8080:8080 \
      docker.elastic.co/mcp/elasticsearch \
      http
    

    The streamable-HTTP endpoint is available at http://:8080/mcp`. A health check endpoint is available at

    Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81