opensearch-mcp-server-py

v0.12.0
opensearch-mcp-server-py Checked 5 hours ago Published 2 months ago

OpenSearch MCP Server

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ListIndexTool

Lists indices in the OpenSearch cluster. If an index name or pattern is specified, return only information about the provided index or index pattern. The include_detail flag controls output: if False, returns only index name(s); if True (default), returns full metadata.

ParameterTypeDescription
opensearch_url *OpenSearch endpoint URL.
aws_iam_arnIAM role ARN for role-based authentication.
aws_opensearch_serverlessIf true, use OpenSearch Serverless service.
aws_profileAWS profile name for authentication.
aws_regionAWS region for IAM/Serverless authentication.
include_detailbooleanWhether to include detailed information. If False, returns only index name(s). If True, returns full metadata.
indexstringThe name of the index or index pattern to get information for.
opensearch_no_authIf true, connect without authentication.
opensearch_passwordPassword for basic authentication.
opensearch_ssl_verifySet true to require SSL certificate verification. A false value is ignored, since only the operator may disable verification.
opensearch_timeoutConnection timeout in seconds.
opensearch_usernameUsername for basic authentication.

IndexMappingTool

Retrieves index mapping and setting information for an index in OpenSearch

ParameterTypeDescription
index *stringThe name of the index to get mapping information for
opensearch_url *OpenSearch endpoint URL.
aws_iam_arnIAM role ARN for role-based authentication.
aws_opensearch_serverlessIf true, use OpenSearch Serverless service.
aws_profileAWS profile name for authentication.
aws_regionAWS region for IAM/Serverless authentication.
opensearch_no_authIf true, connect without authentication.
opensearch_passwordPassword for basic authentication.
opensearch_ssl_verifySet true to require SSL certificate verification. A false value is ignored, since only the operator may disable verification.
opensearch_timeoutConnection timeout in seconds.
opensearch_usernameUsername for basic authentication.

SearchIndexTool

Searches an index using a query written in query domain-specific language (DSL) in OpenSearch. PREREQUISITE: You need to know the mappings of the index before constructing queries.

ParameterTypeDescription
index *stringThe name of the index to search in
opensearch_url *OpenSearch endpoint URL.
query_dsl *The search query in OpenSearch query DSL format. For keyword-type fields (mapping shows "type": "keyword"), use field name DIRECTLY - do NOT add .keyword suffix. For text-type fields with .keyword sub…
aws_iam_arnIAM role ARN for role-based authentication.
aws_opensearch_serverlessIf true, use OpenSearch Serverless service.
aws_profileAWS profile name for authentication.
aws_regionAWS region for IAM/Serverless authentication.
formatstringOutput format: "json" or "csv"
opensearch_no_authIf true, connect without authentication.
opensearch_passwordPassword for basic authentication.
opensearch_ssl_verifySet true to require SSL certificate verification. A false value is ignored, since only the operator may disable verification.
opensearch_timeoutConnection timeout in seconds.
opensearch_usernameUsername for basic authentication.
sizeintegerNumber of search results to return. The maximum allowed value is 100, unless overridden by configuration.

GetShardsTool

Gets information about shards in OpenSearch

ParameterTypeDescription
index *stringThe name of the index to get shard information for
opensearch_url *OpenSearch endpoint URL.
aws_iam_arnIAM role ARN for role-based authentication.
aws_opensearch_serverlessIf true, use OpenSearch Serverless service.
aws_profileAWS profile name for authentication.
aws_regionAWS region for IAM/Serverless authentication.
opensearch_no_authIf true, connect without authentication.
opensearch_passwordPassword for basic authentication.
opensearch_ssl_verifySet true to require SSL certificate verification. A false value is ignored, since only the operator may disable verification.
opensearch_timeoutConnection timeout in seconds.
opensearch_usernameUsername for basic authentication.

GenericOpenSearchApiTool

A flexible tool for calling any OpenSearch API endpoint. Supports all HTTP methods with custom paths, query parameters, request bodies, and headers. Use this when you need to access OpenSearch APIs that don't have dedicated tools, or when you need more control over the request. Leverages your knowledge of OpenSearch API documentation to construct appropriate requests.

ParameterTypeDescription
opensearch_url *OpenSearch endpoint URL.
path *stringThe API endpoint path (e.g., "/_search", "/_cat/indices", "/my_index/_doc/1"). Should start with "/".
aws_iam_arnIAM role ARN for role-based authentication.
aws_opensearch_serverlessIf true, use OpenSearch Serverless service.
aws_profileAWS profile name for authentication.
aws_regionAWS region for IAM/Serverless authentication.
bodyRequest body for GET/POST/PUT requests. Can be a JSON object, string, or None
headersAdditional HTTP headers to include in the request
methodstringHTTP method to use (GET, POST, PUT, DELETE, HEAD, PATCH)
opensearch_no_authIf true, connect without authentication.
opensearch_passwordPassword for basic authentication.
opensearch_ssl_verifySet true to require SSL certificate verification. A false value is ignored, since only the operator may disable verification.
opensearch_timeoutConnection timeout in seconds.
opensearch_usernameUsername for basic authentication.
query_paramsQuery parameters to include in the request URL as key-value pairs