by allen-munsch
Provides a Model Context Protocol server that enables AI assistants to interact with Prefect through natural language, exposing core Prefect APIs for flows, deployments, runs, queues, blocks, variables, and workspaces.
Mcp Prefect implements a Model Context Protocol (MCP) server for Prefect, allowing AI assistants to perform common Prefect operations using natural‑language commands.
export PREFECT_API_URL="http://localhost:4200/api"
export PREFECT_API_KEY="your_api_key"
docker compose up
Q: Do I need Prefect Cloud?
A: No. The server works with any Prefect deployment reachable via PREFECT_API_URL; a Cloud API key is only required for Cloud instances.
Q: Can I extend the server with new Prefect APIs?
A: Yes. Add the function to the appropriate module under src/mcp_prefect and include it in the get_all_functions() list. For new API categories, update APIType in enums.py and modify main.py.
Q: Which transport protocol is supported?
A: The example configuration shows using Server‑Sent Events (--transport sse). Additional transports can be added as needed.
Q: How are environment variables passed to the server? A: They are set in the container or host environment before launching the server, as shown in the configuration step above.
Q: What if some endpoints are missing? A: The README notes that several endpoints are yet to be implemented; contributions are welcome to fill those gaps.
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/
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.
docker compose up
pip install mcp-prefect
git clone https://github.com/allen-munsch/mcp-prefect
cd mcp-prefect
pip install -e .
PREFECT_API_URL=http://localhost:4200/api \
PREFECT_API_KEY=your_api_key_here \
MCP_PORT=8000 \
python -m mcp_prefect.main --transport http
╭────────────────────────────────────────────────────────────────────────────╮
│ │
│ _ __ ___ _____ __ __ _____________ ____ ____ │
│ _ __ ___ .'____/___ ______/ /_/ |/ / ____/ __ \ |___ \ / __ \ │
│ _ __ ___ / /_ / __ `/ ___/ __/ /|_/ / / / /_/ / ___/ / / / / / │
│ _ __ ___ / __/ / /_/ (__ ) /_/ / / / /___/ ____/ / __/_/ /_/ / │
│ _ __ ___ /_/ \____/____/\__/_/ /_/\____/_/ /_____(*)____/ │
│ │
│ │
│ 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
AI assistants can help you with:
Flow Management
Deployment Control
Infrastructure Management
Variable & Configuration
Monitoring & Debugging
Add to claude_desktop_config.json:
{
"mcpServers": {
"prefect": {
"command": "mcp-prefect",
"args": ["--transport", "stdio"]
}
}
}
{
"mcpServers": {
"prefect": {
"command": "mcp-prefect",
"args": ["--transport", "stdio"]
}
}
}
gemini config set mcp-servers.prefect "mcp-prefect --transport stdio"
{
"mcpServers": {
"prefect": {
"command": "mcp-prefect",
"args": ["--transport", "stdio"],
"env": {
"PREFECT_API_URL": "http://localhost:4200/api",
"PREFECT_API_KEY": "your_api_key_here"
}
}
}
}
{
"mcpServers": {
"prefect": {
"command": "mcp-prefect",
"args": ["--transport", "stdio"],
"env": {
"PREFECT_API_URL": "http://localhost:4200/api",
"PREFECT_API_KEY": "your_api_key_here"
}
}
}
}
pytest tests/ -v
git clone https://github.com/allen-munsch/mcp-prefect
cd mcp-prefect
pip install -e .
python -m mcp_prefect
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by activepieces
A self‑hosted, open‑source platform that provides a no‑code builder for creating, versioning, and running AI‑driven automation workflows. Pieces are TypeScript‑based plugins that become MCP servers, allowing direct consumption by large language models.
by Skyvern-AI
Automates browser‑based workflows by leveraging large language models and computer‑vision techniques, turning natural‑language prompts into fully functional web interactions without writing custom scripts.
by ahujasid
Enables Claude AI to control Blender for prompt‑assisted 3D modeling, scene creation, and manipulation via a socket‑based Model Context Protocol server.
by PipedreamHQ
Connect APIs quickly with a free, hosted integration platform that enables event‑driven automations across 1,000+ services and supports custom code in Node.js, Python, Go, or Bash.
by elie222
Organizes email inbox, drafts replies in the user's tone, tracks follow‑ups, and provides analytics to achieve inbox zero quickly.
by grab
Enables Cursor AI to read and programmatically modify Figma designs through a Model Context Protocol integration.
by CursorTouch
Enables AI agents to control the Windows operating system, performing file navigation, application launching, UI interaction, QA testing, and other automation tasks through a lightweight server.
by ahujasid
Enables Claude AI to control Ableton Live in real time, allowing AI‑driven creation, editing, and playback of tracks, clips, instruments, and effects through a socket‑based server.
by leonardsellem
Provides tools and resources to enable AI assistants to manage and execute n8n workflows via natural language commands.