- Home
- MCP servers
- Elasticsearch
Elasticsearch
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"rishab2404-mcp_es": {
"command": "npx",
"args": [
"-y",
"@elastic/mcp-server-elasticsearch"
],
"env": {
"ES_URL": "your-elasticsearch-url",
"ES_API_KEY": "your-api-key"
}
}
}
}You can connect to your Elasticsearch data directly from any MCP Client using the Model Context Protocol (MCP). This server enables natural language conversations to explore indices, mappings, and queries without writing raw Elasticsearch commands, making data exploration faster and more intuitive.
How to use
Open your MCP Client and start a new conversation. The MCP Server will automatically connect to your Elasticsearch instance using your configured credentials. You can then ask questions like which indices exist, what fields are available, or to run searches against your data. The server translates your natural language requests into Elasticsearch operations and returns the results in a readable format.
How to install
Prerequisites you need before setup.
Install the published MCP server package using an MCP Client configuration. You will run the MCP server through a package runner so your client can connect and issue Elasticsearch-related requests.
{
"mcpServers": {
"elasticsearch-mcp-server": {
"command": "npx",
"args": [
"-y",
"@elastic/mcp-server-elasticsearch"
],
"env": {
"ES_URL": "your-elasticsearch-url",
"ES_API_KEY": "your-api-key"
}
}
}
}
Developing Locally
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. Add a local MCP Server config that points to your built index.
{
"mcpServers": {
"elasticsearch-mcp-server-local": {
"command": "node",
"args": [
"/path/to/your/project/dist/index.js"
],
"env": {
"ES_URL": "your-elasticsearch-url",
"ES_API_KEY": "your-api-key"
}
}
}
}
Debugging with MCP Inspector
If you want to inspect requests and responses, enable the MCP Inspector in your environment.
ES_URL=your-elasticsearch-url ES_API_KEY=your-api-key npm run inspector
You should see the inspector start and the proxy listening, providing a debugging URL for you to access.
Available tools
list_indices
List all available Elasticsearch indices.
get_mappings
Get field mappings for a specific Elasticsearch index.
search
Perform a search on Elasticsearch using a provided query.
get_shards
Get shard information for all or specific indices.