Skip to main content
Glama

Elasticsearch MCP Server

by da1y

Elasticsearch

用于 Elasticsearch 集群的模型上下文协议 (LLM) 服务器。使 LLM 能够管理索引并执行查询。

重要提示:这主要是通过从 postgres mcp 服务器向 claude 提供示例来构建的。

成分

工具

  • 搜索

    • 针对索引执行搜索查询

    • 输入:

      • index (字符串):目标索引名称

      • query (对象):Elasticsearch 查询 DSL

    • 返回搜索结果

  • 创建索引

    • 创建新的 Elasticsearch 索引

    • 输入:

      • index (字符串):索引名称

      • mappings (对象,可选):索引映射配置

      • settings (对象,可选):索引设置配置

  • 列表索引

    • 列出所有可用索引

    • 无需输入

    • 返回索引信息数组

  • 索引文档

    • 索引文档

    • 输入:

      • index (字符串):目标索引名称

      • id (字符串,可选):文档 ID

      • document (对象):文档内容

    • 返回索引操作结果

资源

服务器提供每个索引的映射信息:

  • 索引映射elasticsearch://<host>/<index>/schema

    • JSON 映射信息

    • 字段名称、类型和配置

    • 从元数据中自动发现

Related MCP server: MongoDB MCP Server for LLMs

与 Claude Desktop 一起使用

添加到claude_desktop_config.json的“mcpServers”部分:

{ "mcpServers": { "elasticsearch": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-elasticsearch", "http://localhost:9200" ] } } }

Docker 一个运行容器的内衬:

docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:8.11.3

将 URL 替换为您的 Elasticsearch 端点。

执照

采用 MIT 许可证。可免费使用、修改和分发。详情请参阅许可证文件。

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

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/da1y/mcp-server-elasticsearch'

If you have feedback or need assistance with the MCP directory API, please join our Discord server