opensearch-project
MCP Serveropensearch-projectpublic

opensearch mcp server py

一个为 OpenSearch 提供 Model Context Protocol (MCP) 的最小化服务器,支持多种工具。

Repository Info

37
Stars
27
Forks
37
Watchers
11
Issues
Python
Language
Apache License 2.0
License

About This Server

一个为 OpenSearch 提供 Model Context Protocol (MCP) 的最小化服务器,支持多种工具。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

!OpenSearch logo

  • 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 with full information including docs.count, docs.deleted, store.size, etc. If an index parameter is provided, returns detailed information about that specific index.
  • 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
    • index (optional): The name of the index to get detailed information for. If provided, returns detailed information about this specific index instead of listing all indices.
  • 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:

  • Development Guide - Setup your development environment
  • Contributing Guidelines - Learn how to contribute

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 opensource-codeofconduct@amazon.com with any additional questions or comments.

License

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

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

Quick Start

1

Clone the repository

git clone https://github.com/opensearch-project/opensearch-mcp-server-py
2

Install dependencies

cd opensearch-mcp-server-py
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Owneropensearch-project
Repoopensearch-mcp-server-py
LanguagePython
LicenseApache License 2.0
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation