The Kestra Python MCP Server provides an interface between Kestra workflow orchestration and AI coding assistants through the Model Context Protocol (MCP). This server allows AI tools to interact with your Kestra workflows directly, enabling operations like listing flows, managing executions, and working with namespace files.
The easiest way to run the Kestra MCP Server is using Docker, which eliminates the need to manage Python dependencies on your local machine.
Add this configuration to your MCP settings in your AI coding assistant (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"
}
}
}
}
If you have Basic Auth enabled, use this configuration instead:
{
"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",
"KESTRA_USERNAME": "[email protected]",
"KESTRA_PASSWORD": "your_password"
}
}
}
}
{
"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"
}
}
}
}
host.docker.internal
hostname allows the Docker container to access services on your host machine. This works on macOS and Windows by default. On Linux, you may need to use host network mode or set up a custom bridge.<your_kestra_api_token>
with your actual Kestra API token.KESTRA_USERNAME
and KESTRA_PASSWORD
instead of KESTRA_API_TOKEN
.KESTRA_MCP_DISABLED_TOOLS=ee
to disable Enterprise Edition tools in OSS installations.The MCP server provides access to various Kestra functionality through tool groups:
You can disable specific tools by setting the KESTRA_MCP_DISABLED_TOOLS
environment variable:
KESTRA_MCP_DISABLED_TOOLS=files
To disable multiple tools, separate them with commas:
KESTRA_MCP_DISABLED_TOOLS=ee,files
If you want to run the MCP server locally for development or extension:
uv venv --python 3.13
uv pip install -r requirements.txt
Create an .env
file in the project root directory with your Kestra connection details.
To use your local MCP server with an AI coding assistant, first find your uv path:
which uv
Then configure your AI coding assistant with this path:
{
"mcpServers": {
"kestra": {
"command": "/path/to/your/uv",
"args": [
"--directory",
"/path/to/your/mcp-server-python/src",
"run",
"server.py"
]
}
}
}
For VS Code integration:
.vscode
folder in your project directorymcp.json
inside that folderservers
instead of mcpServers
):{
"servers": {
"kestra": {
"command": "/path/to/your/uv",
"args": [
"--directory",
"/path/to/your/mcp-server-python/src",
"run",
"server.py"
]
}
}
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "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"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"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"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"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"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect