Operate Kestra from Claude, Cursor, and Other MCP Clients

For the complete documentation index, see llms.txt. For a full content snapshot, see llms-full.txt. Append .md to any kestra.io/docs/* URL for plain Markdown.

Available on: Open Source EditionEnterprise Edition

The Kestra MCP Server lets an external AI agent operate your Kestra instance: read and change flows, executions, logs, namespace files, KV entries, and other resources, with your permissions.

This page is for administrators who enable the server and for developers who connect Claude Code, Cursor, Codex, or another MCP client to it. Kestra has two other MCP features:

You want an agent to…Use
Operate your Kestra instance: read and change flows, executions, and other resourcesKestra MCP Server (this page)
Run your own flows as toolsMCP Flows
Look up plugin schemas, blueprints, and docs while it writes flowsDocs MCP Server

The Kestra MCP Server exposes the tools of the AI Copilot over the Model Context Protocol. It is defined in the Kestra configuration rather than in the UI, belongs to no tenant, and doesn’t appear on the MCP Flows page or in the /api/v1/{tenant}/mcp-servers API.

Enable the server

The server is disabled by default. Enable it in the configuration:

kestra:
mcp:
platform-server:
enabled: true
tenants: [] # empty: every tenant the caller can access
instructions: "Only restart executions in the dev tenant."
# Enterprise Edition only
auth-methods: [] # BASIC, API_TOKEN, OAUTH; empty: all three
oauth-provider: my-oidc-provider

The server is served at <kestra-url>/api/v1/mcp, with no tenant or server ID in the path. While it’s disabled, the URL returns 404.

instructions is sent to MCP clients when they connect. Use it to guide the agent, for example to restrict which tenants it may restart executions in.

Connect a client

Point your MCP client at <kestra-url>/api/v1/mcp over HTTP. For example, with basic authentication in Claude Code:

claude mcp add kestra <kestra-url>/api/v1/mcp \
--transport http \
--header "Authorization: Basic $(echo -n 'username:password' | base64)"

Other clients use the same configuration as an MCP server in MCP Flows, with this URL in place of the server URL. See Connect an AI agent client for Claude Desktop, Cursor, and Codex snippets.

In this demo, Claude Code is connected to the Kestra MCP Server. It finds out why an execution failed, creates the missing KV entry, and restarts the execution:

Authentication

Every request must be authenticated. The server can’t be made public.

  • In the open-source edition, use basic authentication.
  • In the Enterprise Edition, auth-methods lists the accepted methods. When it’s empty, basic authentication, API tokens, and OAuth are all accepted. A request that uses a method not in the list gets a 403.
  • An unauthenticated request gets a 401. When OAuth is accepted, the response includes a WWW-Authenticate: Bearer challenge whose resource_metadata parameter points MCP clients to OAuth discovery.
  • With OAuth, MCP clients discover the identity provider from <kestra-url>/.well-known/oauth-protected-resource/api/v1/mcp, as described in Configuring OAuth authentication. oauth-provider restricts tokens to one configured OIDC provider. When it’s unset, tokens from any configured provider are accepted.

Tools

The server exposes up to 50 tools in the open-source edition and up to 79 in the Enterprise Edition. Each tool has an MCP annotation: Read-only tools change nothing, Write tools create or change resources, and Destructive tools delete data, overwrite state, or start executions with their side effects.

Flows

ToolAnnotationWhat it does
list_flowsRead-onlyLists flows matching filters.
read_flowRead-onlyReads a flow’s YAML source.
search_flow_sourcesRead-onlySearches the YAML source of flows for text or a regular expression.
list_flow_revisionsRead-onlyLists a flow’s revisions, newest first.
list_flow_dependenciesRead-onlyLists the dependencies between a flow and other flows.
list_namespace_dependenciesRead-onlyLists the flows that depend on a namespace’s flows, child namespaces included.
list_flow_triggersRead-onlyLists flow triggers with their runtime state.
author_flowRead-onlyDrafts a flow, or a revision of one, from a description. Nothing is saved.
validate_flowRead-onlyValidates a flow’s YAML source without saving or executing it, and returns its errors, warnings, and deprecated properties.
create_flowWriteCreates a flow from its YAML source.
update_flowWriteReplaces a flow’s source and saves it as a new revision.
enable_flowWriteEnables a disabled flow.
disable_flowWriteDisables a flow so its triggers stop. Running executions aren’t stopped.
delete_flowDestructiveDeletes a flow.
backfill_flowDestructiveBackfills a flow’s Schedule trigger over a past time window.
execute_flowDestructiveStarts a new execution of a flow.

Executions

ToolAnnotationWhat it does
list_executionsRead-onlyLists the most recent executions matching filters.
read_executionRead-onlyReads an execution’s state, duration, and task runs.
read_execution_outputsRead-onlyReads the flow outputs of an execution and what each task run returned.
restart_executionDestructiveRestarts a failed or paused execution from its failed tasks.
replay_executionDestructiveReplays an ended execution as a new execution, from the start or from a task run, optionally on another flow revision.
resume_executionDestructiveResumes a paused execution.
pause_executionWritePauses a running execution. Running tasks finish, and no new task starts.
kill_executionDestructiveKills a running, paused, or queued execution, and its subflow executions by default.
force_run_executionDestructiveRuns an execution that is created, queued, or paused now, bypassing its concurrency limit, schedule, or pause.
change_execution_stateDestructiveOverwrites the final state of an ended execution.
change_task_run_stateDestructiveChanges the state of one task run in an ended execution, which reruns the execution from that point.
update_execution_labelsDestructiveAdds, updates, or removes labels on an ended execution.
delete_executionDestructiveDeletes an ended execution with its logs, metrics, and stored files.

Logs

ToolAnnotationWhat it does
read_execution_logsRead-onlyReads an execution’s logs.
search_logsRead-onlySearches logs across flows, executions, and triggers.
delete_execution_logsDestructiveDeletes an execution’s logs and keeps the execution.
delete_flow_logsDestructiveDeletes the logs of every execution and trigger of a flow.

Namespaces, namespace files, and the KV store

ToolAnnotationWhat it does
list_namespacesRead-onlyLists the namespaces of the tenant.
list_namespace_filesRead-onlyLists the files and directories of a namespace.
read_namespace_fileRead-onlyReads a namespace file as text, optionally at a given revision.
write_namespace_fileWriteWrites a text file to a namespace, creating missing parent directories.
create_namespace_directoryWriteCreates a directory in a namespace.
move_namespace_fileDestructiveMoves or renames a namespace file or directory.
delete_namespace_fileDestructiveDeletes a namespace file, or a directory with its content.
list_kv_entriesRead-onlyLists KV entries matching filters.
read_kv_entryRead-onlyReads one KV entry.
create_kv_entryWriteCreates a KV entry in a namespace’s KV store.
update_kv_entryWriteReplaces the value of an existing KV entry.
delete_kv_entryDestructiveDeletes a KV entry.

Plugins and the instance

ToolAnnotationWhat it does
search_pluginsRead-onlySearches the installed plugin types by keyword and kind.
list_installed_pluginsRead-onlyLists the plugins installed on the instance.
get_plugin_schemaRead-onlyReads the JSON schema of a plugin type.
read_plugin_documentationRead-onlyReads a plugin type’s documentation as Markdown.
read_instance_infoRead-onlyReads the instance’s version, edition, and public URL.

Apps and dashboards (Enterprise Edition)

ToolAnnotationWhat it does
author_appRead-onlyDrafts an app, or a revision of one, from a description. Nothing is saved.
list_appsRead-onlyLists apps matching filters.
read_appRead-onlyReads an app’s source.
create_appWriteCreates an app from its YAML source.
update_appWriteReplaces an app’s source.
enable_appWriteEnables a disabled app.
disable_appWriteDisables an app and keeps its definition.
delete_appDestructiveDeletes an app.
author_dashboardRead-onlyDrafts a custom dashboard, or a revision of one, from a description. Nothing is saved.

Test suites (Enterprise Edition)

ToolAnnotationWhat it does
author_test_suiteRead-onlyDrafts a test suite for a flow, or a revision of one, from a description. Nothing is saved.
list_test_suitesRead-onlyLists test suites, optionally for one namespace or flow.
read_test_suiteRead-onlyReads a test suite’s source.
create_test_suiteWriteCreates a test suite from its YAML source.
update_test_suiteWriteReplaces a test suite’s source and saves a new revision.
delete_test_suiteDestructiveDeletes a test suite.
run_test_suiteDestructiveRuns a test suite. Each test case executes the flow under test, with the flow’s side effects.
read_test_suite_runRead-onlyReads the result of a test suite run.

Users, groups, and the instance (Enterprise Edition)

ToolAnnotationWhat it does
list_groupsRead-onlyLists the groups of the tenant.
create_groupWriteCreates an empty group.
update_groupWriteRenames a group or changes its description.
delete_groupDestructiveDeletes a group with its role bindings and memberships.
list_invitationsRead-onlyLists the invitations of the tenant.
invite_userWriteInvites a user to the tenant by email, optionally with roles and groups.
delete_invitationDestructiveDeletes an invitation so its link stops working.
list_bannersRead-onlyLists the announcement banners of the instance.
create_bannerWritePublishes an announcement banner to every user of every tenant.
update_bannerWriteChanges a banner’s message, severity, dates, or whether it’s active.
delete_bannerDestructiveDeletes an announcement banner.
read_licenseRead-onlyReads the instance’s Enterprise license: type, expiry, and limits.

The author_* tools use the AI provider configured for the AI Copilot. They return the generated YAML for review without saving it. To save a draft, the agent calls the matching create_* or update_* tool.

MCP clients can use the annotations in their approval prompts. Kestra doesn’t ask for confirmation itself, even for tools that the in-app Copilot asks you to confirm.

Tenants and permissions

Every tool takes an optional tenant argument. When the caller can act on a single tenant, it’s used by default. Otherwise, the call fails with a message listing the tenants to choose from. The tenants a caller can act on are those they have access to, limited to the tenants list when it’s set. Each tool’s tenant parameter lists, as allowed values, the tenants where the caller can use that tool, so MCP clients can offer them instead of guessing.

In the Enterprise Edition, each call runs as the caller in the requested tenant, so their RBAC permissions apply to both the tool and the namespace. A caller only sees the tools they can use in at least one of the tenants they can act on. Calling a tool that isn’t in their list returns a Tool not found error. When a listed tool is denied for a namespace, the call returns an error result instead, for example Execution not found. Changes made through the server are recorded in the audit log under the caller, like changes made in the UI.

Was this page helpful?