opensearch -py
MCP server from opensearch-project/opensearch-mcp-server-py
claude mcp add --transport stdio opensearch-project-opensearch-mcp-server-py python -m opensearch_mcp_server \ --env OPENSEARCH_AUTH="type of auth to use (e.g., basic, iam) or placeholder" \ --env OPENSEARCH_HOST="OpenSearch host URL (e.g., https://localhost:9200)" \ --env OPENSEARCH_PASSWORD="password for basic auth (if enabled)" \ --env OPENSEARCH_USERNAME="username for basic auth (if enabled)" \ --env OPENSEARCH_ENABLED_CATEGORIES="comma-separated categories to enable (e.g., core_tools)"
How to use
This MCP server hosts a set of OpenSearch tools that an AI assistant can invoke through the MCP protocol. It exposes core OpenSearch capabilities such as listing indices, retrieving index mappings, performing searches, checking cluster health, and getting shard information, with additional tools available when specific categories are enabled. The server is designed to work with standard MCP transports (stdio) as well as streaming transports (SSE/Streamable HTTP), allowing agents to drive OpenSearch operations in a streaming fashion or via traditional request/response cycles. Typical usage involves connecting an AI agent to the MCP server, selecting a tool (e.g., ListIndexTool or SearchIndexTool), and issuing a structured request that encodes the target OpenSearch operation and any required parameters. The server handles authentication and routes requests to the configured OpenSearch cluster, returning results and metrics in a consistent MCP format.
How to install
Prerequisites:\n- Python 3.8+ (recommended)\n- pip (comes with Python)\n- Access to an OpenSearch cluster (locally or remotely) for testing\n\nInstall the MCP server package:\nbash\npip install opensearch-mcp-server-py\n\n\nRun the MCP server (examples assume you are using a local OpenSearch instance with no auth):\nbash\n# Install dependencies and start the server module (adjust as needed if you use env vars)\nexport OPENSEARCH_HOST=https://localhost:9200\nexport OPENSEARCH_USERNAME=\nexport OPENSEARCH_PASSWORD=\nexport OPENSEARCH_AUTH=basic\n\npython -m opensearch_mcp_server\n\n\nAlternatively, run via a virtual environment:\nbash\npython -m venv venv\nsource venv/bin/activate\npip install opensearch-mcp-server-py\npython -m opensearch_mcp_server\n
Additional notes
Environment variables and configuration tips:\n- OPENSEARCH_HOST: URL of your OpenSearch cluster. Include https:// and port if needed.\n- OPENSEARCH_USERNAME / OPENSEARCH_PASSWORD: Use if your cluster requires basic authentication.\n- OPENSEARCH_AUTH: Choose the authentication mode (e.g., basic, iam) supported by your deployment.\n- OPENSEARCH_ENABLED_CATEGORIES / OPENSEARCH_DISABLED_CATEGORIES: Enable or disable tool categories to control capabilities exposed by the MCP server.\n- For streaming capability, ensure your client supports SSE/Streamable HTTP and that the server is configured accordingly.\nCommon issues: mismatched OpenSearch endpoint, firewall blocks, TLS certificate validation errors, and missing credentials. Check that the environment variables are loaded correctly and that the OpenSearch cluster accepts connections from the MCP server instance.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP