Skip to main content

Strawgate's Es Mcp project

Project description

strawgate_es_mcp

Strawgate's Unofficial MCP Server for Elasticsearch.

Use at your own risk. This is not an official Elasticsearch product. This MCP Server will probably break your Elasticsearch cluster. Do not use it.

This project provides a Model Context Protocol (MCP) server implemented in Python using fastmcp. Its primary purpose is to expose a wide range of Elasticsearch client functionalities as callable MCP tools, allowing for interaction with an Elasticsearch cluster via the MCP.

Features

  • Elasticsearch Tooling: Exposes numerous Elasticsearch client APIs as MCP tools, including:
    • CAT APIs (allocation, aliases, count, indices, nodes, shards, etc.)
    • Cluster APIs (health, state, stats)
    • Nodes APIs (info, stats)
    • Indices APIs (create/get data stream, stats, resolve index)
    • ILM and SLM APIs (get/explain lifecycle, get status, get stats)
    • Shutdown APIs (get node)
    • Search API
  • CLI: A CLI for the MCP Server.
  • Extensible: Easily add new Elasticsearch client methods as MCP tools or integrate with other MCP tools.
  • Sample Script: Includes sample_multisearch.py to demonstrate using the Elasticsearch Python client for multi-searches.
  • Testing: Includes unit tests for the exposed tools and sample scripts using pytest.

Setup in Windsurf

On the right in the cascade window press the hammer icon and add a server with the following configuration:

{
    "mcpServers": {
        "es-mcp": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/strawgate/py-mcp-collection.git#subdirectory=es-mcp",
                "es-mcp"
            ],
            "env": {
                "ES_HOST": "https://my-cloud-cluster:443",
                "ES_API_KEY": "MYCOOLAPIKEY"
            }
        }
    }
}

VS Code McpServer Usage

  1. Open the command palette (Ctrl+Shift+P or Cmd+Shift+P).
  2. Type "Settings" and select "Preferences: Open User Settings (JSON)".
  3. Add the following MCP Server configuration
{
    "mcp": {
        "servers": {
            "Es Mcp": {
                "command": "uvx",
                "args": [
                    "--from",
                    "git+https://github.com/strawgate/py-mcp-collection.git#subdirectory=es_mcp",
                    "es-mcp"
                ]
            }
        }
    }
}

Roo Code / Cline McpServer Usage

Simply add the following to your McpServer configuration. Edit the AlwaysAllow list to include the tools you want to use without confirmation.

    "es-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/strawgate/py-mcp-collection.git#subdirectory=es_mcp",
        "es-mcp"
      ]
    }

License

See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strawgate_es_mcp-0.5.1.tar.gz (65.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

strawgate_es_mcp-0.5.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file strawgate_es_mcp-0.5.1.tar.gz.

File metadata

  • Download URL: strawgate_es_mcp-0.5.1.tar.gz
  • Upload date:
  • Size: 65.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.20

File hashes

Hashes for strawgate_es_mcp-0.5.1.tar.gz
Algorithm Hash digest
SHA256 08daaa6e0085ee06125e08b29aa7fffe6729e17a4a1660000edc41842c75c31b
MD5 8df0c9ec8e2ef9fb8e34c71d36487417
BLAKE2b-256 6fae60a907e296a5d1c070c3167e0b1d4fc11a450af1c833d1dcf9885d0f4360

See more details on using hashes here.

File details

Details for the file strawgate_es_mcp-0.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for strawgate_es_mcp-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72797c681bb5551e6a936db2847e1dbd4545670d301e29b1cbcac38441f6d1f8
MD5 3caa540913491d7dcf777767e5e1e47e
BLAKE2b-256 f892c59e5631a3e749df5cfd07367159d14b5ce71bc10d613723ed6848d7a761

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page