MCP.so
Sign In
Servers

OpenSearch MCP Server

@rithin-pullela-aws

Overview

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

FAQ from OpenSearch MCP Server

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.

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.

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.

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.

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.

More from Databases