Skip to main content Announcing Tool Gateway MCP: the universal MCPRead the announcement
Live 69 Actions

OpenSearch MCP Server
for AI Agents

Connect your AI agent to StackOne's OpenSearch MCP server and give it 69 MCP tools out of the box. Auth, tool execution, and security all managed.

OpenSearch logo
OpenSearch MCP Server
Built by StackOne StackOne
DrataGPLocalyzeFlipMindtoolsScreenloop

Coverage

69 Agent Actions

Create, read, update, and delete across OpenSearch — and extend your agent's capabilities with custom actions.

Authentication

Agent Tool Authentication

Per-user OAuth in one call. Your OpenSearch MCP server gets session-scoped tokens with zero credentials stored on your infra.

Agent Auth →

Security

Agent Protection

Every OpenSearch tool response scanned for prompt injection in milliseconds — 88.7% accuracy, all running on CPU.

Prompt Injection Defense →

Performance

Max Agent Context. Min Cost.

Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every OpenSearch call.

Tools Discovery →

What is the OpenSearch MCP Server?

A OpenSearch MCP server lets AI agents read and write OpenSearch data through the Model Context Protocol — Anthropic's open standard for connecting LLMs to external tools. StackOne's OpenSearch MCP server ships with 69 pre-built actions, fully extensible via the Connector Builder — plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.

All OpenSearch MCP Tools

Every action from OpenSearch's API, ready for your agent. Create, read, update, and delete — scoped to exactly what you need.

Cluster Settings

  • Get Cluster Settings

    Return persistent, transient, and default cluster settings.

  • Update Cluster Settings

    Set persistent or transient cluster settings. Persistent settings survive restarts; transient do not.

Saved Objects

  • Create Saved Object

    Create a new Dashboards saved object.

  • Import Saved Objects

    Import an NDJSON bundle of saved objects (produced by export or hand-crafted).

  • Get Saved Object

    Fetch a single Dashboards saved object (dashboard, visualization, index-pattern, etc.) by type + id.

  • Export Saved Objects

    Export a set of saved objects (with dependencies) as an NDJSON bundle. Response body is raw NDJSON text (one JSON object per line, newline-terminated) — pass it verbatim to `dashboards_import_saved_objects` (after base64-encoding) or parse each line with `JSON.parse` client-side.

  • Update Saved Object

    Update the attributes of an existing Dashboards saved object.

  • Delete Saved Object

    Delete a Dashboards saved object by type + id.

Documents By Querys

  • Update Documents By Query

    Apply a script or noop update to every document matching a query.

  • Delete Documents By Query

    Delete all documents matching a query in one call.

Indexs

  • Create Index

    Create a new index with optional settings, mappings, and aliases.

  • Clone Index

    Copy an existing index to a new name — source must have the write-block set before calling.

  • Search Index

    Full-text and structured search over one or more indices using the Query DSL.

  • Delete Index

    Permanently delete an index and all its data.

Mappings

  • Get Mapping

    Return the mapping (field types) for one or more indices.

  • Update Mapping

    Add new fields to an index mapping. Cannot change existing field types.

Index Settings

  • Get Index Settings

    Return the settings for one or more indices (shard count, replicas, analysis, refresh interval).

  • Update Index Settings

    Update dynamic index settings (replica count, refresh interval, allocation, etc.).

Point-in-Times

  • Create Point-in-Time

    Freeze an index at a moment in time so subsequent searches see a consistent view.

  • Delete Point-in-Time

    Release a PIT so its heap can be reclaimed.

Snapshot Repositorys

  • Get Snapshot Repository

    Return details of a specific repository (type, settings).

  • Delete Snapshot Repository

    Unregister a snapshot repository. Does NOT delete the snapshots themselves — files remain in the backend storage.

Other (47)

  • Create Or Update Document (Explicit ID)

    Index a document at a specific ID; overwrites if the ID already exists unless op_type=create.

  • Add Alias To Index

    Attach a single alias to a single index (non-atomic — use update_aliases for atomic swaps).

  • List Indices (Cat)

    Compact tabular listing of every index — health, status, docs count, disk usage, shards.

  • List Aliases (Cat)

    Compact tabular alias listing — alias, index, filter, routing, is_write_index.

  • Get Cluster Health

    Snapshot of cluster health — status (green/yellow/red), active/relocating shards, and pending tasks. The canonical connection-health check.

  • Get Cluster Statistics

    Aggregated statistics across the whole cluster — nodes, shards, storage, JVM heap, and OS/process metrics.

  • Get Cluster State

    Full cluster state — routing table, metadata, node roster, and index settings. Very large payload; filter via the `metric` + `index` path segments.

  • List Cluster Pending Tasks

    Tasks queued on the cluster manager but not yet executed — useful to spot backlogs during allocation storms.

  • Get Document By ID

    Fetch a single document (source + metadata) by its ID.

  • Get Document Source Only

    Fetch only the _source field of a document, without _seq_no / _primary_term / _version metadata.

  • Get Index Info

    Return the settings, mappings, and aliases of one or more indices.

  • Get Alias Info

    Return details of a specific alias on a specific index (or across a wildcard set).

  • List All Aliases

    Return every alias across every index (or a filtered subset).

  • Search Across All Indices

    Same as search but without an index in the URL — required when using a Point-in-Time reference.

  • List Snapshot Repositories

    Return every registered snapshot repository on the cluster.

  • List Snapshots In Repository

    List snapshots in the given repository — companion LIST for the create/get/delete snapshot actions.

  • Get Snapshot Details

    Return details of one or more snapshots — status, indices, start/end times, shard counts.

  • Get Task

    Fetch the status of a running or completed task by task_id.

  • Delete Document

    Delete a document by ID.

  • Delete Alias From Index

    Remove an alias from an index.

  • Delete Snapshot

    Delete a snapshot and reclaim its unique segments from the repository.

  • Cat Cluster Health

    One-line summary of cluster health — status, node counts, shard counts.

  • Cat Nodes

    Per-node overview — heap, CPU, load, disk, role, and cluster-manager status.

  • Find Saved Objects

    Search and paginate Dashboards saved objects. The canonical enumeration endpoint for datasync discovery.

  • Bulk Get Saved Objects

    Fetch many saved objects in a single request.

  • Index Document (Auto-ID)

    Add a document to an index and let OpenSearch generate the ID.

  • Check Document Exists

    Existence check for a document — returns 200 if the document exists, 404 if not.

  • Partial Update Document

    Apply a partial update to a document using the update DSL (doc merge, script, or upsert).

  • Bulk Index/Update/Delete (NDJSON)

    Execute many index/update/delete operations in a single request. **Body must be NDJSON** (newline-delimited JSON), not standard JSON — each operation is metadata line + optional source line.

  • Bulk Operations Scoped To One Index

    Same NDJSON bulk semantics as bulk_operations, but scoped to a single index in the URL — operations can omit `_index` in their metadata.

  • Multi-Get Documents

    Fetch multiple documents by ID in one round-trip, optionally across different indices.

  • Reindex Documents

    Copy documents from a source index (or remote cluster) to a destination index; the canonical datasync migration primitive.

  • Check Index Exists

    Existence check for an index — 200 if it exists, 404 if not.

  • Refresh Index

    Force a refresh so recently indexed documents become searchable immediately.

  • Flush Index

    Persist in-memory transaction log to disk.

  • Force Merge Index

    Merge index segments to reduce their count; heavy operation.

  • Open Index

    Re-open a closed index so it becomes readable/writable.

  • Close Index

    Close an index so it stops accepting reads/writes; frees cluster resources.

  • Atomic Update Of Aliases

    Apply multiple alias add/remove operations atomically.

  • Multi-Search (NDJSON)

    Run several searches in one round-trip; body is NDJSON with alternating header + query lines.

  • Count Documents Matching Query

    Return the count of documents matching a query, without returning the hits themselves.

  • Scroll (Deep Pagination — Legacy)

    Fetch the next batch of a scroll context. Discouraged for new work — use PIT + search_after instead.

  • Clear Scroll Context

    Release the memory held by one or more scroll contexts.

  • Register Snapshot Repository

    Register a snapshot repository backed by fs, s3, gcs, or azure storage.

  • Take Snapshot

    Create a snapshot of one or more indices to the target repository.

  • Restore Snapshot

    Restore indices from a snapshot back into the cluster.

  • Cancel Task

    Cancel a running task by task_id. Cancellation is cooperative — the task ends at the next check point.

