Prefect with Claude Code
Install the Prefect plugin in Claude Code to inspect flow runs and search Prefect documentation while you work on your code.

Before you start
Claude Code with plugin support and a Prefect Cloud account. The hosted plugin does not require a local Prefect installation.
Setup
Add the marketplace
Enter this in a Claude Code session.
Claude Code/plugin marketplace add prefecthq/prefect-mcp-serverInstall Prefect
Install the plugin, then follow the browser sign-in to choose the Prefect Cloud workspaces it can access.
Claude Code/plugin install prefect
Ask Claude Code to help with setup
Paste this into your coding agent to walk through the setup.
Help me install the official Prefect plugin in Claude Code. Read https://github.com/PrefectHQ/prefect-mcp-server for the current instructions. Check whether it is already installed before making changes. Explain the marketplace and plugin commands I need to enter, and guide me through Prefect Cloud sign-in without asking me to paste credentials into chat. After setup, list the workspaces you can access and ask which one to use. Do not run or modify workflows.
If the connection fails
If tools are missing, check that the plugin is enabled and reconnect its MCP server. For self-hosted Prefect, use the local MCP setup in the documentation instead of the Cloud plugin.