Elasticsearch MCP Server — Hosted Web Search Integration
MCP Server language Hosted language PublicSearch, index, and manage documents in your Elasticsearch cluster — AI-native full-text search and analytics.
Use with AI AssistantsMCP
Connect Claude, Cursor, or any MCP-compatible client — then call tools directly
① Add This MCP Server
Paste into your AI client config — then all its tools are available instantly.
{
"mcpServers": {
"elasticsearch": {
"url": "https://mcp.aerostack.dev/s/aerostack/mcp-elasticsearch",
"headers": {
"Authorization": "Bearer YOUR_AEROSTACK_TOKEN"
}
}
}
}Replace YOUR_AEROSTACK_TOKEN with your API token from the dashboard.
② Call a Tool
Ask your AI assistant to call a specific tool, or send raw JSON-RPC:
Natural Language Prompt
“Use the _ping tool to verify elasticsearch connectivity by querying the cluster root. used internally by aerostack to validate credentials”
Using a Workspace?
Add this MCP to your Workspace — your team shares one token, secrets are stored securely, and every AI agent in the workspace can call it without per-user setup.
description Overview
mcp-elasticsearch — Elasticsearch MCP Server
Search, index, and manage documents in your Elasticsearch cluster from your AI agents.
Elasticsearch is the distributed search and analytics engine powering search at scale — from full-text search and log analytics to vector similarity and real-time aggregations. This MCP server gives your AI agents direct access to your Elasticsearch cluster: searching documents with the full Query DSL, indexing and updating records, managing indices and mappings, and monitoring cluster health — all through natural language.
Live endpoint: https://mcp.aerostack.dev/s/aerostack/mcp-elasticsearch
What You Can Do
- Search documents across any index using Elasticsearch Query DSL — full-text, term, range, bool, and more
- Index, update, and delete documents to keep your search data current from agent workflows
- Bulk index large batches of documents in a single request for efficient data loading
- Create and manage indices with custom mappings and settings for new data sources
- Monitor cluster health and inspect index mappings to understand your data topology
Available Tools
| Tool | Description |
|---|---|
list_indices |
List all indices with health, doc count, and size |
get_mapping |
Get field mappings for an index |
search |
Search documents using Elasticsearch Query DSL |
index_document |
Index (create or replace) a document |
get_document |
Get a document by ID |
update_document |
Partially update a document by ID |
delete_document |
Delete a document by ID |
bulk |
Bulk index/update/delete operations in one request |
count |
Count documents matching an optional query |
create_index |
Create an index with optional mappings and settings |
delete_index |
Delete an index and all its documents |
cluster_health |
Get cluster health status (green/yellow/red) |
Configuration
| Variable | Required | Description | How to Get |
|---|---|---|---|
ELASTICSEARCH_URL |
Yes | Your Elasticsearch cluster URL | Elastic Cloud: Deployments → your deployment → Copy endpoint (e.g. https://my-deploy.es.us-east-1.aws.elastic.cloud:9243). Self-hosted: your cluster's base URL. |
ELASTICSEARCH_API_KEY |
Yes | Elasticsearch API key for authentication | Kibana: Stack Management → API Keys → Create API key → copy the Base64-encoded key |
Quick Start
Add to Aerostack Workspace
- Go to aerostack.dev → Your Project → MCPs
- Search for "Elasticsearch" and click Add to Workspace
- Add
ELASTICSEARCH_URLandELASTICSEARCH_API_KEYunder Project → Secrets
Once added, every AI agent in your workspace can call Elasticsearch tools automatically — no per-user setup needed.
Example Prompts
"List all indices in my Elasticsearch cluster and show their doc counts"
"Search the products index for items matching 'wireless headphones' sorted by price ascending"
"Index a new document into the logs index with level: error and message: Connection timeout"
"Get the cluster health and show me any yellow or red indices"
Direct API Call
curl -X POST https://mcp.aerostack.dev/s/aerostack/mcp-elasticsearch \
-H 'Content-Type: application/json' \
-H 'X-Mcp-Secret-ELASTICSEARCH-URL: https://my-deploy.es.us-east-1.aws.elastic.cloud:9243' \
-H 'X-Mcp-Secret-ELASTICSEARCH-API-KEY: your-api-key' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_indices","arguments":{}}}'
License
MIT
terminal Tools (13)
Available tools on this MCP server. Each tool can be called directly from any AI agent.
_ping #1 Verify Elasticsearch connectivity by querying the cluster root. Used internally by Aerostack to validate credentials.
list_indices #2 List all indices in the Elasticsearch cluster with stats (health, status, doc count, size)
get_mapping #3 Get the field mapping for an Elasticsearch index
search #4 Search documents in an index using Elasticsearch Query DSL
index_document #5 Index (create or replace) a document in an Elasticsearch index
get_document #6 Get a single document by ID from an Elasticsearch index
update_document #7 Partially update a document by ID in an Elasticsearch index
delete_document #8 Delete a document by ID from an Elasticsearch index
bulk #9 Execute bulk indexing operations (index, create, update, delete) in a single request
count #10 Count documents in an index, optionally matching a query
create_index #11 Create a new Elasticsearch index with optional mappings and settings
delete_index #12 Delete an Elasticsearch index and all its documents
cluster_health #13 Get the health status of the Elasticsearch cluster (green/yellow/red)
Details
language Live Endpoint
https://mcp.aerostack.dev/s/aerostack/mcp-elasticsearch
Sub-50ms globally · Zero cold start
Publisher
Pre-built functions for the most common MCP tool patterns. Clone, extend, and deploy.
More in Web Search
Browse Web Search MCPs →Firecrawl
by @aerostack
Scrape web pages, crawl entire sites, extract structured data, and search the web — AI-native web data extraction for RAG pipelines.
Google Ads
by @aerostack
Manage Google Ads campaigns, ad groups, keywords, and budgets — automate your PPC advertising with AI.
Google Sheets
by @aerostack
Read, write, and format Google Sheets data — use your spreadsheets as a live AI-accessible data source.
Webflow
by @aerostack
Manage CMS collections, publish content, and control site deployments in Webflow — AI-powered web publishing.
Google Docs
by @aerostack
Create, read, edit, and format Google Docs — paragraph styling, tables, images, comments, and real-time collaboration via Google Docs API.
Google Meet
by @aerostack
Create and manage Google Meet spaces, schedule meetings via Google Calendar, list participants, access recordings and transcripts.
Frequently asked questions
What is the Elasticsearch MCP server and what can it do? +
The Elasticsearch MCP server is hosted on Aerostack and exposes these tools to your AI agent: `_ping`, `list_indices`, `get_mapping`, `search`, `index_document`. You get one hosted URL — no self-hosting — that works from Claude, Cursor, ChatGPT, Gemini, VS Code, or any MCP-compatible client, and you can share it with your team or combine it with other MCP servers in a workspace.
Is the Elasticsearch MCP server hosted, or do I have to run it myself? +
It's hosted on Aerostack's edge infrastructure — you don't deploy or maintain anything. Add it to a workspace and you get one authenticated URL, with secrets encrypted, that any AI agent or editor can connect to. Use it solo or share the same URL across your whole team.
Which AI agents and editors can use the Elasticsearch MCP server? +
Any MCP client: Claude and Claude Code, Cursor, ChatGPT, Gemini, Windsurf, Cline, VS Code, and custom agents. Because it's one hosted URL, the same Elasticsearch MCP server works everywhere — and you can compose it with other MCP servers, skills, and functions behind a single workspace URL.
How do I install the Elasticsearch MCP server in Claude Desktop? +
Add the following to your Claude Desktop config (`claude_desktop_config.json`): ```json { "mcpServers": { "@aerostack/mcp-elasticsearch": { "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-elasticsearch"] } } } ``` Then restart Claude Desktop and the tools will appear automatically.
How do I use the Elasticsearch MCP server in Cursor? +
In Cursor, open **Settings → MCP** and add: ```json { "name": "@aerostack/mcp-elasticsearch", "command": "npx", "args": ["-y", "@aerostack/@aerostack/mcp-elasticsearch"] } ``` Save and reload Cursor. The MCP tools will be available in Agent mode.
Does Elasticsearch MCP require authentication? +
Yes. Elasticsearch requires authentication. Check the MCP's documentation for the required credentials.