
OpenSearch MCP
STDIOOfficialModel Context Protocol server enabling AI assistants to interact with OpenSearch clusters.
Model Context Protocol server enabling AI assistants to interact with OpenSearch clusters.
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:
Opensearch-mcp-server-py can be installed from PyPI via pip:
pip install opensearch-mcp-server-py
ListIndexTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(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 toindex
(required): The name of the index to retrieve mappings forSearchIndexTool
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 formatGetShardsTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(required): The name of the index to get shard information forClusterHealthTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(optional): Limit health reporting to a specific indexCountTool
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 documentsExplainTool
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 documentMsearchTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(optional): Default index to search inbody
(required): Multi-search request body in NDJSON formatGetClusterStateTool
opensearch_url
(optional): The OpenSearch cluster URL to connect tometric
(optional): Limit the information returned to the specified metrics. Options include: _all, blocks, metadata, nodes, routing_table, routing_nodes, master_node, versionindex
(optional): Limit the information returned to the specified indicesGetSegmentsTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(optional): Limit the information returned to the specified indices. If not provided, returns segments for all indicesCatNodesTool
opensearch_url
(optional): The OpenSearch cluster URL to connect tometrics
(optional): A comma-separated list of metrics to display. Available metrics include: id, name, ip, port, role, master, heap.percent, ram.percent, cpu, load_1m, load_5m, load_15m, disk.total, disk.used, disk.avail, disk.used_percentGetNodesTool
opensearch_url
(optional): The OpenSearch cluster URL to connect tonode_id
(optional): A comma-separated list of node IDs or names to limit the returned information. Supports node filters like _local, _master, master:true, data:false, etc. Defaults to _all.metric
(optional): A comma-separated list of metric groups to include in the response. Options include: settings, os, process, jvm, thread_pool, transport, http, plugins, ingest, aggregations, indices. Defaults to all metrics.GetIndexInfoTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(required): The name of the index to get detailed information for. Wildcards are supported.GetIndexStatsTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toindex
(required): The name of the index to get statistics for. Wildcards are supported.metric
(optional): Limit the information returned to the specified metrics. Options include: _all, completion, docs, fielddata, flush, get, indexing, merge, query_cache, refresh, request_cache, search, segments, store, warmer, bulkGetQueryInsightsTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toGetNodesHotThreadsTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toGetAllocationTool
opensearch_url
(optional): The OpenSearch cluster URL to connect toGetLongRunningTasksTool
opensearch_url
(optional): The OpenSearch cluster URL to connect tolimit
(optional): The maximum number of tasks to return. Default is 10.More tools coming soon. Click here
For detailed usage instructions, configuration options, and examples, please see the User Guide.
Interested in contributing? Check out our:
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.
This project is licensed under the Apache v2.0 License.
Copyright 2020-2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.