MCP server
by awesimon
Enable natural language search and index management in Elasticsearch without complex queries. Simplify your Elasticsearc
Connects to Elasticsearch clusters and allows you to search data, manage indices, and perform database operations using natural language instead of complex query syntax.
Elasticsearch is a community-built MCP server published by awesimon that provides AI assistants with tools and capabilities via the Model Context Protocol. Enable natural language search and index management in Elasticsearch without complex queries. Simplify your Elasticsearc It is categorized under databases, analytics data.
You can install Elasticsearch in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
Elasticsearch is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Enable Claude to query your database directly using natural language
Example
Ask 'Show me top 10 customers by revenue this month' and get SQL results instantly
Eliminate manual SQL writing for ad-hoc queries, get insights 10x faster
Generate complex reports and analytics without leaving conversation
Example
Analyze sales trends, cohort retention, user behavior patterns conversationally
Democratize data access—non-technical team members can query databases
Understand database structure, relationships, and data models
Example
'Explain the user_orders table schema and its relationships'
Onboard engineers faster, explore unfamiliar databases efficiently
Share your MCP server with the developer community
Elasticsearch reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
According to our notes, Elasticsearch benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
Elasticsearch has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
Elasticsearch reduced integration guesswork — categories and install configs on the listing matched the upstream repo.
I recommend Elasticsearch for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
According to our notes, Elasticsearch benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
I recommend Elasticsearch for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
Strong directory entry: Elasticsearch surfaces stars and publisher context so we could sanity-check maintenance before adopting.
Elasticsearch has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
Strong directory entry: Elasticsearch surfaces stars and publisher context so we could sanity-check maintenance before adopting.
showing 1-10 of 50
MCP Server for connecting to your Elasticsearch cluster directly from any MCP Client (like Claude Desktop, Cursor).
This server connects agents to your Elasticsearch data using the Model Context Protocol. It allows you to interact with your Elasticsearch indices through natural language conversations.
elasticsearch_health: Get Elasticsearch cluster health status, optionally including index-level detailslist_indices: List available Elasticsearch indices, support regexcreate_index: Create Elasticsearch index with optional settings and mappingsreindex: Reindex data from a source index to a target index with optional query and scriptget_mappings: Get field mappings for a specific Elasticsearch indexcreate_mapping: Create or update mapping structure for an Elasticsearch indexsearch: Perform an Elasticsearch search with the provided query DSLbulk: Bulk data into an Elasticsearch indexcreate_index_template: Create or update an index templateget_index_template: Get information about index templatesdelete_index_template: Delete an index template[!TIP] The easiest way to use Elasticsearch MCP Server is through the published npm package.
Configure MCP Client
Edit Config and add a new MCP Server with the following configuration:{
"mcpServers": {
"elasticsearch-mcp": {
"command": "npx",
"args": [
"-y",
"@awesome-ai/elasticsearch-mcp"
],
"env": {
"ES_HOST": "your-elasticsearch-host",
"ES_API_KEY": "your-api-key"
}
}
}
}
Start a Conversation
The Elasticsearch MCP Server supports configuration options to connect to your Elasticsearch:
[!NOTE] You must provide either an API key or both username and password for authentication.
| Environment Variable | Description | Required |
|---|---|---|
ES_HOST | Your Elasticsearch instance URL(s) - supports single URL or comma-separated multiple URLs (also supports legacy HOST) | Yes |
ES_API_KEY | Elasticsearch API key for authentication (also supports legacy API_KEY) | No |
ES_USERNAME | Elasticsearch username for basic authentication (also supports legacy USERNAME) | No |
ES_PASSWORD | Elasticsearch password for basic authentication (also supports legacy PASSWORD) | No |
ES_CA_CERT | Path to custom CA certificate for Elasticsearch SSL/TLS (also supports legacy CA_CERT) | No |
You can configure multiple Elasticsearch nodes for high availability and load balancing:
{
"mcpServers": {
"elasticsearch-mcp": {
"command": "npx",
"args": [
"-y",
"@awesome-ai/elasticsearch-mcp"
],
"env": {
"ES_HOST": "https://es-node1:9200,https://es-node2:9200,https://es-node3:9200",
"ES_API_KEY": "your-api-key"
}
}
}
}
The client will automatically handle failover and load balancing between the configured nodes.
[!NOTE] If you want to modify or extend the MCP Server, follow these local development steps.
Use the correct Node.js version
nvm use
Install Dependencies
npm install
Build the Project
npm run build
Run locally in Claude Desktop App
Edit Config and add a new MCP Server with the following configuration:{
"mcpServers": {
"elasticsearch-mcp": {
"command": "node",
"args": [
"/path/to/your/project/dist/index.js"
],
"env": {
"ES_HOST": "your-elasticsearch-host",
"ES_API_KEY": "your-api-key"
}
}
}
}
Run locally in Cursor Editor
Add new global MCP Server and add a new MCP Server with the following configuration:{
"mcpServers": {
"elasticsearch-mcp": {
"command": "node",
"args": [
"/path/to/your/project/dist/index.js"
],
"env": {
"ES_HOST": "your-elasticsearch-host",
"ES_API_KEY": "your-api-key"
}
}
}
}
Debugging with MCP Inspector
ES_HOST=your-elasticsearch-url ES_API_KEY=your-api-key npm run inspector
This will start the MCP Inspector, allowing you to debug and analyze requests. You should see:
Starting MCP inspector...
⚙️ Proxy server listening on port 6277
🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀
[!TIP] Here are some natural language queries you can try with your MCP Client.
If you encounter issues, feel free to open an issue on the GitHub repository.
Run data quality queries to catch anomalies and inconsistencies
Example
Find duplicate records, missing values, orphaned foreign keys automatically
Maintain data integrity with less manual SQL work
Prerequisites
Time Estimate
15-30 minutes including configuration and testing
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
MCP server acts as bridge between Claude and database, translating natural language to SQL queries and returning results in structured format.
Protocols
Compatibility
✓ Use when
Use for ad-hoc data queries, exploratory analysis, report generation, schema exploration, and democratizing data access. Best for read-heavy analytics workloads.
✗ Avoid when
Avoid for production write operations, mission-critical transactions, real-time OLTP workloads, or when database contains sensitive PII without proper access controls. Use read replicas, not primary.