Skip to content

Conversation

@TocharianOU
Copy link
Contributor

Description

Adding Elasticsearch Enhanced MCP Server by TocharianOU to the community servers list. This is an advanced MCP server implementation that provides comprehensive Elasticsearch interaction with multi-version support and intelligent features.

Server Details

Key Features

Multi-Version Support (ES 5.x - 9.x)

  • Automatic version detection and client selection
  • Dynamic feature availability based on detected version
  • Version-specific adapters for API compatibility
  • Seamless support from legacy ES 5.x to future ES 9.x+

Intelligent Token Management

  • Smart token calculation using tiktoken
  • Automatic response truncation with helpful suggestions
  • Configurable token limits (default: 20,000 tokens)
  • Optional bypass for critical operations

Context-Engineered Analysis

  • Comprehensive index analysis with health metrics
  • Intelligent mapping comparison across indices
  • Shard distribution and rebalancing insights
  • Data stream lifecycle management
  • Field-level metadata and statistics

Comprehensive Tool Suite

  • list_indices: List all indices with health and metrics
  • get_mappings: Retrieve and analyze field mappings
  • es_search: Full-text search with highlighting
  • execute_es_api: Direct API access for any ES endpoint
  • get_shards: Shard allocation and health analysis
  • list_data_streams (ES 7.9+): Data stream management

Motivation and Context

This server enhances the existing Elasticsearch offerings in the MCP ecosystem with:

  1. Broader Compatibility: Supports ES 5.x through 9.x with automatic version detection
  2. Production-Ready Features: Token limits, error handling, and security best practices
  3. AI-Optimized: Designed for LLM interactions with context-aware responses
  4. Enterprise-Grade: SSL/TLS support, multiple auth methods, comprehensive logging

While there are existing Elasticsearch MCP servers, this implementation provides:

  • TocharianOU version includes full version support (ES 5.x-9.x) and comprehensive ES API access
  • Intelligent token optimization to prevent context overflow
  • Advanced analysis tools for indices, mappings, and shards
  • Version-specific feature detection and tool registration

How Has This Been Tested?

The server has been extensively tested with:

  • Claude Desktop as the primary MCP client
  • Multiple Elasticsearch versions (5.6, 6.8, 7.17, 8.x)
  • Various authentication methods (API key, username/password)
  • SSL/TLS connections with custom CA certificates
  • Large result sets with token limit enforcement

Test scenarios covered:

  • Multi-index search and aggregations
  • Mapping analysis and field comparison
  • Shard health monitoring and rebalancing
  • Data stream lifecycle management
  • Version compatibility across ES 5.x-9.x
  • Token limit handling for large responses

Breaking Changes

No breaking changes as this is a new server addition to the community list.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follow MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client (Claude Desktop)
  • My code follows the repository's style guidelines
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options
  • Server is available on NPM for easy installation
  • Comprehensive README with setup instructions
  • Apache 2.0 license compliance

Additional Context

Installation

npm install -g @tocharian/mcp-server-elasticsearch-sl
# or use directly
npx @tocharian/mcp-server-elasticsearch-sl

Configuration Example

{
  "mcpServers": {
    "elasticsearch-enhanced": {
      "command": "npx",
      "args": ["-y", "@tocharian/mcp-server-elasticsearch-sl"],
      "env": {
        "ES_URL": "https://your-es-host:9200",
        "ES_USERNAME": "elastic",
        "ES_PASSWORD": "your-password",
        "NODE_TLS_REJECT_UNAUTHORIZED": "0"
      }
    }
  }
}

Why This Adds Value to the MCP Ecosystem

  1. Fills Version Gap: First MCP server with official ES 5.x-9.x support
  2. Production-Ready: Built with enterprise requirements in mind
  3. AI-Native: Token management and context optimization for LLM interactions
  4. Active Maintenance: Regular updates and community support
  5. Comprehensive Documentation: Both English and Chinese docs available

The server complements existing Elasticsearch implementations by providing broader version support and advanced features specifically designed for AI agent interactions.


Package Details:

Add advanced Elasticsearch MCP server with comprehensive features:

- Multi-version support (ES 5.x-9.x) with automatic version detection
- Intelligent token optimization and smart summarization
- Context-engineered analysis for AI interactions
- Comprehensive tools: indices, mappings, shards, data streams
- Dynamic client loading based on detected ES version
- Version-specific adapters for API compatibility

This server enhances the existing Elasticsearch offerings with:
- Broader version compatibility
- Advanced token management for large datasets
- Intelligent feature detection and tool registration
- Optimized for AI agent interactions

Package: @tocharian/mcp-server-elasticsearch-sl
Repository: https://github.com/TocharianOU/mcp-server-elasticsearch-sl
NPM: https://www.npmjs.com/package/@tocharian/mcp-server-elasticsearch-sl
@koic
Copy link
Member

koic commented Jan 22, 2026

Since #3046, new entries are no longer added to the README's third-party server list. Going forward, please consider registering it in the MCP Registry. Thank you.

@koic koic closed this Jan 22, 2026
@TocharianOU
Copy link
Contributor Author

Could you please explain why this PR was closed? I'd be happy to make any necessary changes to meet the requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants