mcpField
O
OpenSearch MCP Server

OpenSearch MCP Server

Local
github.com/loupipalienDatabases0Updated 78w ago

About OpenSearch MCP Server

OpenSearch MCP Server lets users interact with an OpenSearch cluster through natural language from MCP clients. Its tools cover cluster status, indices, documents, and query DSL searches.

Key features

  1. 01Inspect cluster health and statistics
  2. 02List and manage indices
  3. 03Bulk-write document operations
  4. 04Retrieve documents
  5. 05Search with query DSL

Use cases

  1. 01Check cluster health and statistics
  2. 02Create or remove an index
  3. 03Bulk-write documents to an index
  4. 04Search indexed documents with query DSL

MCP support

It exposes tools for interacting with an OpenSearch cluster to MCP clients, including cluster, index, document, and search operations.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"opensearch-mcp-server-loupipalien": {
"command": "uvx",
"args": [
"git+https://github.com/loupipalien/opensearch-mcp-server"
],
"env": {
"OPENSEARCH_HOSTS": "<OPENSEARCH_HOSTS>",
"OPENSEARCH_USERNAME": "<OPENSEARCH_USERNAME>",
"OPENSEARCH_PASSWORD": "<OPENSEARCH_PASSWORD>"
}
}
}
}
Run commanduvx 'git+https://github.com/loupipalien/opensearch-mcp-server'
Environment variables to set
OPENSEARCH_HOSTS
OPENSEARCH_USERNAME
OPENSEARCH_PASSWORDSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypigit+https://github.com/loupipalien/opensearch-mcp-server

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

OpenSearch MCP Server

Interact with your OpenSearch cluster through natural language directly from any MCP Client (like Cursor, Cline) using the Model Context Protocol (MCP).
This server provides the abilities of analyzing cluster health status, bulking documents to indices, getting index mappings, searching documents and so on through a set of tools.

Tools

Cluster
  • opensearch_cluster_health: get cluster health status
  • opensearch_cluster_stats: get cluster statistics information
Document
  • opensearch_bulk: write multiple document operations with bulk
  • opensearch_get_document: get a document from the index
Index
  • opensearch_list_indices: list indices in the cluster
  • opensearch_create_index: create index with specified configs
  • opensearch_delete_index: delete index by index name
  • opensearch_get_index: get information about index
Search
  • opensearch_search: query index using the provided query dsl

Prerequisites

Before using this mcp server, you need to install the following components:

  • python 3.10+ or higher
  • uv installed

Usage

Select any of the following config to add to your mcp settings file. Then set your opensearch cluster hosts (separated by commas when multiple hosts), username and password to mcp server config.

Run using remote repo
{
  "mcpServers": {
    "opensearch-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/loupipalien/opensearch-mcp-server",
        "opensearch-mcp-server"
      ],
      "env": {
        "OPENSEARCH_HOSTS": "your_opensearch_cluster_hosts",
        "OPENSEARCH_USERNAME": "your_opensearch_cluster_username",
        "OPENSEARCH_PASSWORD": "your_opensearch_cluster_password"
      }
    }
  }
}
Run using local repo
{
  "mcpServers": {
    "opensearch-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "path/to/repo/src/opensearch_mcp_server",
        "run",
        "server.py"
      ],
      "env": {
        "OPENSEARCH_HOSTS": "your_opensearch_cluster_hosts",
        "OPENSEARCH_USERNAME": "your_opensearch_cluster_username",
        "OPENSEARCH_PASSWORD": "your_opensearch_cluster_password"
      }
    }
  }
}

Start OpenSearch Cluster

If you don't have an OpenSearch cluster, you can run the following command in your local repository root directory to start one. More details can be found in here.
It will create a 2-node cluster and a dashboards. The default username is admin and password is your_opensearch_cluster_password. You can access the cluster from https://localhost:9200 and access the dashboards from http://localhost:5601

export OPENSEARCH_INITIAL_ADMIN_PASSWORD=your_opensearch_cluster_password

docker-compose up -d

Stop the cluster and dashboards

docker-compose down -v

License

This project is licensed under the Apache v2.0 License.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.