mcp-opensearch
Allows exploration and search of OpenSearch clusters, providing tools for indexing, querying, and cluster management.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-opensearch search logs for errors in the last hour"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-opensearch
Read-only MCP server for exploring and searching OpenSearch 2 clusters. Ideal for log analysis, index exploration, and query execution.
Tools
Tool | Description |
| Check connectivity — returns cluster name and version |
| Cluster health status (green/yellow/red), node and shard counts |
| List indices with health, doc count, and size. Optional pattern filter |
| Show field types and structure for an index |
| Execute queries using OpenSearch Query DSL (JSON) |
| Count documents matching an optional query |
| List all index aliases |
| Retrieve a specific document by ID |
Related MCP server: openobserve-community-mcp
Installation — Claude Desktop Extension
Build the extension package:
npx @anthropic-ai/mcpb pack .In Claude Desktop, go to Settings → Extensions and upload
mcpopensearch.mcpb.Configure via the UI:
OpenSearch URL — e.g.
http://your-opensearch:9200Username / Password — optional, for basic auth
Installation — Claude Code
Add to your .claude/settings.json:
{
"mcpServers": {
"opensearch": {
"command": "uv",
"args": ["--directory", "/path/to/mcpopensearch", "run", "server.py"],
"env": {
"OPENSEARCH_URL": "http://localhost:9200",
"OPENSEARCH_USERNAME": "",
"OPENSEARCH_PASSWORD": ""
}
}
}
}Environment Variables
Variable | Default | Description |
|
| OpenSearch cluster URL |
| (none) | Basic auth username |
| (none) | Basic auth password |
Query Examples
Search for errors in the last hour:
{
"query": {
"bool": {
"must": [
{"match": {"level": "ERROR"}},
{"range": {"@timestamp": {"gte": "now-1h"}}}
]
}
},
"sort": [{"@timestamp": "desc"}]
}Count documents by status code:
{
"query": {"match_all": {}},
"aggs": {"status_codes": {"terms": {"field": "response_code"}}}
}License
MIT
Available Tools
8 toolscluster_healthA
Get the cluster health status including node count, shard info, and overall status (green/yellow/red).
Inputs: no named parameters. Returns: result
countA
Count documents in an index, optionally filtered by a query.
Args: index: Index name or pattern (e.g. 'logs-*'). query_body: Optional JSON string with a query filter (e.g. '{"query": {"match": {"level": "ERROR"}}}').
Inputs: index (required), query_body. Returns: result
get_documentB
Retrieve a specific document by its ID.
Args: index: Name of the index containing the document. doc_id: The document ID.
Inputs: index (required), doc_id (required). Returns: result
get_index_mappingA
Get the field mapping (schema) for an index, showing all fields and their types.
Args: index: Name of the index (e.g. 'filebeat-2024.01.15' or 'logs-*').
Inputs: index (required). Returns: result
list_aliasesA
List all index aliases in the cluster, showing which indices they point to.
Inputs: no named parameters. Returns: result
list_indicesA
List indices in the cluster with their health, doc count, and size.
Args: pattern: Optional index name pattern to filter (e.g. 'filebeat-', 'logs-').
Inputs: pattern. Returns: result
pingA
Check connectivity to the OpenSearch cluster. Returns cluster name and version.
Inputs: no named parameters. Returns: result
searchA
Execute a read-only search query against an index using OpenSearch Query DSL.
The query_body must be a valid JSON string representing the query portion. Example: {"query": {"match": {"message": "error"}}, "sort": [{"@timestamp": "desc"}]}
Args: index: Index name or pattern to search (e.g. 'filebeat-*'). query_body: JSON string with the OpenSearch Query DSL body. size: Maximum number of results to return (default 20, max 100).
Inputs: index (required), query_body (required), size. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Tools target distinct resources/actions: cluster health, index listing, mappings, search, count, aliases, and document retrieval. Ping and cluster_health both relate to health but are clearly differentiated, as are search and count; no tools appear to duplicate each other.
Names are consistently lowercase snake_case, but conventions vary: bare verbs (ping, search, count), list_* (list_indices, list_aliases), get_* (get_document, get_index_mapping), and one noun-phrase tool (cluster_health). This is readable but not a uniform verb_noun pattern.
Eight tools fit a focused OpenSearch query and observability server well. There is no bloat or redundancy, and each tool covers a meaningful operation.
The set covers health, index listing/mapping, search, count, aliases, and document retrieval, but lacks write operations and common admin reads like index settings or cluster/node stats. For a read-only observability tool it is workable, but as a general OpenSearch surface it has notable gaps.
Maintenance
Related MCP Connectors
Read-only Google Search Console MCP server for AI assistants.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Federated commerce search across independent WooCommerce merchants. Keyless, read-only MCP server.
Read-only MCP server for the OrchestKit docs: full-text search + Markdown fetch. No auth.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that enables interaction with Elasticsearch and OpenSearch clusters for searching documents and managing indices. It provides tools for cluster health monitoring, index configuration, and general API requests.16Apache 2.0
- AlicenseBqualityDmaintenanceA read-only MCP server for OpenObserve Community Edition that works over the REST API. Provides tools for searching logs, traces, stream schemas, and dashboards - no Enterprise license required.873 PyPI16GPL 3.0
- AlicenseNot gradedqualityFmaintenanceA read-only MCP server for Elasticsearch 7.10 clusters, providing tools for cluster info, health, index listing, and Query DSL search with Google OAuth and Bearer token authentication.MIT
- AlicenseAqualityDmaintenanceA read-only MCP server that enables AI assistants to search, aggregate, and explore OpenSearch log data through 12 tools for connectivity, index discovery, search, and aggregations.17MIT