Connect Prefect over MCP
Configure Prefect’s MCP server in another agent or editor. The connection uses standard MCP; available tools and setup details depend on your client.

Before you start
Check your client’s documentation for local stdio MCP support. Install uv and configure the Prefect Cloud workspace or self-hosted server you want to access. MCP compatibility alone does not mean every client or feature has been tested with Prefect.
Setup
Configure local Prefect authentication
Use your active Prefect profile or environment variables to select a Cloud workspace or self-hosted API. Keep credentials out of chat and committed configuration files.
Prefect connection setupRegister a local stdio server
In your client’s MCP settings, name the server prefect, choose stdio, set the command to uvx, and supply the three arguments separately: --from, prefect-mcp, prefect-mcp-server. The equivalent command is shown below; let your client start the process. JSON formats differ, so use your client’s own schema.
Server launch commanduvx --from prefect-mcp prefect-mcp-serverVerify the target and tools
Start the connection and review any trust or tool permissions. Ask your agent to confirm the configured Prefect target and read five recent flow runs without modifying anything. If your client only supports remote HTTP connections, use the deployment instructions in Prefect’s MCP guide instead of this local command.
Remote MCP deployment instructions
Ask your agent to check MCP setup
Paste this into your coding agent to walk through the setup.
Help me connect my MCP client to Prefect using https://docs.prefect.io/v3/how-to-guides/ai/use-prefect-mcp-server. First ask which client and version I use, and which Prefect Cloud workspace or self-hosted server I want. Check the client’s official documentation for supported transports and its configuration schema; do not assume another client’s JSON format works. For local stdio support, use command uvx with arguments ["--from", "prefect-mcp", "prefect-mcp-server"]. If only remote HTTP is supported, explain Prefect’s documented deployment alternative and stop for my approval before deploying anything. Check existing configuration, explain proposed changes, and ask before installing or editing. Preserve other servers and keep credentials out of chat and version control. Verify the target and read recent runs without changing workflows.
If the connection fails
Check that the client supports the chosen transport and can find uvx and your Prefect configuration. Startup, authentication, tool permissions, and remote-server support vary by client. Use the client’s logs and the official Prefect setup guide rather than copying a different agent’s configuration format.