Kestra Python MCP Server

Kestra Python MCP Server

Run Kestra orchestrations with Model Context Protocol support via Docker.

16
Stars
3
Forks
16
Watchers
3
Issues
Kestra Python MCP Server enables integration of the Kestra workflow orchestration platform with environments that use the Model Context Protocol (MCP). It provides a Dockerized MCP server for managing workflows, executions, files, namespaces, and more, with support for both Open-Source (OSS) and Enterprise Edition (EE) setups. The server can be configured easily using environment variables and is compatible with tools like VS Code and Claude, making model-driven orchestration accessible and modular.

Key Features

Runs as an MCP server for Kestra via Docker
Supports both OSS and Enterprise authentication options
Configurable tool access including enabling/disabling enterprise features
Environment variable-based configuration
Integration with popular platforms like VS Code and Claude
Automated handling of workflows, executions, and files
Backfill and flow management capabilities
Replay, restart, resume execution options
Namespace and key-value store operations
Ready-to-use Docker image for rapid deployment

Use Cases

Automated orchestration of data pipelines using Kestra with MCP
Integration of workflow execution in AI-driven environments
Centralized execution and management of processes via Docker
Enabling developers to use Kestra workflow management in IDEs with MCP
Seamlessly switching between OSS and EE authentication models
Disabling or enabling enterprise features as needed for compliance
Managing files and namespaces in automated workflows
Quick deployment of MCP-compliant workflow servers
Improved auditing and control of workflow backfill and restarts
Running batch or scheduled jobs orchestrated by Kestra

README

Kestra Python MCP Server

You can run the MCP Server in a Docker container. This is useful if you want to avoid managing Python environments or dependencies on your local machine.

Using Kestra AI Agent

See kestra_mcp_docker.

Minimal configuration for OSS users

Paste the following configuration into your MCP settings (e.g., Cursor, Claude, or VS Code):

json
{
  "mcpServers": {
    "kestra": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--pull",
        "always",
        "-e",
        "KESTRA_BASE_URL",
        "-e",
        "KESTRA_TENANT_ID",
        "-e",
        "KESTRA_MCP_DISABLED_TOOLS",
        "-e",
        "KESTRA_MCP_LOG_LEVEL",
        "-e",
        "KESTRA_USERNAME",
        "-e",
        "KESTRA_PASSWORD",
        "ghcr.io/kestra-io/mcp-server-python:latest"
      ],
      "env": {
        "KESTRA_BASE_URL": "http://host.docker.internal:8080/api/v1",
        "KESTRA_TENANT_ID": "main",
        "KESTRA_MCP_DISABLED_TOOLS": "ee",
        "KESTRA_MCP_LOG_LEVEL": "ERROR",
        "KESTRA_USERNAME": "admin@kestra.io",
        "KESTRA_PASSWORD": "your_password"
      }
    }
  }
}

Minimal configuration for EE users

