Elastic MCP
Enables querying, managing, and analyzing Elasticsearch data through natural language interactions, providing tools to search indices, list available indices, and retrieve index mappings.
Click on "Install 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., "@Elastic MCPsearch the logs index for recent error messages"
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.
Demo
https://github.com/user-attachments/assets/907c3f6f-807c-4805-879a-649c74804c29
Elastic MCP
Connect to your Elasticsearch cluster from any MCP-compatible client (such as Claude Desktop) using the Model Context Protocol (MCP). This server exposes your Elasticsearch data and operations via the MCP interface, enabling agents and applications to query, manage, and analyze your data through natural language interactions.
1. Setup
Prerequisites
Python 3.8+
Elasticsearch running and accessible
uv or
pipfor dependency management
Install dependencies
Using uv package manager:
uv pip install -r requirements.txtRelated MCP server: Elasticsearch MCP Server
2. Running the MCP Server
Test using MCP Inspector
ELASTIC_URL="http://localhost:9200" ELASTIC_USERNAME="your_username" ELASTIC_PASSWORD="your_password" fastmcp dev tools/elastic_tool.pyor
Run the mcp server by
ELASTIC_URL="http://localhost:9200" ELASTIC_USERNAME="elastic" ELASTIC_PASSWORD="hKsXqDsd" python3 tools/elastic_tool.pyand run mcp client in another terminal by
python3 mcp_client.pyor
Add to the Claude Desktop by editing the claude_desktop_config.json and add the following code snippet
{
"mcpServers": {
"Elastic MCP Server": {
"command": "uv",
"args": [
"run",
"--with-requirements",
"<absolute path to requirements.txt>",
"fastmcp",
"run",
"<absolute path to elastic_tool.py>"
],
"env": {
"ELASTIC_URL": "http://localhost:9200",
"ELASTIC_USERNAME": "your_username",
"ELASTIC_PASSWORD": "your_password"
}
}
}
}
3. Tools Provided
search_index: Search an index with a query string.
list_indices: List all indices (excluding system indices).
get_index_mappings: Get mappings for a specific index.
4. License
MIT License
5. Notes
For production, do not hardcode credentials.
For more info on MCP, see FastMCP documentation.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceFacilitates interaction with Elasticsearch clusters by allowing users to perform index operations, document searches, and cluster management via a Model Context Protocol server and natural language commands.Last updated20301Apache 2.0
- AlicenseBqualityCmaintenanceConnects agents to Elasticsearch data using the Model Context Protocol, allowing natural language interaction with Elasticsearch indices through MCP Clients like Claude Desktop and Cursor.Last updated1110322MIT
- AlicenseBqualityDmaintenanceConnects to Elasticsearch databases using the Model Context Protocol, allowing users to query and interact with their Elasticsearch indices through natural language conversations.Last updated428Apache 2.0
- Alicense-qualityDmaintenanceConnects agents to Elasticsearch data using the Model Context Protocol, allowing natural language interaction with Elasticsearch indices through tools for listing indices, getting field mappings, performing searches, and viewing shard information.Last updated1,631Apache 2.0
Related MCP Connectors
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
A Model Context Protocol server for Wix AI tools
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Akhilvis/elastic-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server