Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to the Prefect MCP server

Vendor MCP
Open markdown

The Prefect MCP connector routes your AI agent's tool calls to Prefect's own MCP server through Scalekit. Each user signs in to Prefect once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 15 tools.

Tools
15
What they doRead · write · destructive
15 · 0 · 015 read0 write0 destructive
Users sign in with
OAuth app
Your own Prefect MCP server app

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Prefect MCP connection

    In AgentKit > Connections, create a Prefect MCP connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    Prefect MCP server connections use your own OAuth app. Register one with Prefect MCP server and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Prefect MCP connection.

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'prefectmcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Prefect MCP:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'prefectmcp_docs_get_release_notes',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • prefectmcp_docs_get_release_notesGet authoritative, structured release notes for a Prefect OSS release.Read-only

    Get Prefect Release Notes

    Get authoritative, structured release notes for a Prefect OSS release. Accepts "latest" or an exact version and returns the release title, date, Markdown notes, and source URL.

    Inputs

    versionstring
    'latest' for the latest stable Prefect OSS release, or an exact version such as '3.7.8'default latest
  • prefectmcp_docs_search_prefectSearch Prefect documentation for concepts, examples, and best practices.Read-only

    Search Prefect Documentation

    Search Prefect documentation for concepts, examples, and best practices. Returns ranked excerpts from Prefect's knowledge base for a natural-language query.

    Inputs

    querystringrequired
    a search query to find relevant document excerpts from Prefect's knowledgebase
    top_kinteger
    How many document excerpts to return.
  • prefectmcp_get_automationsGet automations with optional filters.Read-only

    Get Automations

    Get automations with optional filters. Returns compact summaries by default (trigger_type, action_count). Filter by specific ID(s) for full detail including trigger config, actions, actions_on_trigger, and actions_on_resolve. Filter operators: - id.any_: Match specific automation IDs - name.any_: Match automation names - enabled.eq_: Filter by enabled state Examples: - List all automations: get_automations() - Full detail: get_automations(filter={"id": {"any_": ["<automation-id>"]}}) - Get by name: get_automations(filter={"name": {"any_": ["my-automation"]}}) - Only enabled: get_automations(filter={"enabled": {"eq_": True}})

    Inputs

    workspace_idstringrequired
    Prefect Cloud workspace ID. Required on every call to this tool for this connection (Prefect Cloud OAuth mode).
    filterobject
    JSON filter object for advanced querying. Supports all Prefect AutomationFilter fields.
    limitinteger
    Maximum number of automations to return.default 100
  • prefectmcp_get_dashboardGet a high-level dashboard overview of the Prefect instance.Read-only

    Get Dashboard

    Get a high-level dashboard overview of the Prefect instance. Returns current flow run statistics, work pool status, and all active concurrency limits (global/tag-based, deployment, work pool, and work queue). Essential for diagnosing flow run delays and bottlenecks.

    Inputs

    workspace_idstringrequired
    Prefect Cloud workspace ID. Required on every call to this tool for this connection (Prefect Cloud OAuth mode).
  • prefectmcp_get_deploymentsGet deployments with optional filters.Read-only

    Get Deployments

    Get deployments with optional filters. Returns compact summaries by default. Filter by specific ID(s) for full detail including parameters, parameter_openapi_schema, job_variables, work_pool details, and recent_runs. The response includes truncated=true when more matching records exist. Filter operators: - any_: Match any value in list - all_: Match all values - like_: SQL LIKE pattern matching - not_any_: Exclude values - is_null_: Check for null/not null - eq_/ne_: Equality comparisons Examples: - List all deployments: get_deployments() - Full detail: get_deployments(filter={"id": {"any_": ["<deployment-id>"]}}) - Active deployments: get_deployments(filter={"paused": {"eq_": False}}) - Production deployments: get_deployments(filter={"tags": {"all_": ["production"]}})

    Inputs

    workspace_idstringrequired
    Prefect Cloud workspace ID. Required on every call to this tool for this connection (Prefect Cloud OAuth mode).
    filterobject
    JSON filter object for advanced querying. Supports all Prefect DeploymentFilter fields.
    limitinteger
    Maximum number of deployments to return.default 50
  • prefectmcp_get_flow_run_logsGet execution logs for a flow run.Read-only

    Get Flow Run Logs

    Get execution logs for a flow run. Retrieves log entries from the flow run execution, including timestamps, log levels, and messages. Examples: - Get logs: get_flow_run_logs(flow_run_id="...") - Get more logs: get_flow_run_logs(flow_run_id="...", limit=500)

    Inputs

    flow_run_idstringrequired
    UUID of the flow run to get logs for
    workspace_idstringrequired
    Prefect Cloud workspace ID. Required on every call to this tool for this connection (Prefect Cloud OAuth mode).
    limitinteger
    Maximum number of log entries to return.default 100
  • prefectmcp_get_flow_runsGet flow runs with optional filters.Read-only

    Get Flow Runs

    Get flow runs with optional filters. Returns compact summaries by default. Filter by specific ID(s) for full detail including parameters, inlined deployment info, and work pool info. The response includes truncated=true when more matching records exist. Filter operators: - any_: Match any value in list - all_: Match all values - like_: SQL LIKE pattern matching - not_any_: Exclude values - is_null_: Check for null/not null - after_/before_: Time comparisons - gt_/gte_/lt_/lte_: Numeric comparisons Examples: - List recent runs: get_flow_runs() - Get specific run: get_flow_runs(filter={"id": {"any_": ["<flow-run-id>"]}}) - Failed runs: get_flow_runs(filter={"state": {"type": {"any_": ["FAILED"]}}}) - Production runs: get_flow_runs(filter={"tags": {"all_": ["production"]}})

    Inputs

    workspace_idstringrequired
    Prefect Cloud workspace ID. Required on every call to this tool for this connection (Prefect Cloud OAuth mode).
    filterobject
    JSON filter object for advanced querying. Supports all Prefect FlowRunFilter fields.
    limitinteger
    Maximum number of flow runs to return.default 50
  • prefectmcp_get_flowsGet flows with optional filters.Read-only

    Get Flows

    Get flows with optional filters. Returns a list of flows registered in the workspace. The response includes truncated=true when more matching records exist. Filter operators: - any_: Match any value in list - like_: SQL LIKE pattern matching - all_: Match all values Examples: - List all flows: get_flows() - Get specific flow: get_flows(filter={"id": {"any_": ["<flow-id>"]}}) - Flows by name pattern: get_flows(filter={"name": {"like_": "etl-%"}}) - Flows by tags: get_flows(filter={"tags": {"all_": ["production"]}})

    Inputs

    workspace_idstringrequired
    Prefect Cloud workspace ID. Required on every call to this tool for this connection (Prefect Cloud OAuth mode).
    filterobject
    JSON filter object for advanced querying. Supports all Prefect FlowFilter fields.
    limitinteger
    Maximum number of flows to return.default 50