oshaani MCP Marketplace
Sign in

← Documentation

Elasticsearch MCP Search

Search documents with Query DSL, run aggregations, inspect mappings and check cluster health in Elasticsearch.

1 credits / tool call

Quick start

  1. Add a Elasticsearch connection with the settings below, then click Test configuration.
  2. Create an API key for your agent.
  3. Paste the key below, click Test endpoint, and copy the configuration for your platform.
Endpointhttps://market.oshaani.com/elasticsearch (your default connection) or https://market.oshaani.com/elasticsearch/<connection-id>
TransportStreamable HTTP (stateless, JSON responses). MCP protocol versions 2024-11-05 to 2025-11-25 and 2026-07-28.
AuthenticationAuthorization: Bearer <API key>, using a key from the API keys page.

Agent configuration

The default URL uses your organisation's default Elasticsearch connection; a URL with an ID pins one connection.
Get a key
The key is filled into the snippets below. It stays in this page and is only sent with the test request.
Runs initialize and tools/list against the endpoint, exactly like an agent. No credits are charged.

Any MCP client that supports remote (Streamable HTTP) servers with custom headers.

{
  "name": "elasticsearch",
  "transport": "streamable-http",
  "url": "https://market.oshaani.com/elasticsearch",
  "headers": {
    "Authorization": "Bearer YOUR_API_KEY"
  }
}

Connection settings

Entered once per connection on market.oshaani.com. Secrets are encrypted and never shown again or sent to agents.

SettingTypeDescription
Elasticsearch URL
url required
string (uri) e.g. https://my-deployment.es.us-east-1.aws.elastic.cloud
min length 1, max length 2083
API key
api_key
string Encoded API key (preferred). Leave empty to use username and password.
Username
username
string
Password
password
string
Verify TLS certificate
verify_tls
boolean
default true

Tools (6)

cluster_health read-only

Get cluster health, version and node/shard counts

No arguments.

list_indices read-only

List indices with health, document count and size

ArgumentTypeDescription
pattern string
default "*"
Index, alias, data stream or pattern, e.g. logs-* or orders,customers
max length 1000, pattern ^[^/\\?#\s\"<>|]+$
include_hidden boolean
default false
Include system/hidden indices (names starting with '.')
limit integer
default 200

min 1, max 1000

get_mapping read-only

Get the field names and types of an index

ArgumentTypeDescription
index required string Index, alias, data stream or pattern, e.g. logs-* or orders,customers
max length 1000, pattern ^[^/\\?#\s\"<>|]+$

count read-only

Count documents matching a query

ArgumentTypeDescription
index required string Index, alias, data stream or pattern, e.g. logs-* or orders,customers
max length 1000, pattern ^[^/\\?#\s\"<>|]+$
query object Query DSL object, e.g. {"match": {"message": "timeout"}}

get_document read-only

Get a single document by ID

ArgumentTypeDescription
index required string
pattern ^[^/\\?#\s\"<>|,*]+$
document_id required string
min length 1, max length 512

Billing & errors

Each successful tool call costs 1 oshaani.com credit. initialize, tools/list, failed calls and timeouts are free.

JSON-RPC codeMeaning
-32054 (HTTP 401)Missing, unknown or revoked API key
-32053 (HTTP 404)No Elasticsearch connection configured for your organisation, or the connection ID is wrong
-32055 (HTTP 403)Connection disabled or origin not allowed
-32052 (HTTP 429)Rate limit reached; retry after a minute
-32050Not enough oshaani.com credits for the call
-32051Billing temporarily unavailable; the call was not run

Errors from Elasticsearch itself (bad IDs, permissions) come back as tool results with isError: true so the agent can read and correct them. See the Elasticsearch API documentation.