OP

opensearch-project/opensearch-mcp-server-py

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

158 stars 112 forks 质量 85 趋势 37Apache-2.0

opensearch-project/opensearch-mcp-server-py 是从 https://github.com/opensearch-project/opensearch-mcp-server-py. 导入的 MCP 服务器候选

概览

opensearch-project/opensearch-mcp-server-py 是从 https://github.com/opensearch-project/opensearch-mcp-server-py. 导入的 MCP 服务器候选

概述(AI 翻译)

  • OpenSearch MCP 服务器
  • 安装opensearch-mcp-server-py
  • 可用的工具
  • 用户指南
  • 代理记忆
  • 贡献
  • 行为准则
  • 许可证
  • 版权

OpenSearch MCP 服务器

opensearch-mcp-server-py 是 OpenSearch 的模型上下文协议(MCP)服务器,使 AI 助手能够与 OpenSearch 集互。它为 AI 模型提供了一个标准化界面,用于执行如搜索索引、检索映射以及通过 stdio 和流式(SSE/可流式 HTTP)协议管理分片等操作。

主要功能:

  • 通过MCP协议与AI助手和大型语言模型无缝集成
  • 支持stdio和流式服务器传输(SSE和可流式HTTP)
  • 内置工具用于常见的OpenSearch操作
  • 动态的每次调用连接参数,用于针对不同集群,无需服务器重新配置
  • 与 Claude Desktop 和 LangChain 的轻松集成
  • 通过基本认证、IAM 角色、基于头部的认证和 OpenSearch mTLS 实现安全认证

有关详细设置,包括Kubernetes部署和mTLS配置,请参见用户指南。

安装 opensearch-mcp-server-py

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

OpenSearch MCP Server

opensearch-mcp-server-py is a Model Context Protocol (MCP) server for OpenSearch that enables AI assistants to interact with OpenSearch clusters. It provides a standardized interface for AI models to perform operations like searching indices, retrieving mappings, and managing shards through both stdio and streaming (SSE/Streamable HTTP) protocols.

Key features:

  • Seamless integration with AI assistants and LLMs through the MCP protocol
  • Support for both stdio and streaming server transports (SSE and Streamable HTTP)
  • Built-in tools for common OpenSearch operations
  • Dynamic per-call connection parameters for targeting different clusters without server reconfiguration
  • Easy integration with Claude Desktop and LangChain
  • Secure authentication using basic auth, IAM roles, header-based auth, and OpenSearch mTLS

For detailed setup, including Kubernetes deployment and mTLS configuration, see the User Guide.

Installing opensearch-mcp-server-py

Opensearch-mcp-server-py can be installed from PyPI via pip:

pip install opensearch-mcp-server-py

Zero-Config Setup

The server can be started with no environment variables at all. Agents provide connection details dynamically on each tool call:

{
  "mcpServers": {
    "opensearch": {
      "command": "uvx",
      "args": ["opensearch-mcp-server-py"]
    }
  }
}

With this setup, agents pass opensearch_url and authentication parameters directly when calling any tool. This is useful when agents discover endpoints from a knowledge base, runbook, or SOP, or when a single agent needs to work with multiple clusters in one session. See Dynamic Connection Parameters for details.

Available Tools

By default, only core tools are enabled to provide essential OpenSearch functionality:

Core Tools (Enabled by Default)

在 GitHub 查看完整 README

安装

uvx opensearch-mcp-server-py
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "opensearch": { "command": "uvx", "args": ["opensearch-mcp-server-py"] } } }