Set Up Your OpenSearch MCP Server in Minutes

One endpoint. Any framework. Your agent is talking to OpenSearch in under 10 lines of code.

Agent Frameworks

Claude Desktop
{
  "mcpServers": {
    "stackone": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.stackone.com/mcp?x-account-id=<account_id>",
        "--header",
        "Authorization: Basic <YOUR_BASE64_TOKEN>"
      ]
    }
  }
}

OpenSearch MCP Server FAQ

Does StackOne have a OpenSearch MCP server?
Yes. StackOne offers a hosted OpenSearch MCP server with 69 pre-built actions, and every action is tested and QA'd by StackOne. Connect it to Claude, Cursor, and any other MCP client, or to any agent framework through the AI Action SDK. It ships with managed agent authentication, prompt injection defense, and tool discovery with server-side execution that preserve your agent's context window and keep reasoning performance.
OpenSearch MCP server vs direct API integration — what's the difference?
A OpenSearch MCP server and direct API integration serve different use cases. Direct API integration is for software-to-software — backend code calling OpenSearch. A OpenSearch MCP server is for AI agents — MCP clients like Claude and Cursor, plus framework agents built with OpenAI, LangChain, or Vercel AI — discovering and calling OpenSearch at runtime. StackOne provides both.
How does OpenSearch authentication work for AI agents?
OpenSearch authentication for AI agents works through a StackOne Connect Session. Create one via the dashboard or the SDK — you get an auth link and ready-to-paste config for Claude Desktop, Cursor, and other MCP clients. Your user authenticates their own OpenSearch account; StackOne handles token exchange, storage, and refresh. Credentials never reach the LLM, and each user is isolated via origin_owner_id.
Are OpenSearch MCP tools vulnerable to prompt injection?
Yes — OpenSearch MCP tools can be vulnerable to indirect prompt injection. Any tool that reads user-written content — documents, messages, tickets, records, or free-text fields — is a potential vector. StackOne Defender scans every tool response before it enters the agent's context — regex patterns in ~1ms, then a MiniLM classifier in ~4ms. 88.7% accuracy, CPU-only.
What is the context bloat of a OpenSearch agent and how do I avoid it?
Context bloat happens when OpenSearch tool schemas and API responses eat your OpenSearch agent's memory, preventing it from reasoning effectively. A single OpenSearch query can return a massive JSON response, and connecting multiple tools compounds the problem. Tools Discovery and Code Mode reduce context bloat — loading only relevant tools per query and keeping raw responses out of the agent's context.
Can I limit which actions my OpenSearch agent can access?
Yes — you can limit which actions your OpenSearch agent can access directly from the StackOne dashboard. Toggle actions on or off, or restrict them to specific accounts, with no code changes to your agent. Session tokens can be scoped to exact actions so if one leaks, exposure stays contained.
Can I create custom agent actions for my OpenSearch MCP server?
Yes — you can create custom agent actions for your OpenSearch MCP server using Connector Builder. It's an integration agent your coding assistant (Claude Code, Cursor, or Copilot) can invoke to research OpenSearch's API, generate production-ready connector YAML, test against the live API, and validate before you ship.
When should I NOT use a OpenSearch MCP server?
Skip a OpenSearch MCP server if your integration is purely software-to-software — direct OpenSearch API integration is simpler when no AI agent is involved. For deterministic, compliance-critical operations (financial transactions, regulatory reporting), direct API gives you predictable behavior without agent-driven decision-making. MCP shines when AI agents need to dynamically discover and call OpenSearch actions at runtime.
What AI frameworks and AI clients does the StackOne OpenSearch MCP server support?
The StackOne OpenSearch MCP server supports both. MCP clients (paste-and-go apps): Claude Desktop, Claude Code, Cursor, VS Code, Goose. Agent frameworks (code SDKs you build with): OpenAI Agents SDK, Anthropic, Vercel AI, Google ADK, CrewAI, Pydantic AI, LangChain, LangGraph, Azure AI Foundry.

Put your AI agents to work

All the tools you need to build and scale AI agent integrations, with best-in-class connectivity, execution, and security.