Skip to main content

MCP Server for Prefect

Project description

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

๐Ÿ“ฆ 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_mcp_prefect-3.6.1.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iflow_mcp_mcp_prefect-3.6.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file iflow_mcp_mcp_prefect-3.6.1.tar.gz.

File metadata

  • Download URL: iflow_mcp_mcp_prefect-3.6.1.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_mcp_prefect-3.6.1.tar.gz
Algorithm Hash digest
SHA256 6978f74278e1e1b4d6bebac52138e18a5c0c5d25c4069dca1b5ddcba62e87d78
MD5 dd50c2f841c3ecc8763887bd88776585
BLAKE2b-256 1cc6e2d112a26619ff0dc79de19a75ed2ac41823b38c062a651a8277ac77b689

See more details on using hashes here.

File details

Details for the file iflow_mcp_mcp_prefect-3.6.1-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_mcp_prefect-3.6.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.10 {"installer":{"name":"uv","version":"0.9.10"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for iflow_mcp_mcp_prefect-3.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bcb0eb6b9c12dd8a13ca3b427ffb22001e615bfcfda11dcff02ce89eefc6c12f
MD5 357aa7cd7a8444db5f28492896bdf8f3
BLAKE2b-256 9b3b18540243e6ca9d19ad0ee078d051da85b09ce4d862ef2f351fffe60d9492

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page