json
{
  "mcpServers": {
    "kestra": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--pull",
        "always",
        "-e", "KESTRA_BASE_URL",
        "-e", "KESTRA_API_TOKEN",
        "-e", "KESTRA_TENANT_ID",
        "-e", "KESTRA_MCP_LOG_LEVEL",
        "ghcr.io/kestra-io/mcp-server-python:latest"
      ],
      "env": {
        "KESTRA_BASE_URL": "http://host.docker.internal:8080/api/v1",
        "KESTRA_API_TOKEN": "<your_kestra_api_token>",
        "KESTRA_TENANT_ID": "main",
        "KESTRA_MCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}

Detailed Configuration using Docker

json
{
  "mcpServers": {
    "kestra": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--pull",
        "always",
        "-e", "KESTRA_BASE_URL",
        "-e", "KESTRA_API_TOKEN",
        "-e", "KESTRA_TENANT_ID",
        "-e", "KESTRA_USERNAME",
        "-e", "KESTRA_PASSWORD",
        "-e", "KESTRA_MCP_DISABLED_TOOLS",
        "-e", "KESTRA_MCP_LOG_LEVEL",
        "ghcr.io/kestra-io/mcp-server-python:latest"
      ],
      "env": {
        "KESTRA_BASE_URL": "http://host.docker.internal:8080/api/v1",
        "KESTRA_API_TOKEN": "<your_kestra_api_token>",
        "KESTRA_TENANT_ID": "main",
        "KESTRA_USERNAME": "admin",
        "KESTRA_PASSWORD": "admin",
        "KESTRA_MCP_DISABLED_TOOLS": "ee",
        "KESTRA_MCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}

Notes:

  • Replace <your_kestra_api_token>, <your_google_api_key>, and <your_helicone_api_key> with your actual credentials.
  • For OSS installations, you can use KESTRA_USERNAME and KESTRA_PASSWORD instead of KESTRA_API_TOKEN.
  • To disable Enterprise Edition tools in OSS, set KESTRA_MCP_DISABLED_TOOLS=ee.
  • The host.docker.internal hostname allows the Docker container to access services running on your host machine (such as the Kestra API server on port 8080). This works on macOS and Windows. On Linux, you may need to use the host network mode or set up a custom bridge.
  • The -e flags pass environment variables from your MCP configuration into the Docker container.

Available Tools

  • πŸ”„ backfill
  • βš™οΈ ee (Enterprise Edition tools)
  • ▢️ execution
  • πŸ“ files
  • πŸ”€ flow
  • πŸ—οΈ kv
  • 🌐 namespace
  • πŸ” replay
  • ♻️ restart
  • ⏸️ resume

Note: The ee tool group contains Enterprise Edition specific functionality and is only available in EE/Cloud editions. For OSS users, you can disable EE tools by adding KESTRA_MCP_DISABLED_TOOLS=ee to your .env file.

Optionally, you can include KESTRA_MCP_DISABLED_TOOLS in your .env file listing the tools that you prefer to disable. For example, if you want to disable Namespace Files tools, add this to your .env file:

dotenv
KESTRA_MCP_DISABLED_TOOLS=files

To disable multiple tools, separate them with comma:

dotenv
KESTRA_MCP_DISABLED_TOOLS=ee

Logging Configuration

By default, the MCP server only logs ERROR level messages to minimize noise. You can control the logging level using the KESTRA_MCP_LOG_LEVEL environment variable:

dotenv
# Only show ERROR messages (default)
KESTRA_MCP_LOG_LEVEL=ERROR

# Show WARNING and ERROR messages
KESTRA_MCP_LOG_LEVEL=WARNING

# Show INFO, WARNING, and ERROR messages
KESTRA_MCP_LOG_LEVEL=INFO

# Show all messages including DEBUG
KESTRA_MCP_LOG_LEVEL=DEBUG

When using Docker, add the environment variable to your MCP configuration:

json
{
  "mcpServers": {
    "kestra": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--pull",
        "always",
        "-e", "KESTRA_BASE_URL",
        "-e", "KESTRA_MCP_LOG_LEVEL",
        "ghcr.io/kestra-io/mcp-server-python:latest"
      ],
      "env": {
        "KESTRA_BASE_URL": "http://host.docker.internal:8080/api/v1",
        "KESTRA_MCP_LOG_LEVEL": "ERROR"
      }
    }
  }
}

Local development

To run the MCP Server for Kestra locally (e.g. if you want to extend it with new tools), make sure to create a virtual environment first:

bash
uv venv --python 3.13
uv pip install -r requirements.txt

Create an .env file in the root directory of the project similar to the .env_example file. For OSS installations, you can use basic authentication with KESTRA_USERNAME and KESTRA_PASSWORD. For EE/Cloud installations, use KESTRA_API_TOKEN. To disable Enterprise Edition tools in OSS, add KESTRA_MCP_DISABLED_TOOLS=ee to your .env file.

Then, follow the instructions below explaining how to test your local server in Cursor, Windsurf, VS Code or Claude Desktop.


Usage in Cursor, Windsurf, VS Code or Claude Desktop

To use the Python MCP Server with Claude or modern IDEs, first check what is the path to uv on your machine:

bash
which uv

Copy the path returned by which uv and paste it into the command section. Then, replace the --directory by the path where you cloned the Kestra MCP Server repository. For example:

json
{
  "mcpServers": {
    "kestra": {
      "command": "/Users/annageller/.local/bin/uv",
      "args": [
        "--directory",
        "/Users/annageller/gh/mcp-server-python/src",
        "run",
        "server.py"
      ]
    }
  }
}

You can paste that in the Cursor MCP settings or Claud Developer settings.

VS Code setup

In your VS Code project directory, add a folder .vscode and within that folder, create a file called mcp.json. Paste your MCP configuration into that file (note that in VS Code, the key is servers instead of mcpServers):

json
{
  "servers": {
    "kestra": {
      "command": "/Users/annageller/.local/bin/uv",
      "args": [
        "--directory",
        "/Users/annageller/gh/mcp-server-python/src",
        "run",
        "server.py"
      ]
    }
  }
}

A small Start button should show up, click on it to start the server.

img.png

If you now navigate to the GitHub Copilot tab and switch to the Agent mode, you will be able to directly interact with the Kestra MCP Server tools. For example, try typing the prompt: "List all flows in the tutorial namespace".

img_1.png

If you click on continue, you will see the result of the command in the output window.

img_2.png

FAQ

Question: Do I have to manually start the server as an always-on process?

No, you don't have to run the server manually, as when using the stdio transport, the AI IDEs/chat-interfaces (Cursor, Windsurf, VS Code or Claude Desktop) launch the MCP server as a subprocess. This subprocess communicates with AI IDEs via JSON-RPC messages over standard input and output streams. The server receives messages through stdin and sends responses through stdout.

Question: Do I have to manually activate the virtual environment for the MCP Server?

No, because we use uv. Unlike traditional Python package managers, where virtual environment activation modifies shell variables like PATH, uv directly uses the Python interpreter and packages from the .venv directory without requiring environment variables to be set first. Just make sure you have created a uv virtual environment with uv venv and installed the required packages with uv pip install as described in the previous section.

Star History

Star History Chart

Repository Owner

kestra-io
kestra-io

Organization

Repository Details

Language Python
Default Branch main
Size 553 KB
Contributors 2
License Apache License 2.0
MCP Verified Nov 11, 2025

Programming Languages

Python
99.9%
Dockerfile
0.1%

Tags

Topics

ai-agents mcp-server orchestration python

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • mcp-server-docker

    mcp-server-docker

    Natural language management of Docker containers via Model Context Protocol.

    mcp-server-docker enables users to manage Docker containers using natural language instructions through the Model Context Protocol. It allows composing, introspecting, and debugging containers, as well as managing persistent Docker volumes. The tool is suitable for server administrators, tinkerers, and AI enthusiasts looking to leverage LLM capabilities for Docker management. Integration with tools like Claude Desktop and Docker ensures flexible deployment and easy connectivity to Docker engines.

    • ⭐ 648
    • MCP
    • ckreiling/mcp-server-docker
  • docker-mcp

    docker-mcp

    A powerful MCP server for seamless Docker container and compose stack management.

    docker-mcp is a Model Context Protocol (MCP) server that enables robust Docker container and compose stack management via Claude AI. It offers easy installation through Smithery or manual setup, supporting container creation, Docker Compose stack deployment, log retrieval, and monitoring. Integration with the Claude Desktop app is straightforward, and the included MCP Inspector aids debugging. This tool simplifies Docker operations for automation and AI model interactions.

    • ⭐ 419
    • MCP
    • QuantGeekDev/docker-mcp
  • Stape MCP Server

    Stape MCP Server

    An MCP server implementation for integrating Stape with AI model context protocols.

    Stape MCP Server provides an implementation of the Model Context Protocol server tailored for the Stape platform. It enables secure and standardized access to model context capabilities, allowing integration with tools such as Claude Desktop and Cursor AI. Users can easily configure and authenticate MCP connections using provided configuration samples, while managing context and credentials securely. The server is open source and maintained by the Stape Team under the Apache 2.0 license.

    • ⭐ 4
    • MCP
    • stape-io/stape-mcp-server
  • QuantConnect MCP Server

    QuantConnect MCP Server

    Official bridge for secure AI access to QuantConnect's algorithmic trading cloud platform

    QuantConnect MCP Server enables artificial intelligence systems such as Claude and OpenAI to interface with QuantConnect's cloud platform through an official, secure, and dockerized implementation of the Model Context Protocol (MCP). It facilitates automated project management, strategy writing, backtesting, and live deployment by exposing a comprehensive suite of API tools for users with valid access credentials. As the maintained official version, it ensures security, easy deployment, and cross-platform compatibility for advanced algorithmic trading automation.

    • ⭐ 50
    • MCP
    • QuantConnect/mcp-server
  • Edge Delta MCP Server

    Edge Delta MCP Server

    Seamlessly integrate Edge Delta APIs into the Model Context Protocol ecosystem.

    Edge Delta MCP Server is a Model Context Protocol server enabling advanced integration with Edge Delta APIs. It allows developers and tools to extract, analyze, and automate observability data from Edge Delta through standardized MCP interfaces. The server supports AI-powered applications and automations, and can be deployed via Docker for straightforward operation. The Go API is available for experimental programmatic access.

    • ⭐ 5
    • MCP
    • edgedelta/edgedelta-mcp-server
  • Portainer MCP

    Portainer MCP

    Connect AI assistants securely to Portainer environments using the Model Context Protocol.

    Portainer MCP is an implementation of the Model Context Protocol (MCP) designed for seamless integration between AI assistants and Portainer-managed container environments. It enables management of Portainer resources and allows execution of Docker and Kubernetes commands through AI interfaces in a secure, standardized manner. The tool provides direct protocol-based access to environment data, facilitating automation and operational insights for container infrastructures.

    • ⭐ 81
    • MCP
    • portainer/portainer-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results