Elasticsearch MCP server

Elasticsearch MCP server

es-mcp-server-macgaf•bymacgaf

A Model Context Protocol server that exposes Elasticsearch tools for querying indices, fetching mappings, searching documents, and reading cluster health and stats.

License: MIT License•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Lists all indices in the Elasticsearch cluster.
  • •Returns field mapping information for a specified index.
  • •Executes search queries against a specified index with highlighting support.
  • •Retrieves Elasticsearch cluster health information and runtime statistics.

BEST FOR

  • •Querying Elasticsearch data from MCP-capable clients such as Claude Desktop.
  • •Inspecting index structures and mappings through mapping lookups.
  • •Monitoring cluster health and runtime statistics.

ABOUT ES-MCP-SERVER-MACGAF

Elasticsearch MCP server is cataloged as an MCP server attributed to macgaf. A Model Context Protocol server that exposes Elasticsearch tools for querying indices, fetching mappings, searching documents, and reading cluster health and stats. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Elasticsearch MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Which Elasticsearch versions are supported?

The project supports both Elasticsearch 7 and 8 APIs.

Which transport modes can the server run in?

It defaults to stdio, suited for clients like Claude Desktop, and also supports an SSE mode as a standalone service.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 031a30abb7cc · 采集于 2026-11-13 13:27:57 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Elasticsearch MCP 服务器

基于 Model Context Protocol (MCP) 的 Elasticsearch 工具服务器,提供索引查询、映射获取、搜索等功能。

其他语言版本: 🇺🇸 English | 🇫🇷 Français | 🇩🇪 Deutsch | 🇯🇵 日本語

项目目录结构

.
├── es_mcp_server/         # 服务器代码
│   ├── __init__.py        # 包初始化
│   ├── server.py          # 服务器主程序
│   ├── config.py          # 配置管理
│   ├── client.py          # ES客户端工厂
│   └── tools.py           # ES MCP工具实现
├── es_mcp_client/         # 客户端代码
│   ├── __init__.py        # 包初始化
│   └── client.py          # 客户端测试程序
├── test/                  # 单元测试
│   ├── __init__.py        # 测试包初始化
│   └── test_server.py     # 服务器单元测试
├── claude_config_examples/ # Claude配置示例
│   ├── elasticsearch_stdio_config.json # stdio模式配置
│   └── elasticsearch_sse_config.json   # sse模式配置
├── .vscode/               # VSCode配置
│   └── launch.json        # 调试配置
├── docs/                  # 文档
│   └── requires.md        # 需求文档
├── pyproject.toml         # 项目配置文件
├── README.md              # 中文说明文档
├── README.en.md           # 英文说明文档
├── README.fr.md           # 法语说明文档
├── README.de.md           # 德语说明文档
├── README.jp.md           # 日语说明文档
├── .gitignore             # Git忽略文件
└── LICENSE                # MIT许可证

服务器功能和使用说明

Elasticsearch MCP 服务器提供以下工具:

  1. list_indices - 显示 ES 集群的所有索引
  2. get_mappings - 返回指定索引的字段映射信息
  3. search - 在指定索引中执行搜索查询,支持高亮显示
  4. get_cluster_health - 获取 ES 集群的健康状态信息
  5. get_cluster_stats - 获取 ES 集群的运行状态统计信息

安装

# 从PyPI安装
pip install es-mcp-server

# 或从源码安装
pip install .

# 安装开发依赖
pip install ".[dev]"

配置

服务器通过环境变量或命令行参数进行配置:

环境变量说明默认值
ES_HOSTES 主机地址localhost
ES_PORTES 端口9200
ES_USERNAMEES 用户名无
ES_PASSWORDES 密码无
ES_API_KEYES API 密钥无
ES_USE_SSL是否使用 SSLfalse
ES_VERIFY_CERTS是否验证证书true
ES_VERSIONES 版本 (7 或 8)8

启动服务器

stdio 模式 (与 Claude Desktop 等客户端集成)

# 使用默认配置
uvx es-mcp-server

# 自定义 ES 连接
uvx es-mcp-server --host 192.168.0.13 --port 9200 --es-version 8

SSE 模式 (Web 服务器模式)

# 启动 SSE 服务器
uvx es-mcp-server --transport sse --host 192.168.0.13 --port 9200

客户端使用说明

项目包含一个用于验证服务器功能的客户端程序。

启动客户端

# 连接到默认 SSE 服务器 (http://localhost:8000/sse)
uvx es-mcp-client

# 自定义 SSE 服务器地址
uvx es-mcp-client --url http://example.com:8000/sse

对接其他工具

与 Claude Desktop 集成

Claude Desktop 可以通过 MCP 协议使用本服务,以便访问 Elasticsearch 数据。

stdio 模式配置

在 Claude Desktop 中添加以下配置:

{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "command": "uvx",
      "args": ["es-mcp-server"],
      "env": {
        "ES_HOST": "your-es-host",
        "ES_PORT": "9200",
        "ES_VERSION": "8"
      }
    }
  }
}

SSE 模式配置

如果您已经启动了 SSE 模式的服务器,可以使用以下配置:

{
  "mcpServers": {
    "elasticsearch-mcp-server": {
      "url": "http://localhost:8000/sse"
    }
  }
}

单元测试

运行单元测试以验证功能:

pytest

开发调试

本项目包含 VSCode 调试配置,打开 VSCode 后可直接使用调试功能启动服务器或客户端。

注意事项

  • 本项目同时支持 Elasticsearch 7 和 8 版本的 API
  • 服务器默认使用 stdio 传输模式,适合与 Claude Desktop 等客户端集成
  • SSE 模式适合作为独立服务启动

许可证

MIT License


本项目的大部分代码、文档、配置示例都是用cursor的claude-3.7-sonnet根据需求文档 生成出来的(提示词:基于本文件生成项目所有程序)。

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Elasticsearch MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/es-mcp-server-macgaf)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage