MCP ExplorerExplorer

Opensearch Mcp Server Py

@opensearch-projecton 10 months ago
8 Apache-2.0
FreeCommunity
AI Systems
opensearch-mcp-server-py is a Model Context Protocol (MCP) server.

Overview

What is Opensearch Mcp Server Py

opensearch-mcp-server-py is a Model Context Protocol (MCP) server for OpenSearch that facilitates interaction between AI assistants and OpenSearch clusters. It provides a standardized interface for AI models to perform operations such as searching indices, retrieving mappings, and managing shards via stdio and Server-Sent Events (SSE) protocols.

Use cases

Use cases for opensearch-mcp-server-py include enabling AI assistants to perform data searches, retrieving index mappings for analysis, managing shards for optimal performance, and integrating with other AI frameworks for enhanced functionalities.

How to use

To use opensearch-mcp-server-py, install it via pip from PyPI with the command ‘pip install opensearch-mcp-server-py’. After installation, you can utilize built-in tools for common OpenSearch operations and integrate it with AI assistants like Claude Desktop and LangChain.

Key features

Key features include seamless integration with AI assistants and LLMs through the MCP protocol, support for stdio and SSE server transports, built-in tools for common OpenSearch operations, easy integration with Claude Desktop and LangChain, and secure authentication using basic auth or IAM roles.

Where to use

opensearch-mcp-server-py is suitable for use in environments where AI assistants need to interact with OpenSearch clusters, such as data analytics, search applications, and AI-driven decision-making systems.

Content

OpenSearch logo

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 Server-Sent Events (SSE) protocols.

Key features:

  • Seamless integration with AI assistants and LLMs through the MCP protocol
  • Support for both stdio and SSE server transports
  • 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 to
    • index (required): The name of the index to retrieve mappings for
  • SearchIndexTool

    • opensearch_url (optional): The OpenSearch cluster URL to connect to
    • index (required): The name of the index to search in
    • query (required): The search query in OpenSearch Query DSL format
  • GetShardsTool

    • opensearch_url (optional): The OpenSearch cluster URL to connect to
    • index (required): The name of the index to get shard information for
  • ClusterHealthTool

    • opensearch_url (optional): The OpenSearch cluster URL to connect to
    • index (optional): Limit health reporting to a specific index
  • CountTool

    • opensearch_url (optional): The OpenSearch cluster URL to connect to
    • index (optional): The name of the index to count documents in
    • body (optional): Query in JSON format to filter documents
  • ExplainTool

    • opensearch_url (optional): The OpenSearch cluster URL to connect to
    • index (required): The name of the index to retrieve the document from
    • id (required): The document ID to explain
    • body (required): Query in JSON format to explain against the document
  • MsearchTool

    • opensearch_url (optional): The OpenSearch cluster URL to connect to
    • index (optional): Default index to search in
    • body (required): Multi-search request body in NDJSON format

More tools coming soon. Click here

User Guide

For detailed usage instructions, configuration options, and examples, please see the User Guide.

Contributing

Interested in contributing? Check out our:

Code of Conduct

This project has adopted the Amazon Open Source Code of Conduct. For more information see the Code of Conduct FAQ, or contact [email protected] with any additional questions or comments.

License

This project is licensed under the Apache v2.0 License.

Copyright

Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers