OpenSearch MCP server

Enables natural language interaction with OpenSearch clusters for index operations, document searches, and cluster management without requiring complex query syntax.
Back to servers
Provider
Seohyun Jun
Release date
Mar 26, 2025
Language
Python
Package
Stats
2.3K downloads
9 stars

The OpenSearch MCP Server provides a Model Context Protocol (MCP) server implementation that enables interaction with OpenSearch clusters. It allows you to search documents, analyze indices, and manage your cluster through a user-friendly interface.

Features

Index Operations

  • List all indices in the OpenSearch cluster
  • Retrieve mapping configurations for specific indices
  • Get settings configurations for specific indices

Document Operations

  • Search documents in an index using OpenSearch Query DSL

Cluster Operations

  • Get health status of the cluster
  • Get statistical information about the cluster

Installation

Prerequisites

  • Docker and Docker Compose installed on your system

Setting Up OpenSearch Cluster

Start the OpenSearch cluster using Docker Compose:

docker-compose up -d

This command launches a 3-node OpenSearch cluster and Kibana with the following default credentials:

  • Username: opensearch
  • Password: test123

You can access Kibana from http://localhost:5601

Configuration with Claude Desktop

To use the OpenSearch MCP Server with Claude Desktop, you'll need to add the appropriate configuration.

Setup with uv

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
  2. Add the following configuration to the file (replace path/to/src/opensearch_mcp_server with the actual path):

{
  "mcpServers": {
    "opensearch": {
      "command": "uv",
      "args": [
        "--directory",
        "path/to/src/opensearch_mcp_server",
        "run",
        "opensearch-mcp-server"
      ],
      "env": {
        "OPENSEARCH_HOST": "https://localhost:9200",
        "OPENSEARCH_USERNAME": "opensearch",
        "OPENSEARCH_PASSWORD": "test123"
      }
    }
  }
}
  1. Restart Claude Desktop to load the new MCP server configuration.

Usage

After setting up the MCP server, you can interact with your OpenSearch cluster through Claude using natural language commands such as:

  • "List all indices in the cluster"
  • "How old is the student Bob?"
  • "Show me the cluster health status"

You can utilize all the features mentioned above through conversational queries, making it easier to work with your OpenSearch data without writing complex queries manually.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later