
Kestra 的 Python MCP 服务器——你可以将其作为 Kestra AI 代理的工具使用
概览
你可以在 Docker 容器中运行 MCP 服务器。如果你想避免管理本地机器上的 Python 环境或依赖,这很有用。 将以下配置粘贴到你的MCP设置中(例如,光标、Claude或VS Code): - 用你的实际凭证替换 、 和 。- 对于 OSS 安装,你可以用 KESTRA_USERNAME 和 KESTRA_PASSWORD 代替 KESTRA_API_TOKEN。- 要在 OSS 中禁用企业版工具,请设置 KESTRA_MCP_DISABLED_TOOLS=ee。- host.docker.internal 主机名允许 Docker 容器访问你主机上运行的服务(例如端口 8080 上的 Kestra API 服务器)。这适用于 macOS 和 Windows。在 Linux 上,你可能需要使用主机网络模式或设置自定义桥接器。- -e 标志将环境变量从你的 MCP 配置传递到 Docker 容器。
概述(AI 翻译)
Kestra Python MCP 服务器
你可以在 Docker 容器中运行 MCP 服务器。如果你想避免管理本地机器上的 Python 环境或依赖,这很有用。
使用 Kestra AI 代理
请参见kestra_mcp_docker。
开源软件用户的最小配置
将以下配置粘贴到你的MCP设置中(例如,光标、Claude或VS Code):
EE 用户的最小配置
使用 Docker 详细配置
注释:
- 将
、和替换为你的真实凭证。 - 对于开源软件安装,你可以使用
KESTRA_USERNAME和KESTRA_PASSWORD代替KESTRA_API_TOKEN。 - 要在 OSS 中禁用企业版工具,设置
KESTRA_MCP_DISABLED_TOOLS=ee。 host.docker.internal主机名允许 Docker 容器访问运行在你主机上的服务(例如端口 8080 上的 Kestra API 服务器)。这适用于 macOS 和 Windows。在 Linux 上,你可能需要使用主机网络模式或设置自定义桥接器。-e标志将环境变量从你的 MCP 配置传递到 Docker 容器。
Kestra 版本支持
Kestra 1.x 和 Kestra 2 都适用。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 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):
{
"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": "[email protected]",
"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_LOG_LEVEL",
"ghcr.io/kestra-io/mcp-server-python:latest"
],
"env": {
"KESTRA_BASE_URL": "http://host.docker.internal:8080/api/v1",
"KESTRA_API_TOKEN": "",
"KESTRA_TENANT_ID": "main",
"KESTRA_MCP_LOG_LEVEL": "ERROR"
}
}
}
}
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", "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": "",
"KESTRA_TENANT_ID": "main",
"KESTRA_USERNAME": "admin",
"KESTRA_PASSWORD": "admin",
"KESTRA_MCP_DISABLED_TOOLS": "ee",
"KESTRA_MCP_LOG_LEVEL": "ERROR"
}
}
}
}
Notes:
- Replace
,, and `` with your actual credentials. - For OSS installations, you can use
KESTRA_USERNAMEandKESTRA_PASSWORDinstead ofKESTRA_API_TOKEN.
安装
docker 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配置
{
"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": "[email protected]",
"KESTRA_PASSWORD": "your_password"
}
}
}
}