弹性MCP服务器
用于Elasticsearch、Kibana和Elastic Security的MCP服务器,通过HTTP传输连接到Elastic的代理生成器MCP端点。
设置
使用工具CLI
从安装CLIhttps://github.com/zerocore-ai/tool-cli
# Install from tool.store
tool install library/elastic# View available tools
tool info library/elastic# List indices
tool call library/elastic -m platform_core_list_indices# Search data
tool call library/elastic -m platform_core_search -p query="show me recent errors"# Generate ES|QL query
tool call library/elastic -m platform_core_generate_esql -p query="count logs by severity"先决条件
- 启用代理生成器MCP的Kibana
- 具有适当Kibana应用程序权限的API密钥
配置
| 字段 | 必填 | 描述 |
|---|---|---|
kibana_url | 是 | 基Kibana URL(例如。, https://kibana.example.com 或与空间: https://kibana.example.com/s/my-space) |
api_key | 是 | Kibana API密钥(不带“ApiKey”前缀) |
工具
platform_core_search
使用自然语言在Elasticsearch集群中搜索和分析数据。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query | string | 是 | 表示搜索请求的自然语言查询 |
index | string | 否 | 要搜索的索引(如果未提供,则自动选择) |
platform_core_execute_esql
执行ES|QL查询并以表格格式返回结果。
输入:
| 字段 | 类型 | 必填 | 描述 | |
|---|---|---|---|---|
query | string | Yes | 要执行的ES | QL查询 |
platform_core_generate_esql
从自然语言生成ES|QL查询。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query | string | 是 | 要转换的自然语言查询 |
index | string | 否 | 要查询的索引 |
context | string | 否 | 查询生成的其他上下文 |
platform_core_list_indices
列出集群中的索引、别名和数据流。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
pattern | string | 否 | 要筛选的索引模式(默认值:“\*”) |
platform_core_index_explorer
基于自然语言查询查找相关索引。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query | string | Yes | 用于推断索引的自然语言查询 |
limit | number | 否 | 要返回的最大索引(默认值:1) |
indexPattern | string | 否 | 过滤索引的模式 |
platform_core_get_index_mapping
检索指定索引的映射。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
indices | array | Yes | 索引名称列表 |
platform_core_get_document_by_id
按文档的ID和索引检索文档。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
id | string | 是 | 文档ID |
index | string | 是 | 索引名称 |
platform_core_cases
从弹性安全性、可观察性或堆栈管理中检索案例。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
caseId | string | 否 | 要检索的特定案例ID |
alertIds | array | 否 | 查找相关案例的警报ID |
owner | string | 否 | 按所有者筛选:“案例”、“可观察性”、“securitySolution” |
start | string | 否 | 开始日期时间(ISO格式) |
end | string | 否 | 结束日期时间(ISO格式) |
search | string | 否 | 标题/描述中的文本搜索 |
searchFields | array | 否 | 要搜索的字段:“title”、“description” |
severity | string/array | 否 | 筛选器:“低”、“中”、“高”、“严重” |
status | string/array | 否 | 筛选器:“打开”、“已关闭”、“正在进行” |
tags | array | 否 | 按标记名筛选 |
assignees | array | 否 | 按用户配置文件UID筛选 |
reporters | array | 否 | 按报告者用户名筛选 |
category | string/array | 否 | 按类别筛选 |
includeComments | boolean | 否 | 包括案例注释(默认值:false) |
platform_core_product_documentation
搜索Elastic产品文档。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query | string | 是 | 搜索查询 |
product | string | 否 | 筛选器:“kibana”、“elasticsearch”、”可观察性“、”安全性“ |
max | number | No | 要返回的最大文档数(默认值:3) |
platform_core_integration_knowledge
从Fleet安装的集成中搜索知识。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query | string | 是 | 搜索有关集成的查询 |
max | number | No | 要返回的最大文档数(默认值:5) |
platform_core_get_workflow_execution_status
检查工作流执行的状态。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
executionId | string | 是 | 工作流执行ID |
security_security_labs_search
在安全实验室的内容中搜索恶意软件、攻击技术和MITRE ATT&CK信息。
输入:
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
query | string | 是 | 搜索安全实验室文章 |
许可证
阿帕奇-2.0
参考文献
- https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/mcp-server
