Skip to content

allen-munsch/mcp-prefect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

28 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

About

An MCP implementation for Prefect

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •