Skip to main content
Glama
Prefect MCP Server

Prefect MCP Server

by fortunto2

완벽한 MCP 서버

이 저장소는 uvx 를 통한 안정적인 실행 메커니즘을 갖춘 prefect-mcp-server 패키지를 사용하는 Prefect MCP 서버 구성을 제공합니다. 이 구성은 Cursor IDE와 함께 사용하도록 맞춤 설계되었습니다.

필수 조건

  • Python 3.9 이상.

  • Python 환경을 관리하기 위한 선호되는 가상 환경 도구(예: uv)입니다.

  • Prefect 3(설치 지침은 Prefect 설명서를 참조하세요).

Related MCP server: MCP Prompt Server

설치

가상 환경을 만들고 활성화한 다음 Prefect MCP Server를 설치하세요.

지엑스피1

구성

서버는 .cursor/mcp.json 파일을 통해 구성됩니다. 업데이트된 구성은 다음과 같습니다.

{
  "mcpServers": {
    "prefect": {
      "command": "uvx",
      "args": [
        "prefect-mcp-server"
      ],
      "env": {}
    }
  }
}

이 구성은 서버가 uv pip install 통해 설치된 정확한 패키지 버전과 함께 uvx 명령을 사용하도록 보장합니다. 이 접근 방식은 개발 환경의 안정성과 일관성을 향상시킵니다.

환경 변수

다음 환경 변수를 설정하여 Prefect 환경을 구성하세요. 프로젝트 루트에 .env 라는 이름의 파일을 만들고 다음과 같은 항목을 추가할 수 있습니다.

PREFECT_API_URL=http://localhost:4200/api

또한 필요한 경우 PREFECT_API_KEY 와 같은 다른 환경 변수를 설정하여 Prefect 서버나 Prefect Cloud에 인증하세요.

서버 실행

서버를 시작하려면 다음 명령을 실행하세요.

uv run <script>

또는 Cursor IDE를 구성하여 사용하는 경우, .cursor/mcp.json 에 지정된 명령을 통해 서버가 자동으로 호출됩니다.

선적 서류 비치

Prefect MCP 서버 기능 및 사용법에 대한 자세한 설명서는 docs/prefect_mcp_documentation.md 파일에서 확인할 수 있습니다. 설명서에는 다음이 포함됩니다.

  • 사용 가능한 도구와 해당 매개변수의 전체 목록

  • 설치 및 구성에 대한 지침

  • 다양한 MCP 클라이언트를 사용한 사용 예

  • Prefect 3.0 호환성 정보

커서 규칙

이 저장소에는 Prefect MCP 서버 작업을 위한 커서 규칙이 포함되어 있으며, .cursor/rules/ 디렉터리에 있습니다. 이 규칙은 커서 IDE에서 Prefect MCP를 사용할 때 상황에 맞는 도움말과 지침을 제공합니다.

추가 정보

  • Prefect 설치 및 사용에 대한 자세한 내용은 Prefect 설명서 를 참조하세요.

  • MCP(모델 컨텍스트 프로토콜)에 대한 자세한 내용은 MCP 설명서를 참조하세요.

  • Cursor에서 권장하는 대로 구성된 환경 내에서 스크립트를 실행하려면 uv run 사용하세요.

즐거운 코딩 되세요!

Available Tools

17 tools
cancel_flow_runB

Cancel a flow run.

Args:
    flow_run_id: ID of the flow run to cancel.

Inputs: flow_run_id (required). Returns: result

create_flow_runB

Create a new flow run for the specified deployment (Legacy).

Args:
    deployment_id: ID of the deployment to create a run for.
    parameters: Dictionary with parameters for the flow run (optional).

Inputs: deployment_id (required), parameters. Returns: result

create_flow_run_from_deploymentB

Create a new flow run for the specified deployment.

Args:
    deployment_id: ID of the deployment or name in format 'flow_name/deployment_name'.
    parameters: Dictionary with parameters for the flow run (optional).
    name: Optional name for the flow run.
    timeout: Timeout in seconds, 0 means no waiting for completion (default 0).

Inputs: deployment_id (required), parameters, name, timeout. Returns: result

filter_deploymentsB

Filter deployments based on specified criteria.

Args:
    filter_criteria: Dictionary with filter criteria according to Prefect API.
                     Example1: {"deployments": {"is_schedule_active": {"eq_": true}}}
                     Example2: {"deployments": {"tags": {"all_": ["production"]}}}

