Kestra Python MCP Server

Kestra Python MCP Server

A Machine Comprehension Protocol server that enables AI assistants to interact with Kestra workflows through natural language, supporting operations like flow management, executions, backfills, and other Kestra features.

Category
访问服务器

README

Kestra Python MCP Server

⚠️ Beta Notice: The Kestra MCP Server is currently in Beta and may undergo significant changes in the next few releases. API interfaces, tool names, and functionality may change without notice. We recommend testing thoroughly in development environments before using in production.

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.

Minimal configuration for OSS users

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

{
  "mcpServers": {
    "kestra": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--pull",
        "always",
        "-e", "KESTRA_BASE_URL",
        "-e", "KESTRA_TENANT_ID",
        "-e", "KESTRA_MCP_DISABLED_TOOLS",
        "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,codegen"
      }
    }
  }
}

If you enabled Basic Auth, use:

{
  "mcpServers": {
    "kestra": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "--pull",
        "always",
        "-e",
        "KESTRA_MCP_DISABLED_TOOLS",
        "-e",
        "KESTRA_BASE_URL",
        "-e",
        "KESTRA_TENANT_ID",
        "-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,codegen",
        "KESTRA_USERNAME": "admin@kestra.io",
        "KESTRA_PASSWORD": "your_password"
      }
    }
  }
}

Minimal configuration for EE users

{
  "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_DISABLED_TOOLS",
        "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_DISABLED_TOOLS": "codegen"
      }
    }
  }
}

Detailed Configuration using Docker

{
  "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", "GOOGLE_GEMINI_MODEL_AGENT",
        "-e", "GOOGLE_GEMINI_MODEL_CODEGEN",
        "-e", "GOOGLE_API_KEY",
        "-e", "HELICONE_API_KEY",
        "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",
        "GOOGLE_GEMINI_MODEL_AGENT": "gemini-2.0-flash",
        "GOOGLE_GEMINI_MODEL_CODEGEN": "gemini-2.5-flash",
        "GOOGLE_API_KEY": "<your_google_api_key>",
        "HELICONE_API_KEY": "<optional_for_codegen_tracing>"
      }
    }
  }
}

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
  • 🤖 codegen (Beta, needs Google Gemini API key)
  • ⚙️ 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:

KESTRA_MCP_DISABLED_TOOLS=files

To disable multiple tools, separate them with comma:

KESTRA_MCP_DISABLED_TOOLS=codegen,ee

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:

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:

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:

{
  "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):

{
  "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.


Using the Kestra MCP Server with Google Agent SDK (ADK)

To launch the Agent Development UI, run the following commands:

source .venv/bin/activate  
cd agents/
adk web

Then, select google-mcp-client from the agent dropdown and start sending your prompts to interact with Kestra MCP Server.

Best to enable the toggle "Token Streaming" to stream responses as they are generated.

For more information, check the official adk-python repository. For Java developers, there's an equivalent adk-java.


Using the Kestra MCP Server with OpenAI Agent SDK

Let's assume we have the following Kestra flows in the company namespace:

img.png

You can run the following command from the project root to see all those dependencies visualized as an ASCII graph:

uv run agents/openai-mcp-client/agent.py -p 'List dependencies for the namespace company'

You should see a similar output:

Here's the dependency graph for the namespace `company`:

flow1 ────▶ flow2
            flow2 ────▶ flow3b
                        flow3b ────▶ flow4
                                     flow4 ────▶ flow5
                                                 flow5 ────▶ flow6
                                                             flow6
            flow2 ────▶ flow3c
                        flow3c ────▶ flow4
                        flow3c ====▶ flow3
                                     flow3
            flow2 ────▶ flow3a
                        flow3a ────▶ flow4
goodbye
hello
scheduled_flow

**Legend:**
- `────▶` FLOW_TRIGGER  (flow-trigger-based dependency)
- `====▶` FLOW_TASK     (subflow-task-based dependency)

Flows listed without arrows have no dependencies within this namespace.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选