MCP.so
登录

OpenSearch MCP Server

@rithin-pullela-aws

基本信息

分类

数据库

许可证

Apache-2.0 license

传输方式

stdio

作者

rithin-pullela-aws

关于 OpenSearch MCP Server

暂无概览

OpenSearch MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "opensearch-mcp-server": {
      "command": "uvx",
      "args": [
        "test-opensearch-mcp"
      ],
      "env": {
        "OPENSEARCH_URL": "<your_opensearch_domain_url>",
        "OPENSEARCH_USERNAME": "<your_opensearch_domain_username>",
        "OPENSEARCH_PASSWORD": "<your_opensearch_domain_password>",
        "AWS_REGION": "<your_aws_region>",
        "AWS_ACCESS_KEY": "<your_aws_access_key>",
        "AWS_SECRET_ACCESS_KEY": "<your_aws_secret_access_key>",
        "AWS_SESSION_TOKEN": "<your_aws_session_token>"
      }
    }
  }
}

OpenSearch MCP Server 工具

4

Lists all indices in OpenSearch.

Retrieves index mapping and setting information for an index in OpenSearch.

Searches an index using a query written in query domain-specific language (DSL) in OpenSearch.

Gets information about shards in OpenSearch.

概览

What is OpenSearch MCP Server?

A minimal Model Context Protocol (MCP) server for OpenSearch that exposes four tools over stdio and SSE transports. It is aimed at developers who want to interact with an OpenSearch cluster through LLM agents or assistants.

How to use OpenSearch MCP Server?

Install the package from PyPI with pip install test-opensearch-mcp. Set the required environment variables (OPENSEARCH_URL and either OPENSEARCH_USERNAME/OPENSEARCH_PASSWORD for basic auth or AWS_REGION/AWS_ACCESS_KEY/AWS_SECRET_ACCESS_KEY/AWS_SESSION_TOKEN for IAM role auth). Run the server in stdio mode with python -m mcp_server_opensearch or in SSE mode with python -m mcp_server_opensearch --transport sse. Integration examples for Claude Desktop and LangChain are provided.

Key features of OpenSearch MCP Server

  • List all indices in the OpenSearch cluster
  • Retrieve index mapping and settings
  • Search an index using query DSL
  • Get shard information for indices
  • Supports both basic and IAM role authentication
  • Runs over stdio or SSE transport

Use cases of OpenSearch MCP Server

  • Allow an LLM agent to list and explore OpenSearch indices
  • Let an assistant fetch index mapping before constructing queries
  • Enable natural language search against OpenSearch via a LangChain agent
  • Monitor shard health and distribution using an AI-driven workflow

常见问题

1

How do I authenticate with the server?

The server supports two authentication methods: basic authentication (using `OPENSEARCH_USERNAME` and `OPENSEARCH_PASSWORD`) and IAM role authentication (using `AWS_REGION`, `AWS_ACCESS_KEY`, `AWS_SECRET_ACCESS_KEY`, and optionally `AWS_SESSION_TOKEN`). Set the corresponding environment variables before starting the server.

2

What transports are available?

The server can run in two modes: stdio (default) and SSE (use `--transport sse` flag). The SSE mode is used for integrating with frameworks like LangChain.

3

Can I integrate this server with LangChain?

Yes. The README includes a LangChain integration example using `langchain-mcp-adapters`. You run the server in SSE mode, then connect via `MultiServerMCPClient` and use the LLM to call the tools.

4

What data does the server access?

The server only connects to the OpenSearch cluster specified by the `OPENSEARCH_URL` environment variable. It does not store or cache any data; all operations are live queries against that cluster.

5

Are there any known limitations?

The server currently provides four tools. The README notes that more tools are coming soon, but no specific limitations are documented beyond the tool set.

评论

数据库 分类下的更多 MCP 服务器