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. See kestramcpdocker. Paste the following configuration into your MCP settings (e.g., Cursor, Claude, or VS Code): - Replace , , and with your actual credentials. - For OSS installations, you can use KESTRAUSERNAME and KESTRAPASSWORD instead of KE
Add this skill
npx mdskills install kestra-io/mcp-server-pythonComprehensive Docker-based MCP setup with clear authentication options and detailed IDE integration guides
1## Kestra Python MCP Server23You 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.45### Using Kestra AI Agent67See [kestra_mcp_docker](docs/flows/kestra_mcp_docker.yaml).89### Minimal configuration for OSS users1011Paste the following configuration into your MCP settings (e.g., Cursor, Claude, or VS Code):1213```json14{15 "mcpServers": {16 "kestra": {17 "command": "docker",18 "args": [19 "run",20 "-i",21 "--rm",22 "--pull",23 "always",24 "-e",25 "KESTRA_BASE_URL",26 "-e",27 "KESTRA_TENANT_ID",28 "-e",29 "KESTRA_MCP_DISABLED_TOOLS",30 "-e",31 "KESTRA_MCP_LOG_LEVEL",32 "-e",33 "KESTRA_USERNAME",34 "-e",35 "KESTRA_PASSWORD",36 "ghcr.io/kestra-io/mcp-server-python:latest"37 ],38 "env": {39 "KESTRA_BASE_URL": "http://host.docker.internal:8080/api/v1",40 "KESTRA_TENANT_ID": "main",41 "KESTRA_MCP_DISABLED_TOOLS": "ee",42 "KESTRA_MCP_LOG_LEVEL": "ERROR",43 "KESTRA_USERNAME": "admin@kestra.io",44 "KESTRA_PASSWORD": "your_password"45 }46 }47 }48}49```5051### Minimal configuration for EE users5253```json54{55 "mcpServers": {56 "kestra": {57 "command": "docker",58 "args": [59 "run",60 "-i",61 "--rm",62 "--pull",63 "always",64 "-e", "KESTRA_BASE_URL",65 "-e", "KESTRA_API_TOKEN",66 "-e", "KESTRA_TENANT_ID",67 "-e", "KESTRA_MCP_LOG_LEVEL",68 "ghcr.io/kestra-io/mcp-server-python:latest"69 ],70 "env": {71 "KESTRA_BASE_URL": "http://host.docker.internal:8080/api/v1",72 "KESTRA_API_TOKEN": "<your_kestra_api_token>",73 "KESTRA_TENANT_ID": "main",74 "KESTRA_MCP_LOG_LEVEL": "ERROR"75 }76 }77 }78}79```8081### Detailed Configuration using Docker8283```json84{85 "mcpServers": {86 "kestra": {87 "command": "docker",88 "args": [89 "run",90 "-i",91 "--rm",92 "--pull",93 "always",94 "-e", "KESTRA_BASE_URL",95 "-e", "KESTRA_API_TOKEN",96 "-e", "KESTRA_TENANT_ID",97 "-e", "KESTRA_USERNAME",98 "-e", "KESTRA_PASSWORD",99 "-e", "KESTRA_MCP_DISABLED_TOOLS",100 "-e", "KESTRA_MCP_LOG_LEVEL",101 "ghcr.io/kestra-io/mcp-server-python:latest"102 ],103 "env": {104 "KESTRA_BASE_URL": "http://host.docker.internal:8080/api/v1",105 "KESTRA_API_TOKEN": "<your_kestra_api_token>",106 "KESTRA_TENANT_ID": "main",107 "KESTRA_USERNAME": "admin",108 "KESTRA_PASSWORD": "admin",109 "KESTRA_MCP_DISABLED_TOOLS": "ee",110 "KESTRA_MCP_LOG_LEVEL": "ERROR"111 }112 }113 }114}115```116117**Notes:**118- Replace `<your_kestra_api_token>`, `<your_google_api_key>`, and `<your_helicone_api_key>` with your actual credentials.119- For OSS installations, you can use `KESTRA_USERNAME` and `KESTRA_PASSWORD` instead of `KESTRA_API_TOKEN`.120- To disable Enterprise Edition tools in OSS, set `KESTRA_MCP_DISABLED_TOOLS=ee`.121- 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.122- The `-e` flags pass environment variables from your MCP configuration into the Docker container.123124---125126### Available Tools127128- π backfill129- βοΈ ee (Enterprise Edition tools)130- βΆοΈ execution131- π files132- π flow133- ποΈ kv134- π namespace135- π replay136- β»οΈ restart137- βΈοΈ resume138139**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.140141Optionally, 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:142143```dotenv144KESTRA_MCP_DISABLED_TOOLS=files145```146147To disable multiple tools, separate them with comma:148149```dotenv150KESTRA_MCP_DISABLED_TOOLS=ee151```152153### Logging Configuration154155By 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:156157```dotenv158# Only show ERROR messages (default)159KESTRA_MCP_LOG_LEVEL=ERROR160161# Show WARNING and ERROR messages162KESTRA_MCP_LOG_LEVEL=WARNING163164# Show INFO, WARNING, and ERROR messages165KESTRA_MCP_LOG_LEVEL=INFO166167# Show all messages including DEBUG168KESTRA_MCP_LOG_LEVEL=DEBUG169```170171When using Docker, add the environment variable to your MCP configuration:172173```json174{175 "mcpServers": {176 "kestra": {177 "command": "docker",178 "args": [179 "run",180 "-i",181 "--rm",182 "--pull",183 "always",184 "-e", "KESTRA_BASE_URL",185 "-e", "KESTRA_MCP_LOG_LEVEL",186 "ghcr.io/kestra-io/mcp-server-python:latest"187 ],188 "env": {189 "KESTRA_BASE_URL": "http://host.docker.internal:8080/api/v1",190 "KESTRA_MCP_LOG_LEVEL": "ERROR"191 }192 }193 }194}195```196197---198199### Local development200201To 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:202203```bash204uv venv --python 3.13205uv pip install -r requirements.txt206```207208Create an `.env` file in the root directory of the project similar to the [.env_example](.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.209210Then, follow the instructions below explaining how to test your local server in Cursor, Windsurf, VS Code or Claude Desktop.211212---213214### Usage in Cursor, Windsurf, VS Code or Claude Desktop215216To use the Python MCP Server with Claude or modern IDEs, first check what is the path to uv on your machine:217218```bash219which uv220```221222Copy the path returned by `which uv` and paste it into the `command` section.223Then, replace the `--directory` by the path where you cloned the Kestra MCP Server repository. For example:224225```json226{227 "mcpServers": {228 "kestra": {229 "command": "/Users/annageller/.local/bin/uv",230 "args": [231 "--directory",232 "/Users/annageller/gh/mcp-server-python/src",233 "run",234 "server.py"235 ]236 }237 }238}239```240241You can paste that in the Cursor MCP settings or Claud Developer settings.242243### VS Code setup244245In 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`):246247```json248{249 "servers": {250 "kestra": {251 "command": "/Users/annageller/.local/bin/uv",252 "args": [253 "--directory",254 "/Users/annageller/gh/mcp-server-python/src",255 "run",256 "server.py"257 ]258 }259 }260}261```262263A small `Start` button should show up, click on it to start the server.264265266267If 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".268269270271If you click on continue, you will see the result of the command in the output window.272273274275### FAQ276277**Question: Do I have to manually start the server as an always-on process?**278279No, 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.280281**Question: Do I have to manually activate the virtual environment for the MCP Server?**282283No, 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.284285
Full transparency β inspect the skill content before installing.