Skip to main content
Glama
Elasticsearch MCP Server

Elasticsearch MCP Server

by jesee

Elasticsearch MCP Server

Elasticsearch MCP 服务器,支持 Claude Code、VSCode (Cline)、Cursor 等工具。

安装

npm install -g es-mcp-server

Related MCP server: Elastic MCP

配置

环境变量

变量

说明

默认值

ES_HOST

ES 地址

localhost:9200

ES_USERNAME

用户名

-

ES_PASSWORD

密码

-

ES_API_KEY

API Key

-

Claude Code 配置

{
  "mcpServers": {
    "elasticsearch": {
      "command": "es-mcp-server",
      "env": {
        "ES_HOST": "localhost:9200"
      }
    }
  }
}

VSCode (Cline) 配置

路径: ~/.config/Code/User/globalStorage/hybridtalentcomputing.cline-chinese/settings/cline_chinese_mcp_settings.json

{
  "mcpServers": {
    "elasticsearch": {
      "command": "es-mcp-server",
      "env": {
        "ES_HOST": "localhost:9200"
      }
    }
  }
}

Cursor 配置

{
  "mcpServers": {
    "elasticsearch": {
      "command": "es-mcp-server",
      "env": {
        "ES_HOST": "localhost:9200"
      }
    }
  }
}

可用工具

工具

说明

es_health_check

集群健康检查

es_list_indices

列出所有索引

es_create_index

创建索引

es_delete_index

删除索引

es_index_document

索引文档

es_get_document

获取文档

es_search

搜索文档

es_update_document

更新文档

es_delete_document

删除文档

es_cluster_info

集群信息

使用示例

搜索文档

{
  "index": "user_info",
  "query": {
    "match": { "content": "总监" }
  },
  "size": 10
}

索引文档

{
  "index": "products",
  "document": {
    "name": "iPhone",
    "price": 999
  }
}

许可证

MIT

Available Tools

10 tools
es_cluster_infoC

Get cluster information

Inputs: no named parameters.

es_create_indexC

Create a new index

Inputs: index (required), mappings, settings.

es_delete_documentC

Delete a document

Inputs: id (required), index (required).

es_delete_indexC

Delete an index

Inputs: index (required).

es_get_documentC

Get a document by ID

Inputs: id (required), index (required).

es_health_checkC

Check Elasticsearch cluster health

Inputs: no named parameters.

es_index_documentD

Index a document

Inputs: index (required), document (required), id.

es_list_indicesB

List all indices in the cluster

Inputs: pattern.

es_update_documentD

Update a document

Inputs: id (required), index (required), document (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 10 tools

    Disambiguation5/5

    Each tool has a distinct, non-overlapping purpose: cluster info/health, index CRUD, document CRUD, listing, and search. No ambiguity exists.

    Naming Consistency5/5

    All tools follow a consistent 'es_verb_noun' pattern in snake_case, making them predictable and easy to understand (e.g., es_create_index, es_delete_document).

    Tool Count5/5

    With 10 tools, the set is well-scoped for basic Elasticsearch operations. Each tool serves a specific function, and the count is neither too few nor excessive.

    Completeness4/5

    The tools cover essential CRUD for indices and documents, plus cluster health and search. Missing operations like bulk indexing or mapping updates are minor gaps, but core workflows are supported.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      A
      maintenance
      Facilitates 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.
      20
      317
      Apache 2.0
    • F
      license
      B
      quality
      D
      maintenance
      Connects to Elasticsearch clusters through the Model Context Protocol, enabling natural language querying and management of Elasticsearch data. Provides tools to search indices, list available indices, and retrieve index mappings.
      3
      -
    • F
      license
      B
      quality
      Not graded
      maintenance
      Provides comprehensive tools for managing Elasticsearch clusters, including security management, search operations, and index administration. It enables users to monitor cluster health, handle InfoSec tasks, and execute complex queries using Elasticsearch Query DSL and ES|QL.
      37
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides tools to query Elasticsearch indices, retrieve mappings, execute searches, and get cluster health stats.
      4
      MIT