Skip to main content
Glama

mcp-prefect

Python 3.10+ License: MIT

MCP server wrapper for Prefect workflow orchestration. Thin wrapper around prefect-mcp-server providing a consistent entry point.

Features

16 tools for Prefect workflow management (provided by prefect-mcp-server):

Category

Tools

Flows

get_flow_by_id, get_flow_by_name, list_flows, search_flows, filter_flows

Flow Runs

get_flow_run_by_id, list_flow_runs, search_flow_runs_by_state, cancel_flow_run, create_flow_run, filter_flow_runs

Deployments

get_deployment_by_id, get_deployment_by_name, list_deployments, search_deployments_by_status, filter_deployments

Execution

create_flow_run_from_deployment

Related MCP server: Procesio MCP Server

Architecture

This package is a thin wrapper around prefect-mcp-server. It re-exports the MCP server instance and provides a CLI entry point:

from prefect_mcp_server.server import mcp

def main():
    mcp.run()

All tool implementations are provided by prefect-mcp-server, which uses the official Prefect client library.

Installation

pip install .

Configuration

Variable

Required

Default

Description

PREFECT_API_URL

No

http://localhost:4200/api

Prefect API server URL

PREFECT_API_KEY

No

(empty)

Prefect Cloud API key (required for Prefect Cloud)

.env Example

PREFECT_API_URL=https://api.prefect.cloud/api/accounts/YOUR_ACCOUNT/workspaces/YOUR_WORKSPACE
PREFECT_API_KEY=pnu_your_api_key_here

Quick Start

As MCP Server

# Run via stdio (for Claude Desktop/Code)
mcp-prefect

Add to Claude Code (~/.claude.json):

{
  "mcpServers": {
    "prefect": {
      "type": "stdio",
      "command": "uv",
      "args": ["--directory", "/path/to/mcp-prefect", "run", "mcp-prefect"],
      "env": {
        "PREFECT_API_URL": "http://localhost:4200/api"
      }
    }
  }
}

Docker

docker build -t mcp-prefect .
docker run -e PREFECT_API_URL=http://host.docker.internal:4200/api mcp-prefect

License

MIT

Tool Schema Changelog

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

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers