OpenSearch MCP 服务器
概述
此代码库由elastic-mcp-server分支而来,并转换为opensearch-mcp-server MCP 服务器。它是一个模型上下文协议 (MCP) 服务器实现,提供与 OpenSearch 的交互。该服务器支持通过一组工具搜索文档、分析索引和管理集群。
提供与开放搜索交互的模型上下文协议 (MCP) 服务器实现。该服务器通过一组工具支持文档搜索、索引分析和集群管理。
特征
索引操作
list_indices
:列出 Opensearch 集群中的所有索引。get_mapping
:检索特定索引的映射配置。get_settings
:获取特定索引的设置配置。
文档操作
search_documents
:使用 Opensearch Query DSL 在索引中搜索文档。
集群操作
get_cluster_health
:获取集群的健康状态。get_cluster_stats
:获取有关集群的统计信息。
启动 Opensearch 集群
使用 Docker Compose 启动 Opensearch 集群:
这将启动一个 3 节点的 Opensearch 集群和 Kibana。默认 Opensearch 用户名opensearch
,密码test123
。
您可以从http://localhost:5601访问 Kibana。
与 Claude Desktop 一起使用
使用 uv 进行本地开发
使用uv
需要在本地克隆仓库并指定源代码路径。在 Claude Desktop 的配置文件claude_desktop_config.json
中添加以下配置。
您需要将path/to/src/opensearch_mcp_server
更改为您克隆存储库的路径。
- 在 macOS 上:
~/Library/Application Support/Claude/claude_desktop_config.json
- 在 Windows 上:
%APPDATA%/Claude/claude_desktop_config.json
重新启动 Claude Desktop 以加载新的 MCP 服务器。
现在,您可以使用自然语言命令通过 Claude 与 Opensearch 集群进行交互,例如:
- “列出集群中的所有索引”
- “学生鲍勃多大了?”
- “显示集群健康状态”
执照
该项目根据 Apache 许可证版本 2.0 获得许可 - 有关详细信息,请参阅LICENSE文件。
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
模型上下文协议服务器实现,支持与 OpenSearch 集群进行自然语言交互,允许用户通过简单的对话命令搜索文档、分析索引和管理集群。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityFacilitates interaction with Elasticsearch clusters by allowing users to perform index operations, document searches, and cluster management via a Model Context Protocol server and natural language commands.Last updated -6157PythonApache 2.0
- -securityFlicense-qualityA Model Context Protocol server that enables LLMs to interact with Elasticsearch clusters, allowing them to manage indices and execute search queries using natural language.Last updated -1JavaScript
- -securityFlicense-qualityA Model Context Protocol server that enables querying and analyzing Wazuh security logs stored in OpenSearch, with features for searching alerts, getting detailed information, generating statistics, and visualizing trends.Last updated -JavaScript
- -securityAlicense-qualityA server that enables natural language interactions with Couchbase databases through the Model Context Protocol, allowing users to perform SQL++ queries on Couchbase Capella clusters using conversational commands.Last updated -JavaScriptMIT License