Skip to content
← All MCP servers

Is the OpenSearch MCP server safe? What it can reach

What the OpenSearch MCP server can read, write and delete, how it signs in, and how to limit it in Claude Code and Codex.

Official serverChecked

The OpenSearch project maintains this server. It runs locally over stdio and signs in to a cluster with basic auth, AWS IAM, headers or mTLS. Only nine core tools are on by default, but one of them, GenericOpenSearchApiTool, can call any endpoint with any method. Turn writes off with OPENSEARCH_SETTINGS_ALLOW_WRITE=false and use a read-only cluster user.

Who maintains it

ImplementationKindStatus
opensearch-project/opensearch-mcp-server-pyOfficialactive

It runs as a local process on your machine.

How it signs in

Basic auth, AWS IAM roles, header-based auth or mTLS against the cluster you point it at. The server acts with that identity’s cluster permissions, so a read-only role limits what it can do.

What its tools can do

KindTools
ReadListIndexTool, IndexMappingTool, SearchIndexTool, GetShardsTool, ClusterHealthTool, CountTool, ExplainTool, MsearchTool, GetClusterStateTool, GetSegmentsTool, CatNodesTool, GetNodesTool, GetIndexInfoTool, GetIndexStatsTool, GetQueryInsightsTool, GetNodesHotThreadsTool, GetAllocationTool, GetLongRunningTasksTool, GetAgenticMemoryTool, SearchAgenticMemoryTool, PPLQueryTool, GetSearchConfigurationTool, GetQuerySetTool, GetJudgmentListTool, GetExperimentTool, SearchQuerySetsTool, SearchSearchConfigurationsTool, SearchJudgmentsTool, SearchExperimentsTool, DataDistributionTool, LogPatternAnalysisTool, MetricChangeAnalysisTool, SearchMemoryTool
WriteCreateAgenticMemorySessionTool, AddAgenticMemoriesTool, UpdateAgenticMemoryTool, CreateSearchConfigurationTool, CreateQuerySetTool, SampleQuerySetTool, CreateJudgmentListTool, CreateLLMJudgmentListTool, CreateUBIJudgmentListTool, CreateExperimentTool, SaveMemoryTool
Can’t be undoneGenericOpenSearchApiTool, DeleteAgenticMemoryByIDTool, DeleteAgenticMemoryByQueryTool, DeleteSearchConfigurationTool, DeleteQuerySetTool, DeleteJudgmentListTool, DeleteExperimentTool, DeleteMemoryTool

Enabled by default: ListIndexTool, IndexMappingTool, SearchIndexTool, GetShardsTool, ClusterHealthTool, CountTool, ExplainTool, MsearchTool and GenericOpenSearchApiTool. The rest are off until you enable their category or tool. Memory tools need MEMORY_TOOLS_ENABLED=true. With no OPENSEARCH_URL set, every tool also accepts connection parameters from the agent.

Built-in limits

OptionWhat it does
OPENSEARCH_SETTINGS_ALLOW_WRITESet to false to block write operations. It defaults to true. OPENSEARCH_SETTINGS_ALLOW_WRITE_CATEGORIES then re-allows writes for named categories only.
OPENSEARCH_ENABLED_TOOLS and OPENSEARCH_DISABLED_TOOLSComma-separated allowlist and blocklist of tool names. Regex versions also exist, and a tool that is both enabled and disabled stays disabled.
OPENSEARCH_ENABLED_CATEGORIES and OPENSEARCH_DISABLED_CATEGORIESTurn whole groups on or off, such as core_tools, observability, skills, search_relevance and agentic_memory.
OPENSEARCH_SSRF_GUARD=trueLimits agent-supplied cluster URLs to public HTTPS addresses.
--hostThe streaming transports bind to 127.0.0.1 by default. The listener has no built-in authentication.

The risks

  • GenericOpenSearchApiTool is on by default and takes any path, method and body, so an injected instruction can delete indices or change cluster settings with whatever rights the credential has.
  • In zero-config mode the agent supplies the cluster URL and credentials on each call, so it can be pointed at a different cluster than the one you meant.
  • Search results are documents from your indices, so a poisoned record can carry instructions the agent reads back.
  • Search output can include whatever the credential can read, and the agent may copy it into other tools in the same session.
  • The HTTP transports have no authentication, so binding to 0.0.0.0 exposes the cluster credential to the network.

Limit it in Claude Code

Add it from the documented launch settings, at local or user scope so a token never lands in a shared .mcp.json:

claude mcp add --env OPENSEARCH_URL=... --env OPENSEARCH_USERNAME=... --env OPENSEARCH_PASSWORD=... opensearch -- uvx opensearch-mcp-server-py

Claude Code names MCP tools mcp__opensearch__<tool>. Deny rules win over ask rules, and ask rules over allow rules. Put these in ~/.claude/settings.json or the project’s .claude/settings.json:

{
  "permissions": {
    "deny": [
      "mcp__opensearch__GenericOpenSearchApiTool",
      "mcp__opensearch__DeleteAgenticMemoryByIDTool",
      "mcp__opensearch__DeleteAgenticMemoryByQueryTool",
      "mcp__opensearch__DeleteSearchConfigurationTool",
      "mcp__opensearch__DeleteQuerySetTool",
      "mcp__opensearch__DeleteJudgmentListTool",
      "mcp__opensearch__DeleteExperimentTool",
      "mcp__opensearch__DeleteMemoryTool"
    ],
    "ask": [
      "mcp__opensearch__CreateAgenticMemorySessionTool",
      "mcp__opensearch__AddAgenticMemoriesTool",
      "mcp__opensearch__UpdateAgenticMemoryTool",
      "mcp__opensearch__CreateSearchConfigurationTool",
      "mcp__opensearch__CreateQuerySetTool",
      "mcp__opensearch__SampleQuerySetTool",
      "mcp__opensearch__CreateJudgmentListTool",
      "mcp__opensearch__CreateLLMJudgmentListTool",
      "mcp__opensearch__CreateUBIJudgmentListTool",
      "mcp__opensearch__CreateExperimentTool",
      "mcp__opensearch__SaveMemoryTool"
    ]
  }
}

Limit it in Codex

Codex reads MCP servers from ~/.codex/config.toml. disabled_tools removes tools, and enabled_tools keeps only the ones you list:

[mcp_servers.opensearch]
command = "uvx"
args = ["opensearch-mcp-server-py"]
env_vars = ["OPENSEARCH_URL", "OPENSEARCH_USERNAME", "OPENSEARCH_PASSWORD"]
disabled_tools = ["GenericOpenSearchApiTool", "DeleteAgenticMemoryByIDTool", "DeleteAgenticMemoryByQueryTool", "DeleteSearchConfigurationTool", "DeleteQuerySetTool", "DeleteJudgmentListTool", "DeleteExperimentTool", "DeleteMemoryTool"]

Checklist

  • Connect with a read-only cluster role and set OPENSEARCH_SETTINGS_ALLOW_WRITE=false.
  • Disable GenericOpenSearchApiTool unless you need it.
  • Set OPENSEARCH_URL so the agent cannot choose the cluster, and set OPENSEARCH_SSRF_GUARD=true.
  • Keep any HTTP transport on 127.0.0.1.

Checked against the vendor documentation on November 25, 2026. opensearch-project/opensearch-mcp-server-py README · OpenSearch MCP server user guide · Repository metadata (GitHub API)

What Excellent covers

Excellent doesn’t inspect MCP servers themselves. Its free scan reads supported logs on the Mac (Claude Code, Codex, Grok Build, GitHub Copilot CLI, Gemini CLI and Qwen Code) and reports findings for review, so you can see what an agent did after a session. Run the free scan · See a sample report · How to vet any MCP server

Excellent Pro adds checks before supported actions. Claude Code can display an ask prompt. With Codex, an Excellent “ask” refuses the action and tells the agent to ask you. Pro is US-only for now. Agent coverage · Pricing