MCP.so
Sign In

OpenSearch MCP <> LLM Integration Guide

@madhankb

About OpenSearch MCP <> LLM Integration Guide

Step by step guide for integrating LLMs with OpenSearch MCP servers

Basic information

Category

Databases

Runtime

yaml

Transports

stdio

Publisher

madhankb

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "opensearch-mcp-integration": {
      "command": "docker",
      "args": [
        "compose",
        "up",
        "-d"
      ]
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is OpenSearch MCP <> LLM Integration Guide?

This guide provides step-by-step instructions for integrating Amazon Q and Anthropic Claude Desktop with OpenSearch using MCP servers, enabling natural language interactions with an OpenSearch cluster. It covers setting up a local OpenSearch instance, installing the opensearch-mcp-server, configuring LLM clients, and using natural language commands to manage indices and documents.

How to use OpenSearch MCP <> LLM Integration Guide?

Install the MCP server via pipx install opensearch-mcp-server. Configure your LLM client by creating a JSON file (mcp.json for Amazon Q or claude_desktop_config.json for Claude Desktop) with the command path and environment variables (OPENSEARCH_URL, OPENSEARCH_SSL_VERIFY, OPENSEARCH_USERNAME, OPENSEARCH_PASSWORD). Start a local OpenSearch instance using the provided docker-compose.yml, then use natural language prompts in the LLM to perform operations like creating indices, adding documents, and searching.

Key features of OpenSearch MCP <> LLM Integration Guide

  • Provides MCP tools for managing OpenSearch indices and documents.
  • Supports creating, reading, updating, and deleting indices and documents.
  • Enables search and delete by query using natural language.
  • Offers cluster health and statistics inspection.
  • Includes alias management and a general-purpose API request tool.
  • Integrates with Amazon Q and Anthropic Claude Desktop.

Use cases of OpenSearch MCP <> LLM Integration Guide

  • Create a new index with specified fields using natural language.
  • Add, retrieve, update, and delete documents without writing raw Elasticsearch queries.
  • Search for documents using plain‑language descriptions.
  • Get index mappings and cluster health information on demand.
  • Perform administrative tasks like alias management and custom API requests.

FAQ from OpenSearch MCP <> LLM Integration Guide

What are the prerequisites for using this setup?

You need Docker and Docker Compose, Python 3.x, pipx, and the LLM clients (Amazon Q CLI or Anthropic Claude Desktop).

How do I start a local OpenSearch instance?

Create a docker-compose.yml with the provided configuration and run docker compose up -d. The instance will be available on ports 9200 and 9600.

What MCP tools are available?

The server exposes tools including list_indices, get_index, create_index, delete_index, search_documents, index_document, get_document, delete_document, delete_by_query, get_cluster_health, get_cluster_stats, list_aliases, get_alias, put_alias, delete_alias, and general_api_request.

How do I configure Amazon Q or Claude Desktop to use the MCP server?

Create a JSON configuration file (e.g., ~/.aws/amazonq/mcp.json for Amazon Q or the Claude Desktop config path) with the opensearch-mcp-server command and environment variables for the OpenSearch URL, credentials, and SSL settings.

What security precautions are recommended?

Use strong passwords in production, enable SSL, and regularly rotate credentials. The guide defaults to SSL verification disabled for local testing, but this should be removed in production.

Comments

More Databases MCP servers