Inputs: filter_criteria (required). Returns: result

filter_flow_runsC

Filter flow runs based on specified criteria.

Args:
    filter_criteria: Dictionary with filter criteria according to Prefect API.
                     Example: {"flow_runs": {"state": {"type": {"any_": ["FAILED", "CRASHED"]}}}}

Inputs: filter_criteria (required). Returns: result

filter_flowsB

Filter flows based on specified criteria.

Args:
    filter_criteria: Dictionary with filter criteria according to Prefect API.
                     Example: {"flows": {"tags": {"all_": ["production"]}}}

Inputs: filter_criteria (required). Returns: result

get_deployment_by_idB

Get a deployment by its ID.

Args:
    deployment_id: ID of the deployment to retrieve.

Inputs: deployment_id (required). Returns: result

get_deployment_by_nameB

Get a deployment by its name.

Args:
    name: Name of the deployment to retrieve, in format "flow_name/deployment_name".

Inputs: name (required). Returns: result

get_flow_by_idB

Get a flow by its ID.

Args:
    flow_id: ID of the flow to retrieve.

Inputs: flow_id (required). Returns: result

get_flow_by_nameC

Get a flow by its name.

Args:
    name: Name of the flow to retrieve.

Inputs: name (required). Returns: result

get_flow_run_by_idB

Get a flow run by its ID.

Args:
    flow_run_id: ID of the flow run to retrieve.

Inputs: flow_run_id (required). Returns: result

list_deploymentsB

Get a list of deployments from the Prefect API.

Args:
    limit: Maximum number of deployments to return (default 20).
    offset: Number of deployments to skip (default 0).
    flow_id: Optional ID of the flow to filter deployments by.

Inputs: limit, offset, flow_id. Returns: result

list_flow_runsB

Get a list of flow runs from the Prefect API.

Args:
    limit: Maximum number of flow runs to return (default 20).
    offset: Number of flow runs to skip (default 0).
    flow_id: Optional ID of the flow to filter runs by.

Inputs: limit, offset, flow_id. Returns: result

list_flowsB

Get a list of flows from the Prefect API.

Args:
    limit: Maximum number of flows to return (default 20).
    offset: Number of flows to skip (default 0).

Inputs: limit, offset. Returns: result

search_deployments_by_statusB

Search for deployments by schedule status.

Args:
    is_schedule_active: Filter deployments by whether their schedule is active.
    limit: Maximum number of deployments to return (default 20).

Inputs: is_schedule_active, limit. Returns: result

search_flow_runs_by_stateB

Search for flow runs by state.

Args:
    state_type: Optional state type (e.g., "COMPLETED", "FAILED", "CRASHED").
    state_name: Optional state name (e.g., "Completed", "Failed").
    limit: Maximum number of flow runs to return (default 20).

Inputs: state_type, state_name, limit. Returns: result

search_flowsA

Search for flows by name and/or tags.

Args:
    name: Optional name to search for (case-insensitive contains match).
    tags: Optional list of tags to filter by.
    limit: Maximum number of flows to return (default 20).

Inputs: name, tags, limit. Returns: result

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific resources (flows, deployments, flow runs) with clear action verbs, but there is some overlap between filter_* and search_* tools that could cause confusion. For example, filter_deployments and search_deployments_by_status both filter deployments but use different approaches, and create_flow_run vs create_flow_run_from_deployment are similar with minor differences.

    Naming Consistency5/5

    Tool names follow a highly consistent verb_noun pattern throughout, with clear conventions like get_*, list_*, create_*, filter_*, search_*, and cancel_*. All names use snake_case uniformly, making them predictable and easy to parse for an agent.

    Tool Count4/5

    With 17 tools, the count is slightly high but reasonable for a workflow orchestration domain like Prefect, which requires operations across flows, deployments, and runs. It covers essential CRUD and query functions without being overwhelmingly bloated, though some tools could potentially be consolidated.

    Completeness5/5

    The tool set provides comprehensive coverage for managing Prefect workflows, including full CRUD/lifecycle operations for flows, deployments, and flow runs (e.g., create, get, list, filter, search, cancel). There are no obvious gaps that would hinder an agent from performing typical orchestration tasks, and the surface supports complex filtering and searching needs.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers