OpenSearch MCP Server

v1.0.0Search & Data Extractionstable

MCP server for opensearch mcp server py

opensearch-mcp-server-pymcpai-integration
Share:
125
Stars
0
Downloads
0
Weekly
0/5

What is OpenSearch MCP Server?

OpenSearch MCP Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for opensearch mcp server py

MCP server for opensearch mcp server py

This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • MCP server for opensearch mcp server py

Use Cases

Query OpenSearch clusters through MCP interface.
Perform semantic and full-text search operations via AI.
LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx opensearch-mcp-server-py

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use OpenSearch MCP Server

OpenSearch MCP Server (Python) is the official MCP server from the OpenSearch project that lets AI agents query and manage OpenSearch clusters through natural language. It exposes tools for searching indices with full Query DSL, retrieving mappings, checking cluster health, analyzing shard allocation, running multi-search operations, and optionally maintaining persistent agent memory across sessions using OpenSearch as a vector store. DevOps engineers, data engineers, and AI developers use it to interact with OpenSearch clusters without writing raw HTTP requests or Query DSL by hand.

Prerequisites

  • Python 3.10+ with pip or uvx
  • A running OpenSearch cluster (local, AWS, or managed)
  • OPENSEARCH_URL pointing to your cluster endpoint
  • Credentials: OPENSEARCH_USERNAME/OPENSEARCH_PASSWORD for basic auth, or AWS IAM credentials for AWS OpenSearch Service
  • An MCP-compatible client such as Claude Desktop or Cursor
1

Install the package

Install from PyPI using pip. The package includes all required OpenSearch client dependencies.

pip install opensearch-mcp-server-py
2

Configure connection environment variables

Set the cluster URL and authentication method. For basic auth use username/password; for AWS OpenSearch Service use the IAM variables; for unauthenticated local clusters set OPENSEARCH_NO_AUTH=true.

# Basic auth
export OPENSEARCH_URL=https://localhost:9200
export OPENSEARCH_USERNAME=admin
export OPENSEARCH_PASSWORD=admin

# AWS OpenSearch Service
export OPENSEARCH_URL=https://your-domain.us-east-1.es.amazonaws.com
export AWS_REGION=us-east-1
export AWS_PROFILE=your-profile
3

Add to Claude Desktop config

Edit the Claude Desktop config file to register the server. Using uvx allows zero-install execution directly from PyPI.

{
  "mcpServers": {
    "opensearch": {
      "command": "uvx",
      "args": ["opensearch-mcp-server-py"],
      "env": {
        "OPENSEARCH_URL": "https://localhost:9200",
        "OPENSEARCH_USERNAME": "admin",
        "OPENSEARCH_PASSWORD": "admin",
        "OPENSEARCH_SSL_VERIFY": "false"
      }
    }
  }
}
4

Enable optional tool categories

By default only core search tools are enabled. Enable additional categories with environment variables. For example, enable agentic memory (requires OpenSearch 3.3.0+) or search relevance experimentation tools.

# Enable agent memory
export MEMORY_TOOLS_ENABLED=true
export OPENSEARCH_MEMORY_CONTAINER_ID=my-memory-container

# Disable specific categories
export OPENSEARCH_DISABLED_CATEGORIES=cluster_management
5

Verify the connection

Ask your MCP client to list all indices. If the ClusterHealthTool returns green or yellow status the server is connected and operational.

OpenSearch MCP Server Examples

Client configuration

Full JSON config for Claude Desktop connecting to a local OpenSearch cluster with SSL verification disabled for development.

{
  "mcpServers": {
    "opensearch": {
      "command": "uvx",
      "args": ["opensearch-mcp-server-py"],
      "env": {
        "OPENSEARCH_URL": "https://localhost:9200",
        "OPENSEARCH_USERNAME": "admin",
        "OPENSEARCH_PASSWORD": "admin",
        "OPENSEARCH_SSL_VERIFY": "false",
        "OPENSEARCH_TIMEOUT": "30"
      }
    }
  }
}

Prompts to try

These prompts exercise the core OpenSearch MCP tools from index discovery to query execution and cluster diagnostics.

- "List all indices in my OpenSearch cluster with their document counts and sizes"
- "Search the logs-2025 index for error events in the last 24 hours"
- "Show me the mapping for the products index"
- "What is the current cluster health status and are there any unassigned shards?"
- "Run a multi-search query comparing results from the orders and returns indices"
- "Analyze the hot threads on each node to find performance bottlenecks"

Troubleshooting OpenSearch MCP Server

SSL certificate verification errors when connecting to a local OpenSearch cluster

Set OPENSEARCH_SSL_VERIFY=false in your environment or MCP config env block. For production clusters use a valid certificate and leave SSL verification enabled.

AWS OpenSearch authentication fails with 403 Forbidden

Ensure your AWS credentials are valid and that the IAM role or user has the 'es:ESHttpGet', 'es:ESHttpPost', and 'es:ESHttpPut' permissions on the OpenSearch domain. Set AWS_REGION to match your domain's region exactly.

Agentic memory tools are not available in the tools list

Memory tools require OpenSearch 3.3.0+ and must be explicitly enabled. Set MEMORY_TOOLS_ENABLED=true and restart the server. Also verify that your cluster version meets the minimum requirement with the ClusterHealthTool.

Frequently Asked Questions about OpenSearch MCP Server

What is OpenSearch MCP Server?

OpenSearch MCP Server is a Model Context Protocol (MCP) server that mcp server for opensearch mcp server py It connects AI assistants to external tools and data sources through a standardized interface.

How do I install OpenSearch MCP Server?

Follow the installation instructions on the OpenSearch MCP Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with OpenSearch MCP Server?

OpenSearch MCP Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is OpenSearch MCP Server free to use?

Yes, OpenSearch MCP Server is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Search & Data Extraction MCP Servers

Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "opensearch-mcp-server-py": { "command": "npx", "args": ["-y", "opensearch-mcp-server-py"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use OpenSearch MCP Server?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides