opensearch-mcp-server-py
If you are the rightful owner of opensearch-mcp-server-py and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The OpenSearch MCP Server is a Model Context Protocol server designed to facilitate interaction between AI assistants and OpenSearch clusters.
- OpenSearch MCP Server
- Installing opensearch-mcp-server-py
- Available tools
- User Guide
- Contributing
- Code of Conduct
- License
- Copyright
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
- Easy integration with Claude Desktop and LangChain
- Secure authentication using basic auth or IAM roles
Installing opensearch-mcp-server-py
Opensearch-mcp-server-py can be installed from PyPI via pip:
pip install opensearch-mcp-server-py
Available Tools
- ListIndexTool: Lists all indices in OpenSearch.
- IndexMappingTool: Retrieves index mapping and setting information for an index in OpenSearch.
- SearchIndexTool: Searches an index using a query written in query domain-specific language (DSL) in OpenSearch.
- GetShardsTool: Gets information about shards in OpenSearch.
- ClusterHealthTool: Returns basic information about the health of the cluster.
- CountTool: Returns number of documents matching a query.
- ExplainTool: Returns information about why a specific document matches (or doesn't match) a query.
- MsearchTool: Allows to execute several search operations in one request.
Tool Parameters
-
ListIndexTool
opensearch_url
(optional): The OpenSearch cluster URL to connect to
-
IndexMappingTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(required): The name of the index to retrieve mappings for
-
SearchIndexTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(required): The name of the index to search inquery
(required): The search query in OpenSearch Query DSL format
-
GetShardsTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(required): The name of the index to get shard information for
-
ClusterHealthTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(optional): Limit health reporting to a specific index
-
CountTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(optional): The name of the index to count documents inbody
(optional): Query in JSON format to filter documents
-
ExplainTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(required): The name of the index to retrieve the document fromid
(required): The document ID to explainbody
(required): Query in JSON format to explain against the document
-
MsearchTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(optional): Default index to search inbody
(required): Multi-search request body in NDJSON format
More tools coming soon.
User Guide
For detailed usage instructions, configuration options, and examples, please see the .
Contributing
Interested in contributing? Check out our:
- - Setup your development environment
- - Learn how to contribute
Code of Conduct
This project has adopted the . For more information see the Code of Conduct FAQ, or contact with any additional questions or comments.
License
This project is licensed under the .
Copyright
Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.