MCP.so
登录
服务器

Elasticsearch MCP 服务器

@macgaf

elasticsearch mcp server and client, supports es7 and es8, based on Model Context Protocol python sdk

概览

What is Elasticsearch MCP 服务器?

Elasticsearch MCP 服务器 is a tool server based on the Model Context Protocol (MCP) for Elasticsearch. It provides capabilities for listing indices, retrieving field mappings, executing search queries, and checking cluster health and stats. It is designed for developers and AI assistants that need to interact with Elasticsearch data.

How to use Elasticsearch MCP 服务器?

Install via pip (pip install es-mcp-server). Configure connection using environment variables (e.g., ES_HOST, ES_PORT, ES_API_KEY). Start the server in stdio mode (default) or SSE mode using uvx es-mcp-server with optional flags like --host, --port, --es-version, and --transport sse. Integrate with Claude Desktop by adding a stanza in its MCP configuration file.

Key features of Elasticsearch MCP 服务器

  • List all indices in an Elasticsearch cluster
  • Retrieve detailed field mappings for an index
  • Execute search queries with highlight support
  • Fetch cluster health status
  • Obtain cluster runtime statistics

Use cases of Elasticsearch MCP 服务器

  • Provide an AI assistant (e.g., Claude Desktop) with live Elasticsearch query capabilities
  • Allow developers to quickly inspect index schemas without a separate client
  • Monitor Elasticsearch cluster health and stats through natural language
  • Run ad-hoc searches and retrieve highlighted results for data exploration

FAQ from Elasticsearch MCP 服务器

Does it support both Elasticsearch 7 and 8?

Yes, the server works with both Elasticsearch 7 and 8 API versions. The version is configured via the ES_VERSION environment variable (default 8).

What transport modes are available?

The server supports stdio mode (default, for desktop integration) and SSE mode (for standalone web server). Use --transport sse to start in SSE mode.

How do I configure authentication?

Authentication can be set via environment variables: ES_USERNAME and ES_PASSWORD for basic auth, or ES_API_KEY for API key auth. SSL settings are controlled by ES_USE_SSL and ES_VERIFY_CERTS.

Can this server be used with Claude Desktop?

Yes. Claude Desktop can connect via MCP using either stdio mode (with the uvx command and environment variables) or SSE mode (by providing the SSE server URL).

What are the main dependencies?

The server requires Python and the es-mcp-server package (available on PyPI). It relies on the Elasticsearch client library for connectivity and the MCP Python SDK for protocol handling.

来自「数据库」的更多内容