OpenSearch MCP Server
@rithin-pullela-aws
About OpenSearch MCP Server
No overview available yet
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"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>"
}
}
}
}Tools
4Lists 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.
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 Databases MCP servers
Dbhub
bytebaseZero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
mcp-server-duckdb
ktanaka101A Model Context Protocol (MCP) server implementation for DuckDB, providing database interaction capabilities
Snowflake MCP Server
isaacwasserman
Redis
modelcontextprotocolModel Context Protocol Servers
Meilisearch MCP Server
meilisearchA Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces.
Comments