Kestra Python MCP Server

by kestra-io

Not rated
GitHub

About

A Python implementation of a Model Context Protocol server for interacting with Kestra.

Details

Author
kestra-io
Categories
Developer Tools, Automation, Infrastructure

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:

Copy the path returned bywhich uvand paste it into thecommandsection. Then, replace the--directoryby the path where you cloned the Kestra MCP Server repository. For example:

{ "mcpServers": { "kestra": { "command": "/Users/annageller/.local/bin/uv", "args": ](https://github.com/kestra-io/mcp-server-python/blob/HEAD/.env_example)[ "--directory", "/Users/annageller/gh/mcp-server-python/src", "run", "server.py" ] } } }

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

In your VS Code project directory, add a folder.vscodeand within that folder, create a file calledmcp.json. Paste your MCP configuration into that file (note that in VS Code, the key isserversinstead ofmcpServers):

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

A smallStartbutton should show up, click on it to start the server.

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

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

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 thestdiotransport, 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 useuv. Unlike traditional Python package managers, where virtual environment activation modifies shell variables likePATH,uvdirectly uses the Python interpreter and packages from the.venvdirectory without requiring environment variables to be set first. Just make sure you have created a uv virtual environment withuv venvand installed the required packages withuv pip installas described in the previous section.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Paid remote MCP for CLI tool MCP, structured receipts, usage logs, and audit-ready evidence for agent and CI workflows.

A flexible MCP server that executes arbitrary command-line tools defined in a configuration file.

Clean and audit messy MCP setups: stale servers, unused tools, context-heavy MCPs, outdated packages, and safe repair plans.

An MCP Server for the GitHub Actions API, enabling AI assistants to manage and operate GitHub Actions workflows.

Read-first Jenkins MCP server in Go for agent-driven build debugging. 20 tools including compare_builds, flaky-test detection, JUnit/Ginkgo failure parsing, and disk-cached console logs with on-disk path handoff. Write tools (trigger/stop/cancel) gated by JENKINS_MCP_READONLY env var.

Execute make targets from any Makefile in a safe and controlled environment.

Exposes Makefile targets as callable tools for AI assistants.

A Python-based server to install and configure other MCP servers from PyPI, npm, or local directories.

Orchestration tool for managing multiple MCP servers with a Docker Compose-style interface and a unified HTTP proxy.

A Python implementation of a Model Context Protocol server for interacting with Kestra.

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.

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": "admin@kestra.io", "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_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" } } } }
{ "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" } } } }

- Replace<your_kestra_api_token>,<your_google_api_key>, and<your_helicone_api_key>with your actual credentials.
- For OSS installations, you can useKESTRA_USERNAMEandKESTRA_PASSWORDinstead ofKESTRA_API_TOKEN.
- To disable Enterprise Edition tools in OSS, setKESTRA_MCP_DISABLED_TOOLS=ee.
- Thehost.docker.internalhostname 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-eflags pass environment variables from your MCP configuration into the Docker container.

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

Note:Theeetool group contains Enterprise Edition specific functionality and is only available in EE/Cloud editions. For OSS users, you can disable EE tools by addingKESTRA_MCP_DISABLED_TOOLS=eeto your.envfile.

Optionally, you can includeKESTRA_MCP_DISABLED_TOOLSin your.envfile listing the tools that you prefer to disable. For example, if you want to disable Namespace Files tools, add this to your.envfile:

To disable multiple tools, separate them with comma:

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

# 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:

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

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.envfile in the root directory of the project similar to the.env_examplefile. For OSS installations, you can use basic authentication withKESTRA_USERNAMEandKESTRA_PASSWORD. For EE/Cloud installations, useKESTRA_API_TOKEN. To disable Enterprise Edition tools in OSS, addKESTRA_MCP_DISABLED_TOOLS=eeto your.envfile.

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:

Copy the path returned bywhich uvand paste it into thecommandsection. Then, replace the--directoryby 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.

In your VS Code project directory, add a folder.vscodeand within that folder, create a file calledmcp.json. Paste your MCP configuration into that file (note that in VS Code, the key isserversinstead ofmcpServers):

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

A smallStartbutton should show up, click on it to start the server.

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

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

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 thestdiotransport, 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 useuv. Unlike traditional Python package managers, where virtual environment activation modifies shell variables likePATH,uvdirectly uses the Python interpreter and packages from the.venvdirectory without requiring environment variables to be set first. Just make sure you have created a uv virtual environment withuv venvand installed the required packages withuv pip installas described in the previous section.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Paid remote MCP for CLI tool MCP, structured receipts, usage logs, and audit-ready evidence for agent and CI workflows.

A flexible MCP server that executes arbitrary command-line tools defined in a configuration file.

Clean and audit messy MCP setups: stale servers, unused tools, context-heavy MCPs, outdated packages, and safe repair plans.

An MCP Server for the GitHub Actions API, enabling AI assistants to manage and operate GitHub Actions workflows.

Read-first Jenkins MCP server in Go for agent-driven build debugging. 20 tools including compare_builds, flaky-test detection, JUnit/Ginkgo failure parsing, and disk-cached console logs with on-disk path handoff. Write tools (trigger/stop/cancel) gated by JENKINS_MCP_READONLY env var.

Execute make targets from any Makefile in a safe and controlled environment.

Exposes Makefile targets as callable tools for AI assistants.

A Python-based server to install and configure other MCP servers from PyPI, npm, or local directories.

Orchestration tool for managing multiple MCP servers with a Docker Compose-style interface and a unified HTTP proxy.

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.