Elasticsearch MCP Server
@FynnianB
Elasticsearch Integration with MCP - Multi-team and multi-environment support
Overview
What is Elasticsearch MCP Server?
It is a Model Context Protocol (MCP) server that integrates AI assistants with Elasticsearch, supporting multiple teams and environments. It enables searching exceptions, analyzing patterns, querying logs, and monitoring service health across teams in a secure, organized way.
How to use Elasticsearch MCP Server?
Install with npm install, create a teams-config.json file based on the example, and set environment variables (LOG_LEVEL, TEAMS_CONFIG_PATH, PORT, HTTP_PATH_PREFIX). Run in STDIO mode with npm run dev or in HTTP mode with npm run start-http.
Key features of Elasticsearch MCP Server?
- Multi-team and multi-environment Elasticsearch configuration
- Exception search with flexible filtering and frequency sorting
- Deep exception analysis with cause and solution suggestions
- Trend analysis for exception patterns and service health
- Log search with message, service, and time-range filters
- Supports API key and username/password authentication
Use cases of Elasticsearch MCP Server?
- Investigate the most frequent exceptions in a specific service
- Analyze trend changes for exceptions over the last 24 hours
- Debug by searching logs for a specific error message
- Monitor service health by reviewing exception patterns across environments
- Test Elasticsearch connectivity for a team and environment
FAQ from Elasticsearch MCP Server?
What authentication methods are supported?
API keys and username/password authentication.
What transport protocols are available?
HTTP+SSE (for web interfaces) and STDIO (for MCP clients).
How do I configure multiple teams?
Create a teams-config.json file with separate team objects, each containing team ID, environments, index patterns, and allowed operations.
What are the default search limits?
maxSearchResults defaults to 50; for search_exceptions, the limit parameter defaults to 20 and max is 100.
On which port does the HTTP server run?
The default port is 3000, configurable via the PORT environment variable.