{"id":26671830,"url":"https://github.com/elastic/mcp-server-elasticsearch","last_synced_at":"2026-08-27T16:10:26.744Z","repository":{"id":284143372,"uuid":"953992846","full_name":"elastic/mcp-server-elasticsearch","owner":"elastic","description":null,"archived":false,"fork":false,"pushed_at":"2026-08-20T23:47:05.000Z","size":569,"stargazers_count":705,"open_issues_count":15,"forks_count":146,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-08-21T22:55:02.831Z","etag":null,"topics":["elasticsearch","mcp","mcp-server","vector-database"],"latest_commit_sha":null,"homepage":"https://www.elastic.co/elasticsearch","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elastic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.txt","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-24T11:59:18.000Z","updated_at":"2026-08-18T21:05:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"b15213c2-81bb-4890-8666-2ad9c7481226","html_url":"https://github.com/elastic/mcp-server-elasticsearch","commit_stats":null,"previous_names":["elastic/mcp-server-elasticsearch"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/elastic/mcp-server-elasticsearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fmcp-server-elasticsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fmcp-server-elasticsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fmcp-server-elasticsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fmcp-server-elasticsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elastic","download_url":"https://codeload.github.com/elastic/mcp-server-elasticsearch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elastic%2Fmcp-server-elasticsearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36944077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-08-22T15:14:58.755Z","status":"online","status_checked_at":"2026-08-27T02:00:07.166Z","response_time":96,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elasticsearch","mcp","mcp-server","vector-database"],"created_at":"2025-03-26T00:35:12.960Z","updated_at":"2026-08-27T16:10:26.738Z","avatar_url":"https://github.com/elastic.png","language":"Rust","funding_links":[],"categories":["Databases","Search \u0026 Discovery Mcp Servers","MCP Servers","MCP 服务器精选列表","*Ops for AI","Datenbanken und Data Warehouses","📚 Projects (1974 total)","Production-Ready Servers","官方 MCP 服务器列表","Rust","🧰 MCP Tools","APIs and HTTP Requests","🔧 Utilities","🏗️ Infrastructure, Utils \u0026 Orchestration","Servers"],"sub_categories":["Search Engines","Databases","🗄️ 数据库交互","Model Serving \u0026 Inference","Claude API","Dieselbe Konfiguration, CLI und IDE","MCP Servers","How to Submit","🏢 Enterprise, Cloud \u0026 Threat Intelligence MCP Servers","🛡️ Security Operations (Blue/Purple)","Data \u0026 Databases"],"readme":"# Elasticsearch MCP Server\n\n\u003e [!CAUTION]\n\u003e This MCP server is deprecated and will only receive critical security updates going forward.\n\u003e It has been superseded by the [Elastic Agent Builder](https://ela.st/agent-builder-docs) [MCP endpoint](https://ela.st/agent-builder-mcp), which is available in Elastic 9.2.0+ and Elasticsearch Serverless projects.\n\n## Use the Elasticsearch MCP Server for AI Agents\n\nThe Elasticsearch MCP Server connects your AI agents to Elasticsearch data using the [Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/intro) (MCP).\nIt enables natural language interactions with your Elasticsearch indices, allowing agents to query, analyze, and retrieve data without custom APIs.\n\nFollow these steps to deploy and configure the Elasticsearch MCP Server container image from AWS Marketplace.\n\n### Before you begin\n\nBefore you start, ensure you have:\n\n- An Elasticsearch cluster (version 8.x or 9.x) accessible from your AWS environment\n- Elasticsearch authentication credentials:\n  - An [API key](https://www.elastic.co/docs/deploy-manage/api-keys), or\n  - A [username](https://www.elastic.co/docs/deploy-manage/users-roles) and password pair\n- Docker installed and running in your AWS environment (for example, on an EC2 instance or in a container service)\n- An MCP client configured (such as Claude Desktop, Cursor, VS Code, or another MCP-compatible tool)\n- Network connectivity between your deployment environment and your Elasticsearch cluster\n\n\u003e [!NOTE]\n\u003e\n\u003e These instructions apply to Elasticsearch MCP Server 0.4.0 and later.\n\u003e For versions 0.3.1 and earlier, refer to the [README for v0.3.1](https://github.com/elastic/mcp-server-elasticsearch/tree/v0.3.1).\n\n### Deploy the Elasticsearch MCP Server\n\nThe 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).\n\n#### Choose a protocol\n\nThe server supports two protocols:\n\n- [stdio](https://modelcontextprotocol.io/specification/latest/basic/transports#stdio): Direct communication between the MCP client and server. Use this when your client supports stdio and runs in the same environment.\n- [streamable-HTTP](https://modelcontextprotocol.io/specification/latest/basic/transports#streamable-http): HTTP-based protocol recommended for web integrations, stateful sessions, and concurrent clients.\n\n\u003e **Note:** Server-Sent Events (SSE) is deprecated. Use streamable-HTTP instead.\n\n### Configure the stdio protocol\n\nUse the stdio protocol when your MCP client connects directly to the server process.\n\n#### Set environment variables for stdio mode\n\nSet the following environment variables:\n\n- `ES_URL`: The URL of your Elasticsearch cluster (for example, `https://your-cluster.es.amazonaws.com:9200`)\n- For authentication, use one of these options:\n  - API key: Set `ES_API_KEY` to your Elasticsearch API key\n  - Basic authentication: Set `ES_USERNAME` and `ES_PASSWORD` to your Elasticsearch credentials\n- (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.\n\n#### Run the container in stdio mode\n\nStart the MCP server in stdio mode:\n\n```bash\ndocker run -i --rm \\\n  -e ES_URL \\\n  -e ES_API_KEY \\\n  docker.elastic.co/mcp/elasticsearch \\\n  stdio\n```\n\n#### Configure Claude Desktop\n\nAdd this configuration to your Claude Desktop configuration file:\n\n```json\n{\n  \"mcpServers\": {\n    \"elasticsearch-mcp-server\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"-i\", \"--rm\",\n        \"-e\", \"ES_URL\",\n        \"-e\", \"ES_API_KEY\",\n        \"docker.elastic.co/mcp/elasticsearch\",\n        \"stdio\"\n      ],\n      \"env\": {\n        \"ES_URL\": \"\u003celasticsearch-cluster-url\u003e\",\n        \"ES_API_KEY\": \"\u003celasticsearch-API-key\u003e\"\n      }\n    }\n  }\n}\n```\n\nReplace `\u003celasticsearch-cluster-url\u003e` with your Elasticsearch cluster URL and `\u003celasticsearch-API-key\u003e` with your API key.\n\n### Configure the streamable-HTTP protocol\n\nUse the streamable-HTTP protocol for web-based integrations or when you need to support multiple concurrent clients.\n\n#### Set environment variables for HTTP mode\n\nSet the same environment variables as the stdio protocol:\n\n- `ES_URL`: The URL of your Elasticsearch cluster\n- For authentication, use one of these options:\n  - API key: Set `ES_API_KEY` to your Elasticsearch API key\n  - Basic authentication: Set `ES_USERNAME` and `ES_PASSWORD` to your Elasticsearch credentials\n- (Optional) `ES_SSL_SKIP_VERIFY`: Set to `true` to skip SSL/TLS certificate verification\n\n#### Run the container in HTTP mode\n\nStart the MCP server in HTTP mode:\n\n```bash\ndocker run --rm \\\n  -e ES_URL \\\n  -e ES_API_KEY \\\n  -p 8080:8080 \\\n  docker.elastic.co/mcp/elasticsearch \\\n  http\n```\n\nThe streamable-HTTP endpoint is available at `http://\u003chost\u003e:8080/mcp`. A health check endpoint is available at `http://\u003chost\u003e:8080/ping`.\n\n#### Configure Claude Desktop with HTTP proxy\n\nIf you're using Claude Desktop (free edition) which only supports the stdio protocol, use `mcp-proxy` to bridge stdio to streamable-HTTP:\n\n1. Install `mcp-proxy`:\n\n   ```bash\n   uv tool install mcp-proxy\n   ```\n   For alternative installation options, refer to [mcp-proxy/README.md](https://github.com/sparfenyuk/mcp-proxy/blob/main/README.md).\n\n2. Add this configuration to Claude Desktop:\n\n   ```json\n   {\n     \"mcpServers\": {\n       \"elasticsearch-mcp-server\": {\n         \"command\": \"/\u003chome-directory\u003e/.local/bin/mcp-proxy\",\n         \"args\": [\n           \"--transport=streamablehttp\",\n           \"--header\", \"Authorization\", \"ApiKey \u003celasticsearch-API-key\u003e\",\n           \"http://\u003cmcp-server-host\u003e:\u003cmcp-server-port\u003e/mcp\"\n         ]\n       }\n     }\n   }\n   ```\n\n   Replace `\u003chome-directory\u003e`, `\u003celasticsearch-API-key\u003e`, `\u003cmcp-server-host\u003e`, and `\u003cmcp-server-port\u003e` with your values.\n\n### Verify the connection\n\nAfter configuring your MCP client, verify the connection works:\n\n1. Start your MCP client (for example, Claude Desktop or Cursor).\n2. Check that the Elasticsearch MCP Server appears in your available MCP servers.\n3. Test a simple query through your agent interface to confirm it can access your Elasticsearch indices.\n\nIf the connection fails, verify:\n\n- Your Elasticsearch cluster URL is correct and accessible from your AWS environment\n- Your authentication credentials are valid and have the necessary permissions\n- Network connectivity exists between the container and your Elasticsearch cluster (check security groups and network ACLs)\n- Docker is running and the container started successfully (check container logs with `docker logs \u003ccontainer-id\u003e`)\n\n### Monitor health and status\n\nMonitor the health and proper function of the Elasticsearch MCP Server using these methods:\n\n#### Check container status\n\nVerify the container is running:\n\n```bash\ndocker ps | grep elasticsearch-mcp-server\n```\n\nThe container should appear in the list with a status of `Up`.\n\n#### Test the health endpoint (HTTP mode)\n\nIf you're using the streamable-HTTP protocol, test the health check endpoint:\n\n```bash\ncurl http://\u003chost\u003e:8080/ping\n```\n\nA successful response returns `pong`, indicating the server is running and healthy.\n\n#### Check container logs\n\nView container logs to identify any issues:\n\n```bash\ndocker logs \u003ccontainer-id\u003e\n```\n\nLook for error messages related to:\n\n- Elasticsearch connection failures\n- Authentication errors\n- Network connectivity issues\n\n#### Verify Elasticsearch connectivity\n\nTest connectivity to your Elasticsearch cluster from the container:\n\n```bash\ndocker exec \u003ccontainer-id\u003e curl -k -u \u003cusername\u003e:\u003cpassword\u003e \u003cES_URL\u003e\n```\n\nOr with an API key:\n\n```bash\ndocker exec \u003ccontainer-id\u003e curl -k -H \"Authorization: ApiKey \u003capi-key\u003e\" \u003cES_URL\u003e\n```\n\nA successful response indicates the container can reach your Elasticsearch cluster.\n\n### Security and sensitive information\n\nThe Elasticsearch MCP Server handles authentication credentials securely:\n\n#### Credential storage\n\n- **API keys and passwords**: Stored only in environment variables passed to the container. They are not persisted to disk or logged.\n- **Environment variables**: Set when you run the container. Use AWS Secrets Manager or AWS Systems Manager Parameter Store to manage credentials securely in production environments.\n\n#### Data encryption\n\n- **In transit**: The MCP server communicates with Elasticsearch over HTTPS when your `ES_URL` uses the `https://` protocol. Ensure your Elasticsearch cluster has SSL/TLS enabled.\n- **At rest**: The container does not store data locally. All data remains in your Elasticsearch cluster, which uses your cluster's encryption settings.\n\n#### Best practices\n\n- Rotate API keys regularly (every 30-90 days for production environments)\n- Use API keys with minimal required permissions (read-only access to specific indices when possible)\n- Never commit credentials to version control or share them in logs\n- Use AWS Secrets Manager or Parameter Store to inject credentials at runtime instead of hardcoding them\n\n### AWS service quotas\n\nThe Elasticsearch MCP Server runs as a container in your AWS environment. Consider these AWS service quotas:\n\n- **EC2 instance limits**: If running on EC2, ensure your instance type supports your expected workload\n- **Elastic Container Service (ECS)**: If using ECS, review [ECS service quotas](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-quotas.html)\n- **Elastic Kubernetes Service (EKS)**: If using EKS, review [EKS service quotas](https://docs.aws.amazon.com/eks/latest/userguide/service-quotas.html)\n- **Network bandwidth**: Ensure sufficient network bandwidth between your container and Elasticsearch cluster\n\nTo request quota increases, use the [AWS Service Quotas console](https://console.aws.amazon.com/servicequotas/) or refer to the [AWS General Reference Guide](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html).\n\n### Available tools\n\nOnce connected, the MCP server provides these tools to your agent:\n\n- `list_indices`: List all available Elasticsearch indices\n- `get_mappings`: Get field mappings for a specific Elasticsearch index\n- `search`: Perform an Elasticsearch search using query DSL\n- `esql`: Execute an ES|QL query\n- `get_shards`: Get shard information for all or specific indices\n\nYour agent can use these tools to interact with your Elasticsearch data through natural language conversations.\n\n### Next steps\n\n- Learn about AI-powered features available in the Elastic platform\n- Explore Agent Builder for building custom AI agents with Elasticsearch\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastic%2Fmcp-server-elasticsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felastic%2Fmcp-server-elasticsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felastic%2Fmcp-server-elasticsearch/lists"}