OpenSearch仪表板MCP服务器
一 主控程序 OpenSearch Dashboards服务器,使AI助手能够创建、管理和检查仪表板、可视化、保存的对象和插件功能。
这是一个伴侣 opensearch mcp服务器py,它涵盖了OpenSearch集群/数据平面。该项目涵盖 仪表板UI/管理平面.
特性
- 保存的对象CRUD(仪表板、可视化、索引模式、保存的搜索)
- 仪表板和可视化管理
- 自动检测已安装的插件(警报、异常检测等)
- 基于类别的工具过滤
- 支持stdio和流媒体(SSE)传输
- 基本身份验证、API令牌和cookie/会话身份验证
安装
pip install opensearch-dashboards-mcp-server快速开始
# Using environment variables
export OSD_URL=https://localhost:5601
export OSD_USERNAME=admin
export OSD_PASSWORD=admin
opensearch-dashboards-mcp-server
# Using config file
opensearch-dashboards-mcp-server --config example_config.ymlClaude桌面集成
添加到您的Claude桌面配置(claude_desktop_config.json):
{
"mcpServers": {
"opensearch-dashboards": {
"command": "opensearch-dashboards-mcp-server",
"env": {
"OSD_URL": "https://localhost:5601",
"OSD_USERNAME": "admin",
"OSD_PASSWORD": "admin"
}
}
}
}工具类别
| 类别 | 工具 | 默认 |
|---|---|---|
core_tools | 保存的对象、仪表板、可视化、索引模式、短网址 | 已启用 |
alerting | 监视器、警报 | 自动检测 |
anomaly_detection | 检测器,结果 | 自动检测 |
observability | 笔记本 | 自动检测 |
index_management | ISM策略 | 自动检测 |
security | 租户、角色、角色映射 | 自动检测 |
workspaces | 工作区CRUD | 自动检测到 |
sample_data | 示例数据集安装/卸载 | 自动检测 |
data_importer | 文件/文本导入、预览 | 自动检测 |
通过环境变量启用/禁用类别:
export OSD_ENABLED_CATEGORIES=core_tools,alerting,anomaly_detection
export OSD_DISABLED_CATEGORIES=security本地开发
# OpenSearch 2.19.0 (default)
docker compose up -d
# OpenSearch 3.5.0
OPENSEARCH_VERSION=3.5.0 docker compose up -d
# Verify
curl http://localhost:9200 # OpenSearch
curl http://localhost:5601 # Dashboards支持的版本
- OpenSearch/Dashboards 2.x(用2.19.0测试)
- OpenSearch/Dashboards 3.x(用3.5.0测试)
许可证
阿帕奇-2.0
