Skip to main content

MCP server for interacting with the Prefect API

Project description

MseeP.ai Security Assessment Badge

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.

Prefect Server MCP server

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prefect_mcp_server-1.1.3.tar.gz (204.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prefect_mcp_server-1.1.3-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file prefect_mcp_server-1.1.3.tar.gz.

File metadata

  • Download URL: prefect_mcp_server-1.1.3.tar.gz
  • Upload date:
  • Size: 204.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for prefect_mcp_server-1.1.3.tar.gz
Algorithm Hash digest
SHA256 bfbc53f52cc2bd5e3f26e62ac5f78b234f9f64abde540d38c6ec3de075e10c0e
MD5 ad6c6ae44cabec9d560e1639ae3be875
BLAKE2b-256 fe7014ad0c1dd42d7ea6d20d8e77c1401366036e2e2b6017d9cd20486bf2646f

See more details on using hashes here.

File details

Details for the file prefect_mcp_server-1.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for prefect_mcp_server-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ada88b29570817c25e3e051512aeca2dee4ea59cb441b48a2c4fd823cdbd6547
MD5 5885b7b7851d329008e2b6aafb38a622
BLAKE2b-256 399e87b1d163541a113fe864a4b7bd4d088edb7e9baee0ddf9f8637c7e56b729

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page