Elasticsearch MCP 服务器
About
elasticsearch mcp server and client, supports es7 and es8, based on Model Context Protocol python sdk
Details
- Author
- macgaf
- Downloads
- 109
- Categories
- Database
Jump to
- List all indices in an Elasticsearch cluster
- Retrieve detailed field mappings for an index
- Execute search queries with highlight support
- Fetch cluster health status
- Obtain cluster runtime statistics
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Elasticsearch MCP 服务器Command (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install via pip (pip install es-mcp-server). Configure connection using environment variables (e.g., ES_HOST, ES_PORT, ES_API_KEY). Start the server in stdio mode (default) or SSE mode using uvx es-mcp-server with optional flags like --host, --port, --es-version, and --transport sse. Integrate with Claude Desktop by adding a stanza in its MCP configuration file.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"elasticsearch mcp \u670d\u52a1\u5668": {
"es-mcp-server-macgaf": {
"command": "uvx",
"args": [
"es-mcp-server"
]
}
}
}
}
McpServers
{
"es-mcp-server-macgaf": {
"command": "uvx",
"args": [
"es-mcp-server"
]
}
}
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 集群的运行状态统计信息
安装
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



