prefect
MCP server for interacting with the Prefect API
claude mcp add --transport stdio fortunto2-prefect-mcp-server uvx prefect-mcp-server
How to use
This MCP server provides a Prefect 3 compatible MCP server powered by the prefect-mcp-server package and managed via uvx for consistent environments. The server is designed to work with the Cursor IDE and relies on a local Prefect installation to expose and manage its tools and capabilities. You’ll primarily run the server within a Python virtual environment, and you can configure Prefect-related endpoints and credentials through environment variables such as PREFECT_API_URL and PREFECT_API_KEY. The server registers itself as an MCP service named prefect, and you can interact with the available Prefect MCP tools through your MCP client according to the documented tool parameters in the repository. When run via Cursor, the server is automatically invoked using the command configured in .cursor/mcp.json, otherwise you can start it manually using uvx to ensure the correct virtual environment and package version are used.
The Prefect MCP Server exposes a set of Prefect 3 tools and capabilities via the prefect-mcp-server package. These typically include tasks for scheduling and orchestrating flows, interacting with the Prefect API, and providing integration points for MCP clients to trigger runs, query work queues, and retrieve run/status data. Refer to the repository’s docs/prefect_mcp_documentation.md for the complete list of tools, their parameters, and usage examples in conjunction with MCP clients.
How to install
Prerequisites:
- Python 3.9 or newer
- A Python virtual environment tool (such as uv) for managing environments
- Prefect 3 (install guidance in Prefect docs)
Installation steps:
- Create and activate a Python virtual environment using uv and Python 3.12: uv venv --python 3.12 && source .venv/bin/activate
- Install the Prefect MCP Server package: uv pip install -U prefect-mcp-server
- Ensure you have a working Prefect 3 installation and API endpoint configured (see environment variables below).
- Configure the MCP server in .cursor/mcp.json as shown in the repository (mcpServers.prefect.command = "uvx" and args = ["prefect-mcp-server"]).
Optional: Create a .env file in the project root to store environment variables for Prefect (see environment variables section).
Additional notes
Environment variables and configuration:
- PREFECT_API_URL should point to your Prefect API endpoint (e.g., http://localhost:4200/api).
- PREFECT_API_KEY can be set if your Prefect deployment requires authentication.
- You can keep the runtime environment isolated by using a virtual environment managed by uvx as described in the installation steps.
- The server configuration is stored in .cursor/mcp.json. Cursor IDE users will have this configuration automatically applied for the Prefect MCP Server.
- If you need to customize the server beyond the default configuration, edit the mcp.json in the Cursor configuration directory and adjust the env variables under the prefect server entry.
- Running the server can be done with uv run <script>, or let Cursor invoke it automatically via the configured command.
- Refer to the Prefect MCP Server documentation and the repository docs/prefect_mcp_documentation.md for a complete list of tools and parameters.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP