Token导航 LogoToken导航

MCP Server · 运维云端

Elasticsearch AI

将Elasticsearch集群转化为AI驱动的APM分析平台,提供日志、APM追踪和系统指标的自然语言交互分析,实现深度性能监控和故障排查。

stdio官方级别未说明来源级核验工具 25
PythonClaude日志分析Claude Desktop

快速开始

作者 / 组织
byviz
提供方
byviz
运行时
Python

工具数量

25

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

5

仓库热度

收录来源

1 个

MCP World

选型结论

Elasticsearch AI 属于运维云端类 MCP Server,公开资料标注 25 个工具,通过stdio 本地进程接入,适配 Claude Desktop、Claude,有可以直接复制的安装命令;接入前先确认权限范围。

分类

运维云端

传输方式

stdio

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

安装命令

python -m venv venv

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Python,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 25 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

🔍 Elasticsearch MCP服务器AI

一个模型上下文协议(MCP)服务器,将Elasticsearch集群转换为AI驱动的可观察性引擎。\ 支持自然语言交互,用于分析日志、APM跟踪(使用瀑布图和RCA)和系统指标 --以最小的努力提供深入的性能和故障排除见解。

💡 Elasticsearch MCP服务器AI演示示例

  • APM瀑布跟踪性能分析演示,如何使用瀑布可视化来分析应用程序跟踪,以获得深入的性能见解。快速识别真实APM数据中的瓶颈、延迟问题和服务依赖关系。
  • 演示RCA APM(根本原因分析),演示如何自动识别APM跟踪中错误和性能问题的根本原因,为快速排除故障提供可操作的见解。
  • 演示通过APM服务执行性能分析,分析和比较每个APM服务的性能指标,确定整个体系结构的延迟、吞吐量和资源瓶颈。

🎯 核心价值:先进的APM分析

此MCP服务器将您的Elasticsearch集群转换为强大的AI驱动的APM分析平台。 关键差异化因素 是我们的 专用APM分析工具 提供基本Elasticsearch查询无法实现的自动化洞察:

🔬 APM瀑布分析 - analyzeTracePerformance

  • 完整的瀑布分析 APM轨迹的可视化时间线重建
  • 自动关联 系统错误和基础设施指标
  • 性能优化建议 基于检测到的模式
  • 深度瓶颈检测 跨微服务和依赖关系
  • 非常适合:延迟调试、性能优化、依赖性分析

🎯 APM根本原因分析(RCA) - findErrorPatterns

  • 时间误差分析 具有自动聚合和模式检测功能
  • 智能根本原因分析 提出具体可行的建议
  • 异常检测 错误频率、类型和服务影响
  • 自动关联 在错误尖峰和系统事件之间
  • 非常适合:主动故障排除、稳定性分析、事故预防

🔗 业务事件关联 - correlateBusinessEvents

  • 完成用户旅程重建 跨越所有系统接触点
  • 交叉指数相关性 (APM+日志+指标+业务事件)
  • 时间线分析 与业务影响评估相关的事件
  • 端到端交易跟踪 从用户操作到系统响应
  • 非常适合:业务影响分析、关键流程调试、客户体验优化
💡 这些工具实现了基本Elasticsearch查询无法实现的专用逻辑,为SRE和DevOps团队提供深入的见解和自动化分析。它们代表了此MCP服务器的核心价值主张。

🎯 这是什么MCP服务器?

此MCP服务器将您的Elasticsearch集群转换为AI助手的强大工具,实现:

  • 🔍 智能搜索 在日志、指标和文档中
  • 📊 APM分析 检测错误和性能问题
  • 🖥️ 系统监控 CPU、内存和磁盘指标
  • 🔧 自动诊断 应用问题

🛠️ 可用工具(25个工具)

🔧 优化的APM工具 ⭐ 核心价值

工具说明主要参数
analyzeTracePerformance使用瀑布图和相关性进行完整的性能分析trace_id (必填), include_errors, include_metrics
findErrorPatterns基于时间分析和RCA的错误模式检测time_range, service_name, error_type, min_frequency
correlateBusinessEvents业务事件关联以重建用户旅程correlation_id (必填), time_window, include_user_journey

🔍 搜索和查询

工具说明主要参数
searchAllIndices使用查询字符串在所有索引中搜索文档q (查询), size (极限), from (偏移), sort (订购)
searchDocuments在特定索引中搜索文档index (指数), q (查询), size, from, sort
countDocuments使用可选筛选器全局统计文档q (查询), index (具体指标)
countDocumentsInIndex统计特定索引中的文档index (必填), q (可选查询)
getDocument通过ID获取特定文档index (必填), id (必填), _source (字段)

📊 集群信息

工具说明主要参数
getClusterInfo基本群集信息(名称、版本、UUID)无
getClusterHealth具有详细指标的群集运行状况level (集群/索引/分片), wait_for_status, timeout
getClusterStats用于监视的完整群集统计信息无
getNodeStats所有节点的统计数据(CPU、内存、磁盘)metric (索引/os/进程/jvm/等)
getHotThreads用于故障排除的活动线程和JVM统计信息metric (JVM度量类型)

🗂️ 索引管理

工具说明主要参数
getCatIndices包含状态信息的紧凑索引列表format (json/yaml/text), v (冗长), h (列), s (排序)
getIndex特定指标的详细信息index (必填)
getMapping索引的字段映射和数据类型index (必填)
getSettings索引的配置和设置index (必填)

🚨 APM和监控

工具说明主要参数
searchAPMData在APM数据中搜索跟踪、交易和跨度q (查询), size, from, sort, _source, timeout
countAPMDocuments统计APM索引中的文档(错误、跟踪、指标)q (筛选查询)
searchAPMErrorsAPM中的搜索错误和异常q (时间查询), size, from, sort, _source, timeout
searchAPMPerformance分析性能指标和慢速事务q (查询), size, from, sort, _source, timeout
searchSystemMetricsMetricbeat的系统指标(CPU、内存、磁盘)q (时间查询), size, from, sort, _source, timeout
searchLogData从Filebeat和其他来源搜索应用程序日志q (查询), size, from, sort, _source, timeout
searchFilebeatLogs专门从Filebeat索引中搜索日志q (高级查询), size, from, sort, _source, timeout
searchWatcherAlertsElasticsearch监视器警报历史记录q (时间查询), size, from, sort, _source, timeout

📝 公共参数

🔍 搜索参数

  • q (query):Elasticsearch查询字符串(例如。, "error AND @timestamp:>now-1h")
  • size:结果数(默认值:10,建议最大值:100)
  • from:分页偏移量(默认值:0)
  • sort:排序(例如。, "@timestamp:desc", "_score:desc")
  • _source:要包括的具体字段(例如。, "@timestamp,message,service.name")
  • timeout:搜索超时(默认值:“30s”)

📊 时间参数

  • time_range:时间范围(例如。, "now-1h", "now-24h", "now-7d")
  • time_window:时间窗口(例如。, "30m", "1h", "5m")
  • @timestamp:查询中的时间过滤器(例如。, "@timestamp:>now-2h")

🏷️ 过滤参数

  • index:特定指数或模式(例如。, "logs-2024", "logs-apm.error-*")
  • service_name:APM服务名称(例如。, "api-users", "servicio-local")
  • error_type:错误类型(例如。, "ConnectionError", "TimeoutError")
  • level:细节级别(例如。, "cluster", "indices", "shards")

🔧 格式参数

  • format:输出格式(例如。, "json", "yaml", "text")
  • v:带标头的详细输出(true/false)
  • h:要显示的特定列(例如。, "index,health,status")
  • s:要排序的列(例如。, "index:desc")

🚀 安装

📦 源代码 (推荐)

选项1:简单安装(建议用户使用)
# Clone repository
git clone https://github.com/byviz/mcp-server-elasticsearch-ai.git
cd elasticsearch-mcp

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install ALL dependencies (production + development)
pip install -r requirements-all.txt

# Install package in development mode
pip install -e .
选项2:最小安装(仅运行)
# If you only want to run the server (no development)
pip install -r requirements.txt
pip install -e .
选项3:使用pyproject.toml(高级)
# Clone repository
git clone https://github.com/byviz/elasticsearch-mcp-ai.git
cd elasticsearch-mcp

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install directly from pyproject.toml
pip install -e .

📋 依赖关系文件摘要

文件描述何时使用
requirements-all.txt所有依赖关系 (生产+开发)✅ 推荐 对于大多数用户
requirements.txt只需运行最小的依赖项仅当您想要非常轻量级的安装时
requirements-dev.txt只有开发依赖关系适用于已经具备基础知识的贡献者
pyproject.toml现代Python配置适用于使用现代工具的高级用户

📋 验证安装

# Verify package was installed correctly
python -c "import elasticsearch_mcp; print('✅ Installation successful')"

# Check version
python -m elasticsearch_mcp --version

⚙️ 配置

📋 所需的环境变量

弹性搜索
# Cluster connection
ELASTICSEARCH_URL="https://your-cluster.es.io:9243"

# Authentication (choose one option)
ELASTICSEARCH_USERNAME="your-username"
ELASTICSEARCH_PASSWORD="your-password"
# Or alternatively:
# ELASTICSEARCH_API_KEY="your-api-key"

🔧 可选变量

高级Elasticsearch
ELASTICSEARCH_TIMEOUT=30                     # Timeout in seconds
ELASTICSEARCH_VERIFY_CERTS=true              # Verify SSL certificates
ELASTICSEARCH_CA_CERTS="/path/to/ca.crt"     # CA certificates
ELASTICSEARCH_CLIENT_CERT="/path/to/client.crt"  # Client certificate
ELASTICSEARCH_CLIENT_KEY="/path/to/client.key"   # Private key
MCP服务器
MCP_TRANSPORT=stdio                          # Transport (stdio/http/sse)
MCP_PORT=8000                               # Port for HTTP/SSE
MCP_LOG_LEVEL=INFO                          # Logging level
MCP_ENABLE_SECURITY_FILTERING=true          # Security filtering

🚀 用法

📝 快速配置

  1. 创建配置文件:
cp config.env.example .env
  1. 编辑变量:
# Elasticsearch
ELASTICSEARCH_URL=https://your-cluster.es.io:9243
ELASTICSEARCH_USERNAME=your-username
ELASTICSEARCH_PASSWORD=your-password
  1. 运行服务器:
source .env
python -m elasticsearch_mcp

🎯 与Claude Desktop集成

添加到您的Claude Desktop配置文件中:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
窗户: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
  "mcpServers": {
    "elasticsearch": {
      "command": "python",
      "args": ["-m", "elasticsearch_mcp"],
      "env": {
        "ELASTICSEARCH_URL": "https://your-cluster.es.io:9243",
        "ELASTICSEARCH_USERNAME": "your-username",
        "ELASTICSEARCH_PASSWORD": "your-password"
      }
    }
  }
}

🔒 安全

默认情况下,服务器在启用安全筛选的情况下运行(MCP_ENABLE_SECURITY_FILTERING=true),这将操作限制为只读。

✅ 允许的操作

  • 搜索和查询(GET、POST搜索)
  • 读取映射、配置和统计信息
  • APM分析和指标
  • 集群和节点信息
  • 可视化

❌ 受阻操作

  • 创建、修改或删除索引
  • 索引、更新或删除文档
  • 修改群集配置
  • 任何破坏性操作

📊 使用示例

🔍 基本搜索

"Search for documents containing 'error' in the last 30 minutes"
→ Use searchAllIndices with q="error AND @timestamp:>now-30m"

"Count how many documents are in the 'logs-2024' index"
→ Use countDocumentsInIndex with index="logs-2024"

📊 集群监控

"Is the cluster working well?"
→ Use getClusterHealth to check status (green/yellow/red)

"How many nodes does the cluster have and how much memory do they use?"
→ Use getNodeStats with metric="os,jvm" for detailed metrics

"Show basic cluster information"
→ Use getClusterInfo for name, version, and UUID

🗂️ 索引管理

"List all indices with their health status"
→ Use getCatIndices with format="json" and v=true

"What fields does the 'products' index have?"
→ Use getMapping with index="products" to see structure

"What is the configuration of the 'logs-app' index?"
→ Use getSettings with index="logs-app"

🚨 APM和故障排除

"Search for errors in the 'api-users' service from the last 2 hours"
→ Use searchAPMErrors with q="service.name:api-users AND @timestamp:>now-2h"

"What are the slowest transactions?"
→ Use searchAPMPerformance with sort="transaction.duration.us:desc"

"Analyze trace ID '430dbab7a0e0322274f076569cdc0c3d'"
→ Use analyzeTracePerformance with trace_id="430dbab7a0e0322274f076569cdc0c3d"

"Find ConnectionError patterns"
→ Use findErrorPatterns with error_type="ConnectionError"

🖥️ 系统度量

"Show CPU usage from the last 5 minutes"
→ Use searchSystemMetrics with q="metricset.name:cpu AND @timestamp:>now-5m"

"Search for ERROR level logs"
→ Use searchLogData with q="log.level:ERROR"

"Check Watcher alerts from the last 24 hours"
→ Use searchWatcherAlerts with q="@timestamp:>now-24h"

🔧 高级分析


"Find error patterns in servicio-local"
→ Use findErrorPatterns with service_name="servicio-local" and time_range="now-1h"

🛡️ 故障排除

❌ 连接错误

ERROR - Connection failed

解决方案:验证 ELASTICSEARCH_URL 以及证书

❌ 认证错误

ERROR - Authentication failed

解决方案:验证 ELASTICSEARCH_USERNAME/PASSWORD 或 ELASTICSEARCH_API_KEY

❌ 证书错误

ERROR - SSL verification failed

解决方案:配置 ELASTICSEARCH_VERIFY_CERTS=false 或提供证书

📄 许可证

Apache 2.0-有关详细信息,请参阅LICENSE文件

🤝 贡献

欢迎投稿!拜托:

  1. 分叉项目
  2. 创建要素分支
  3. 提交您的更改
  4. 推到分支
  5. 打开拉取请求

📞 支持

需要帮助、有疑问或想建议新功能?\ 加入我们不断壮大的社区!打开一个问题或联系我们——我们在这里帮助您充分利用人工智能驱动的Elasticsearch。

伊万·弗里亚斯·莫利纳\ 弹性和Byviz

- 📧 ivan.frias@elastic.co\ - 📧 ivan.frias@byviz.com

工具与能力

工具数量

25

资源数量

0

提示词数量

0

能力标签

APM分析Python本地部署性能监控故障排查日志分析AI驱动

支持客户端

Claude DesktopClaude

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

看服务状态

查询容器、日志和监控指标,定位异常。

执行部署变更

在权限范围内触发发布、回滚和环境切换。

核对资源用量

汇总用量,找出闲置和超额的部分。

选择建议

值得选的地方

  • 工具数量 25 个,一次接入能覆盖的操作比单点工具更全。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude Desktop、Claude,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 Python,换机器要重新装一遍。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Elasticsearch AI

MCP World · 本页

25stdio有1 个2026-05-17
Ui Tars Desktop 8a825770

MCP World

0stdio有1 个2026-05-17
Elie222 MCP

MCP World

0未说明未标注1 个2026-05-17
Arizeai Phoenix MCP

MCP World

0stdio有3 个2026-05-17
Unity MCP 87ee506e

MCP World

42HTTP有2 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Elasticsearch AI 怎么安装?

公开资料给出的安装命令是 python -m venv venv,运行环境为 Python。装完后按客户端要求写进 MCP 配置,重启客户端生效。

Elasticsearch AI 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Python;保存后完全退出客户端再打开,配置才会生效。

Elasticsearch AI 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Elasticsearch AI 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Elasticsearch AI 支持哪些客户端?

公开资料标注支持 Claude Desktop、Claude;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP