get_flow_by_idLABSCO SUMMARY
Reads broadly, writes narrowly.
Fourteen of the sixteen tools only read; the two that change anything are cancelling a run and starting one from a deployment, which is a sensible line for something an assistant drives. List and search calls default to a limit of 20, so ask explicitly when you want more.
What it is
An MCP server over the Prefect API that exposes flows, flow runs and deployments as tools. It covers the read side (get, list, search, filter) and the two write actions that matter day to day: cancelling a run and creating one from a deployment.
What you get
- Flows fetched by ID or name, listed with pagination, searched by name and tags —
get_flow_by_id,get_flow_by_name,list_flows,search_flows - Flow runs fetched by ID, listed with an optional flow filter, and searched by state such as COMPLETED, FAILED or CRASHED —
get_flow_run_by_id,list_flow_runs,search_flow_runs_by_state - A running flow cancelled —
cancel_flow_run - A new run created from a deployment with your own parameters and an optional wait —
create_flow_run_from_deployment - Deployments fetched by ID or by
flow_name/deployment_name, listed, and searched by whether their schedule is active —get_deployment_by_id,get_deployment_by_name,list_deployments,search_deployments_by_status - Raw Prefect filter criteria passed straight through when the named searches are not enough —
filter_flows,filter_flow_runs,filter_deployments
Requirements
A reachable Prefect API. Set PREFECT_API_URL — the default is http://localhost:4200/api — and PREFECT_API_KEY if you are authenticating against a Prefect server or Prefect Cloud. Python 3.9 or newer and Prefect 3; install with uv pip install -U prefect-mcp-server and run it through uvx prefect-mcp-server. The package is prefect-mcp-server 1.1.3, MIT licensed, and has supported Prefect 3.0 since 1.1.2.
Setup effort
One command — uv pip install -U prefect-mcp-server
USE CASES
Finding out what failed overnight
Search flow runs by state for FAILED or CRASHED, then pull the full record of the one that matters.
Re-running a pipeline after a fix
Look the deployment up by its flow_name/deployment_name and start a run with the parameters you want.
Stopping a run that is doing damage
Find the run by ID and cancel it from the conversation instead of opening the Prefect UI.
Auditing which schedules are live
Search deployments by schedule status to see what is actually set to fire.
16 tools
Listed in project docs. Your client may show a different list.
get_flow_by_namelist_flowssearch_flowsget_flow_run_by_idlist_flow_runssearch_flow_runs_by_statecancel_flow_runget_deployment_by_idget_deployment_by_namelist_deploymentssearch_deployments_by_statuscreate_flow_run_from_deploymentfilter_flowsfilter_flow_runsfilter_deploymentsBEFORE YOU INSTALL
What to know first
Tools you get
16 tools named in the project's documentation.
Requires
- uvx on PATH
- Python 3.9 or later
- Prefect 3 and a reachable Prefect API (PREFECT_API_URL, default http://localhost:4200/api)
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uv pip install -U prefect-mcp-serverMCP Clients
Cursor
{
"mcpServers": {
"prefect": {
"command": "uvx",
"args": [
"prefect-mcp-server"
],
"env": {}
}
}
}Put your Prefect settings in "env": "PREFECT_API_URL" (the default is http://localhost:4200/api) and, for Prefect Cloud or a Prefect server that needs authentication, "PREFECT_API_KEY". The README also accepts them from a .env file in the project root.