Skip to main content
Glama

Deprecated 27-Nov-2025

I've personally moved my efforts to a more generic OpenAPI spec based MCP: https://github.com/allen-munsch/yas-mcp

Additionally, there is actually an official beta release by prefect over here: https://pypi.org/project/prefect-mcp/

Prefect MCP Server

A Model Context Protocol (MCP) server implementation for Prefect, enabling AI assistants to interact with Prefect through natural language.

Note: The official Prefect MCP server is available here. This is a community implementation.

๐Ÿš€ Quick Start

docker compose up

Related MCP server: n8n MCP Server

๐Ÿ“ฆ Installation

pip Installation

pip install mcp-prefect

From Source

git clone https://github.com/allen-munsch/mcp-prefect
cd mcp-prefect
pip install -e .

Manual Run

PREFECT_API_URL=http://localhost:4200/api \
PREFECT_API_KEY=your_api_key_here \
MCP_PORT=8000 \
python -m mcp_prefect.main --transport http

๐Ÿ› ๏ธ Features


โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                            โ”‚
โ”‚        _ __ ___  _____           __  __  _____________    ____    ____     โ”‚
โ”‚       _ __ ___ .'____/___ ______/ /_/  |/  / ____/ __ \  |___ \  / __ \    โ”‚
โ”‚      _ __ ___ / /_  / __ `/ ___/ __/ /|_/ / /   / /_/ /  ___/ / / / / /    โ”‚
โ”‚     _ __ ___ / __/ / /_/ (__  ) /_/ /  / / /___/ ____/  /  __/_/ /_/ /     โ”‚
โ”‚    _ __ ___ /_/    \____/____/\__/_/  /_/\____/_/      /_____(*)____/      โ”‚
โ”‚                                                                            โ”‚
โ”‚                                                                            โ”‚
โ”‚                                FastMCP  2.0                                โ”‚
โ”‚                                                                            โ”‚
โ”‚                                                                            โ”‚
โ”‚                 ๐Ÿ–ฅ๏ธ  Server name:     MCP Prefect 3.6.1                      โ”‚
โ”‚                 ๐Ÿ“ฆ Transport:       STDIO                                  โ”‚
โ”‚                                                                            โ”‚
โ”‚                 ๐ŸŽ๏ธ  FastMCP version: 2.12.3                                 โ”‚
โ”‚                 ๐Ÿค MCP SDK version: 1.14.1                                 โ”‚
โ”‚                                                                            โ”‚
โ”‚                 ๐Ÿ“š Docs:            https://gofastmcp.com                  โ”‚
โ”‚                 ๐Ÿš€ Deploy:          https://fastmcp.cloud                  โ”‚
โ”‚                                                                            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ


[11/11/25 02:08:06] INFO     Starting MCP server 'MCP Prefect 3.6.1' with transport 'stdio'                                                                                     server.py:1495
โœ… Initialized successfully
Server: MCP Prefect 3.6.1 1.14.1

๐Ÿ”„ Listing tools...

๐ŸŽฏ FOUND 64 TOOLS:
================================================================================

๐Ÿ“‚ ARTIFACT (6 tools)
  ๐Ÿ”ง create_artifact
  ๐Ÿ”ง delete_artifact
  ๐Ÿ”ง get_artifact
  ๐Ÿ”ง get_artifacts
  ๐Ÿ”ง get_latest_artifacts
  ๐Ÿ”ง update_artifact

๐Ÿ“‚ AUTOMATION (7 tools)
  ๐Ÿ”ง create_automation
  ๐Ÿ”ง delete_automation
  ๐Ÿ”ง get_automation
  ๐Ÿ”ง get_automations
  ๐Ÿ”ง pause_automation
  ๐Ÿ”ง resume_automation
  ๐Ÿ”ง update_automation

๐Ÿ“‚ BLOCK (5 tools)
  ๐Ÿ”ง delete_block_document
  ๐Ÿ”ง get_block_document
  ๐Ÿ”ง get_block_documents
  ๐Ÿ”ง get_block_type
  ๐Ÿ”ง get_block_types

๐Ÿ“‚ DEPLOYMENT (8 tools)
  ๐Ÿ”ง delete_deployment
  ๐Ÿ”ง get_deployment
  ๐Ÿ”ง get_deployment_schedule
  ๐Ÿ”ง get_deployments
  ๐Ÿ”ง pause_deployment_schedule
  ๐Ÿ”ง resume_deployment_schedule
  ๐Ÿ”ง set_deployment_schedule
  ๐Ÿ”ง update_deployment

๐Ÿ“‚ FLOW (13 tools)
  ๐Ÿ”ง cancel_flow_run
  ๐Ÿ”ง create_flow_run_from_deployment
  ๐Ÿ”ง delete_flow
  ๐Ÿ”ง delete_flow_run
  ๐Ÿ”ง get_flow
  ๐Ÿ”ง get_flow_run
  ๐Ÿ”ง get_flow_run_logs
  ๐Ÿ”ง get_flow_runs
  ๐Ÿ”ง get_flow_runs_by_flow
  ๐Ÿ”ง get_flows
  ๐Ÿ”ง get_task_runs_by_flow_run
  ๐Ÿ”ง restart_flow_run
  ๐Ÿ”ง set_flow_run_state

๐Ÿ“‚ LOG (2 tools)
  ๐Ÿ”ง create_log
  ๐Ÿ”ง get_logs

๐Ÿ“‚ OTHER (1 tools)
  ๐Ÿ”ง get_health

๐Ÿ“‚ TASK (4 tools)
  ๐Ÿ”ง get_task_run
  ๐Ÿ”ง get_task_run_logs
  ๐Ÿ”ง get_task_runs
  ๐Ÿ”ง set_task_run_state

๐Ÿ“‚ VARIABLE (5 tools)
  ๐Ÿ”ง create_variable
  ๐Ÿ”ง delete_variable
  ๐Ÿ”ง get_variable
  ๐Ÿ”ง get_variables
  ๐Ÿ”ง update_variable

๐Ÿ“‚ WORK (13 tools)
  ๐Ÿ”ง create_work_queue
  ๐Ÿ”ง delete_work_queue
  ๐Ÿ”ง get_current_workspace
  ๐Ÿ”ง get_work_queue
  ๐Ÿ”ง get_work_queue_by_name
  ๐Ÿ”ง get_work_queue_runs
  ๐Ÿ”ง get_work_queues
  ๐Ÿ”ง get_workspace
  ๐Ÿ”ง get_workspace_by_handle
  ๐Ÿ”ง get_workspaces
  ๐Ÿ”ง pause_work_queue
  ๐Ÿ”ง resume_work_queue
  ๐Ÿ”ง update_work_queue

๐Ÿ“Š TOTAL: 64 tools across 10 categories

๐Ÿ’ฌ Example Interactions

AI assistants can help you with:

Flow Management

  • "Show me all my flows and their last run status"

  • "Create a new flow run for the 'data-processing' deployment"

  • "What's the current status of flow run 'abc-123'?"

Deployment Control

  • "Pause the schedule for the 'daily-reporting' deployment"

  • "Update the 'etl-pipeline' deployment with new parameters"

Infrastructure Management

  • "List all work pools and their current status"

  • "Create a new work queue for high-priority jobs"

Variable & Configuration

  • "Create a variable called 'api_timeout' with value 300"

  • "Show me all variables containing 'config' in their name"

Monitoring & Debugging

  • "Get the logs for the last failed flow run"

  • "Show me all running task runs right now"

๐Ÿค– Platform Integration

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "prefect": {
      "command": "mcp-prefect",
      "args": ["--transport", "stdio"]
    }
  }
}

Cursor MCP

{
  "mcpServers": {
    "prefect": {
      "command": "mcp-prefect",
      "args": ["--transport", "stdio"]
    }
  }
}

Gemini CLI

gemini config set mcp-servers.prefect "mcp-prefect --transport stdio"

Windsurf / Claude Code

{
  "mcpServers": {
    "prefect": {
      "command": "mcp-prefect",
      "args": ["--transport", "stdio"],
      "env": {
        "PREFECT_API_URL": "http://localhost:4200/api",
        "PREFECT_API_KEY": "your_api_key_here"
      }
    }
  }
}

Generic MCP Client

{
  "mcpServers": {
    "prefect": {
      "command": "mcp-prefect",
      "args": ["--transport", "stdio"],
      "env": {
        "PREFECT_API_URL": "http://localhost:4200/api",
        "PREFECT_API_KEY": "your_api_key_here"
      }
    }
  }
}

๐Ÿงช Development

Running Tests

pytest tests/ -v

Building from Source

git clone https://github.com/allen-munsch/mcp-prefect
cd mcp-prefect
pip install -e .
python -m mcp_prefect

Available Tools

46 tools
cancel_flow_runC

Cancel a flow run.

Args: flow_run_id: The flow run UUID

Returns: Confirmation message

Inputs: flow_run_id (required).

create_flow_run_from_deploymentC

Create a flow run from a deployment.

Args: deployment_id: The deployment UUID parameters: Optional parameters to pass to the flow run name: Optional name for the flow run tags: Optional tags for the flow run idempotency_key: Optional idempotency key

Returns: Details of the created flow run

Inputs: deployment_id (required), idempotency_key, name, parameters, +1 more.

create_variableB

Create a variable.

Args: name: The variable name value: The variable value (can be string, dict, list, etc.) tags: Optional tags

Returns: Details of the created variable

Inputs: name (required), value (required), tags.

create_work_queueB

Create a work queue.

Args: name: The name for the work queue description: Optional description is_paused: Whether the queue should be paused upon creation concurrency_limit: Optional concurrency limit

Returns: Details of the created work queue

Inputs: name (required), concurrency_limit, description, is_paused.

delete_block_documentB

Delete a block document by ID.

Args: block_document_id: The block document UUID

Returns: Confirmation message

Inputs: block_document_id (required).

delete_deploymentC

Delete a deployment by ID.

Args: deployment_id: The deployment UUID

Returns: Confirmation message

Inputs: deployment_id (required).

delete_flowB

Delete a flow by ID.

Args: flow_id: The flow UUID

Returns: Confirmation message

Inputs: flow_id (required).

delete_flow_runC

Delete a flow run.

Args: flow_run_id: The flow run UUID

Returns: Confirmation message

Inputs: flow_run_id (required).

delete_variableC

Delete a variable by name.

Args: name: The variable name

Returns: Confirmation message

Inputs: name (required).

delete_work_queueC

Delete a work queue by ID.

Args: work_queue_id: The work queue UUID

Returns: Confirmation message

Inputs: work_queue_id (required).

get_block_documentB

Get a block document by ID.

Args: block_document_id: The block document UUID

Returns: Block document details

Inputs: block_document_id (required).

get_block_documentsB

Get block documents by block type.

Args: block_type_slug: The block type slug limit: Maximum number of block documents to return offset: Number of block documents to skip name: Filter by name pattern

Returns: A list of block documents with their details

Inputs: block_type_slug (required), limit, name, offset.

get_block_typeC

Get a block type by slug.

Args: slug: The block type slug

Returns: Block type details

Inputs: slug (required).

get_block_typesB

Get a list of block types with optional filtering.

Args: limit: Maximum number of block types to return offset: Number of block types to skip slug: Filter by slug pattern

Returns: A list of block types with their details

Inputs: limit, offset, slug.

get_current_workspaceC

Get the current workspace.

Returns: Details of the current workspace

Inputs: no named parameters.

get_deploymentC

Get details of a specific deployment by ID.

Args: deployment_id: The deployment UUID

Returns: Deployment details

Inputs: deployment_id (required).

get_deploymentsB

Get a list of deployments with optional filtering.

Args: limit: Maximum number of deployments to return offset: Number of deployments to skip flow_name: Filter by flow name name: Filter by deployment name tags: Filter by tags is_schedule_active: Filter by schedule active status work_queue_name: Filter by work queue name

Returns: A list of deployments with their details

Inputs: flow_name, is_schedule_active, limit, name, +3 more.

get_deployment_scheduleC

Get a deployment's schedule.

Args: deployment_id: The deployment UUID

Returns: Schedule details

Inputs: deployment_id (required).

get_flowC

Get details of a specific flow by ID.

Args: flow_id: The flow UUID

Returns: Flow details

Inputs: flow_id (required).

get_flow_runB

Get details of a specific flow run by ID.

Args: flow_run_id: The flow run UUID

Returns: Flow run details

Inputs: flow_run_id (required).

get_flow_runsB

Get a list of flow runs with optional filtering.

Args: limit: Maximum number of flow runs to return offset: Number of flow runs to skip flow_name: Filter by flow name state_type: Filter by state type (e.g., "RUNNING", "COMPLETED", "FAILED") state_name: Filter by state name deployment_id: Filter by deployment ID tags: Filter by tags start_time_before: ISO formatted datetime string start_time_after: ISO formatted datetime string

Returns: A list of flow runs with their details

Inputs: deployment_id, flow_name, limit, offset, +5 more.

get_flow_runs_by_flowB

Get flow runs for a specific flow.

Args: flow_id: The flow UUID limit: Maximum number of flow runs to return offset: Number of flow runs to skip state_type: Filter by state type (e.g., "RUNNING", "COMPLETED", "FAILED")

Returns: A list of flow runs for the specified flow

Inputs: flow_id (required), limit, offset, state_type.

get_flowsB

Get a list of flows with optional filtering.

Args: limit: Maximum number of flows to return offset: Number of flows to skip flow_name: Filter flows by name tags: Filter flows by tags created_after: ISO formatted datetime string for filtering flows created after this time created_before: ISO formatted datetime string for filtering flows created before this time

Returns: A list of flows with their details

Inputs: created_after, created_before, flow_name, limit, +2 more.

get_healthC

Get health status of the Prefect server.

Returns: Health status information

Inputs: no named parameters.

get_task_runC

Get details of a specific task run by ID.

Args: task_run_id: The task run UUID

Returns: Task run details

Inputs: task_run_id (required).

get_task_runsB

Get a list of task runs with optional filtering.

Args: limit: Maximum number of task runs to return offset: Number of task runs to skip task_name: Filter by task name state_type: Filter by state type (e.g., "RUNNING", "COMPLETED", "FAILED") state_name: Filter by state name tags: Filter by tags start_time_before: ISO formatted datetime string start_time_after: ISO formatted datetime string

Returns: A list of task runs with their details

Inputs: limit, offset, start_time_after, start_time_before, +4 more.

get_task_runs_by_flow_runB

Get task runs for a specific flow run.

Args: flow_run_id: The flow run UUID limit: Maximum number of task runs to return offset: Number of task runs to skip state_type: Filter by state type (e.g., "RUNNING", "COMPLETED", "FAILED")

Returns: A list of task runs for the specified flow run

Inputs: flow_run_id (required), limit, offset, state_type.

get_variableC

Get a variable by name.

Args: name: The variable name

Returns: Variable details

Inputs: name (required).

get_variablesB

Get a list of variables with optional filtering.

Args: limit: Maximum number of variables to return offset: Number of variables to skip name: Filter by name pattern

Returns: A list of variables with their details

Inputs: limit, name, offset.

get_work_queueC

Get details of a specific work queue by ID.

Args: work_queue_id: The work queue UUID

Returns: Work queue details

Inputs: work_queue_id (required).

get_work_queue_by_nameC

Get a work queue by name.

Args: name: The work queue name

Returns: Work queue details

Inputs: name (required).

get_work_queuesC

Get a list of work queues with optional filtering.

Args: limit: Maximum number of work queues to return offset: Number of work queues to skip name: Filter by name is_paused: Filter by paused status

Returns: A list of work queues with their details

Inputs: is_paused, limit, name, offset.

get_workspaceC

Get a workspace by ID.

Args: workspace_id: The workspace UUID

Returns: Workspace details

Inputs: workspace_id (required).

get_workspace_by_handleC

Get a workspace by its handle.

Args: account_handle: The account handle workspace_handle: The workspace handle

Returns: Workspace details

Inputs: account_handle (required), workspace_handle (required).

get_workspacesB

Get a list of accessible workspaces.

Args: limit: Maximum number of workspaces to return offset: Number of workspaces to skip name: Filter workspaces by name (note: filtering may not be supported by all Prefect versions)

Returns: A list of workspaces with their details

Inputs: limit, name, offset.

pause_deployment_scheduleC

Pause a deployment's schedule.

Args: deployment_id: The deployment UUID

Returns: Confirmation message

Inputs: deployment_id (required).

pause_work_queueB

Pause a work queue.

Args: work_queue_id: The work queue UUID

Returns: Details of the updated work queue

Inputs: work_queue_id (required).

restart_flow_runC

Restart a flow run.

Args: flow_run_id: The flow run UUID

Returns: Details of the new flow run

Inputs: flow_run_id (required).

resume_deployment_scheduleC

Resume a deployment's schedule.

Args: deployment_id: The deployment UUID

Returns: Confirmation message

Inputs: deployment_id (required).

resume_work_queueB

Resume a work queue.

Args: work_queue_id: The work queue UUID

Returns: Details of the updated work queue

Inputs: work_queue_id (required).

set_deployment_scheduleB

Set a deployment's schedule.

Args: deployment_id: The deployment UUID cron: Cron expression for the schedule interval_seconds: Alternative to cron - interval in seconds anchor_date: Required for interval schedules - the anchor date timezone: Timezone for the schedule

Returns: Updated schedule details

Inputs: deployment_id (required), anchor_date, cron, interval_seconds, +1 more.

set_flow_run_stateB

Set a flow run's state.

Args: flow_run_id: The flow run UUID state: The new state to set (e.g., "SCHEDULED", "RUNNING", "COMPLETED", "FAILED") message: An optional message explaining the state change

Returns: Result of the state change operation

Inputs: flow_run_id (required), state (required), message.

set_task_run_stateB

Set a task run's state.

Args: task_run_id: The task run UUID state: The new state to set (e.g., "SCHEDULED", "RUNNING", "COMPLETED", "FAILED") message: An optional message explaining the state change

Returns: Result of the state change operation

Inputs: state (required), task_run_id (required), message.

update_deploymentB

Update a deployment.

Args: deployment_id: The deployment UUID name: New name for the deployment description: New description version: New version tags: New tags parameters: New parameters work_queue_name: New work queue name

Returns: Details of the updated deployment

Inputs: deployment_id (required), description, name, parameters, +3 more.

update_variableC

Update a variable.

Args: name: The variable name value: New value tags: New tags

Returns: Details of the updated variable

Inputs: name (required), tags, value.

update_work_queueB

Update a work queue.

Args: work_queue_id: The work queue UUID name: New name description: New description is_paused: New paused status concurrency_limit: New concurrency limit

Returns: Details of the updated work queue

Inputs: work_queue_id (required), concurrency_limit, description, is_paused, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    B3.3/5.0

    Scored across 46 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting specific resources and actions in the Prefect domain, such as flows, deployments, flow runs, task runs, variables, work queues, blocks, and workspaces. There is no ambiguity or overlap; for example, get_flow_runs and get_task_runs are clearly separated by resource type, and create/update/delete operations are consistently differentiated.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, with verbs like get, create, update, delete, pause, resume, set, and cancel paired with specific nouns. All names use snake_case uniformly, and patterns like get_X and get_Xs for list operations are predictable, making the set easy to navigate.

    Tool Count3/5

    With 46 tools, the count is high and may feel heavy for typical MCP server purposes, though it aligns with Prefect's comprehensive API coverage. While each tool serves a distinct function, the sheer number could overwhelm agents, placing it in the borderline range where 16-25 tools is considered heavy, and 46 exceeds that significantly.

    Completeness5/5

    The tool set provides complete CRUD/lifecycle coverage for all core Prefect resources, including flows, deployments, flow runs, task runs, variables, work queues, blocks, and workspaces. It supports operations like creation, retrieval, updating, deletion, state management, scheduling, and health checks, with no obvious gaps that would hinder agent workflows.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      A Model Context Protocol server that enables AI assistants to interact with Coolify instances through natural language, allowing management of servers, applications, databases, and deployments.
      6,409 npm
      625
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol server that enables AI assistants to interact with n8n workflows through natural language, supporting actions like listing, creating, updating, executing and monitoring workflows.
      246 npm
      1,631
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A server that enables interacting with Prefect workflow automation tools through the Model Context Protocol, offering enhanced reliability through uvx running mechanism and seamless integration with Cursor IDE.
      17
      7
      MIT