home / mcp / opensearch mcp server

OpenSearch MCP Server

Provides a semantic memory layer on top of OpenSearch to store and retrieve memories for MCP-enabled applications.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ibrookssdx-mcp-server-opensearch": {
      "url": "https://mcp.opensearch.example/mcp",
      "headers": {
        "INDEX_NAME": "my_index",
        "OPENSEARCH_HOST": "http://localhost",
        "OPENSEARCH_API_KEY": "YOUR_API_KEY",
        "OPENSEARCH_HOSTPORT": "9200"
      }
    }
  }
}

You can connect your LLM applications to an OpenSearch-backed semantic memory layer using this MCP server. It provides a focused interface to store and retrieve memories from an OpenSearch index, enabling contextual recall and reasoning over your data.

How to use

To use this MCP server, run it with your OpenSearch endpoint and index configured. The server acts as a memory store on top of OpenSearch, so your LLM workflows can query and store memories as needed. You’ll typically start the server locally, point it at your OpenSearch instance, and then connect your MCP client to the running server. The client will send memory store and retrieval requests, and the server will persist and fetch results from the OpenSearch index.

How to install

Prerequisites you need before installing:
- Node.js and npm or npx for optional installation flows
- Python 3.x if you plan to run Python-based tests or utilities
- Access to an OpenSearch instance you can connect to (host and port) and an index to use (or create one)
# Optional: install via Smithery to install for Claude Desktop automatically
npx -y @smithery/cli install @ibrooksSDX/mcp-server-opensearch --client claude

# Recommended: run directly with uv (no separate installation required)
uv run mcp-server-opensearch \
  --opensearch-url "http://localhost:9200" \
  --index-name "my_index"

Environment and runtime notes

You can also run or configure the server by passing environment variables that describe your OpenSearch connection and index. If you use a configuration file or environment setup, provide these values to ensure the server can reach your OpenSearch instance.

Available tools

search_opensearch

Stores a memory in the OpenSearch database and confirms the operation; used to manage semantic memories in the index.