Prefect MCP Server

by MCP-Mirror

134 downloads
Not rated
GitHub

About

Prefect MCP Server is an MCP server that connects the Prefect workflow orchestration platform to MCP-compatible clients, primarily the Cursor IDE. It enables developers to interact with Prefect directly from their development environment using the Model Context Protocol.

Details

Author
MCP-Mirror
Downloads
134
Categories
Other

- Runs reliably via uvx for consistent environment handling
- Configurable through .cursor/mcp.json in Cursor IDE
- Supports authentication via PREFECT_API_KEY environment variable
- Compatible with Prefect 3.0 and Python 3.9+
- Includes Cursor Rules for contextual help and guidance

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Prefect MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via uv pip install -U prefect-mcp-server, configure the server in .cursor/mcp.json with the uvx command, and set environment variables like PREFECT_API_URL. The server then runs automatically within Cursor or can be started manually with uv run.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "prefect mcp server": {
            "fortunto2_prefect-mcp-server": {
                "command": "uv",
                "args": [
                    "venv",
                    "--python",
                    "3.12",
                    "&&",
                    "source",
                    ".venv/bin/activate"
                ]
            }
        }
    }
}

McpServers

{
    "fortunto2_prefect-mcp-server": {
        "command": "uv",
        "args": [
            "venv",
            "--python",
            "3.12",
            "&&",
            "source",
            ".venv/bin/activate"
        ]
    }
}

Prefect MCP Server

This repository provides a Prefect MCP server configuration using the prefect-mcp-server package with a reliable running mechanism via uvx. The configuration is tailored for use with the Cursor IDE.

Prerequisites

- Python 3.9 or newer.
- A preferred virtual environment tool (such as uv) for managing Python environments.
- Prefect 3 (see Prefect Documentation for installation instructions).

Installation

Create and activate your virtual environment, then install Prefect MCP Server:

uv venv --python 3.12 && source .venv/bin/activate
uv pip install -U prefect-mcp-server

Configuration

The server is configured via the .cursor/mcp.json file. The updated configuration is as follows:

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

This configuration ensures that the server uses the uvx command with the exact package version installed via uv pip install. This approach provides enhanced reliability and consistency in your development environment.

Environment Variables

Set the following environment variables to configure your Prefect environment. You can create a file named .env in the project root with entries such as:

PREFECT_API_URL=http://localhost:4200/api

Additionally, if needed, set other environment variables like PREFECT_API_KEY to authenticate with your Prefect server or Prefect Cloud.

Running the Server

To start the server, you can run the following command:

uv run <script>

Alternatively, if you are using the Cursor IDE with its configuration, the server will be automatically invoked with the command specified in .cursor/mcp.json.

Documentation

Detailed documentation on the Prefect MCP Server functionality and usage is available in the docs/prefect_mcp_documentation.md file. The documentation includes:

- Complete list of available tools and their parameters
- Instructions for installation and configuration
- Examples of usage with different MCP clients
- Prefect 3.0 compatibility information

Cursor Rules

This repository includes Cursor Rules for working with the Prefect MCP Server, located in the .cursor/rules/ directory. These rules provide contextual help and guidance when working with Prefect MCP in the Cursor IDE.

Additional Information

- For further details on Prefect installation and usage, please refer to the Prefect Documentation.
- For information about the Model Context Protocol (MCP), see the MCP Documentation.
- Use uv run for running scripts within the configured environment as recommended by Cursor.

Happy coding!

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.