Prefect with Windsurf
Connect Windsurf’s Cascade agent to Prefect’s local MCP server to inspect runs and execution logs.

Before you start
This configuration is for Cascade. Current Windsurf documentation redirects to Devin Desktop and distinguishes Cascade from Devin Local, which has a different configuration. Confirm which agent you use before editing. Install uv and configure local Prefect authentication; your team must allow MCP servers.
Setup
Confirm your agent and Prefect target
Check that you are using Cascade, then configure your Cloud workspace or self-hosted server using Prefect’s MCP guide. For Devin Local, follow the configuration linked from the current Cascade documentation instead of the file below.
Current Cascade MCP documentationAdd the Cascade configuration
Open Cascade’s MCP settings and edit the raw configuration. Merge the prefect entry into your existing file without removing other servers. Keep credentials in your local Prefect profile or secure environment, not in this file.
~/.codeium/windsurf/mcp_config.json{ "mcpServers": { "prefect": { "command": "uvx", "args": ["--from", "prefect-mcp", "prefect-mcp-server"] } } }Enable Prefect in Cascade
Refresh the MCP server list and enable the Prefect tools. Ask Cascade to confirm the configured Prefect target and show five recent flow runs without changing anything.
Ask Cascade to configure the connection
Paste this into your coding agent to walk through the setup.
Help me connect Prefect to Windsurf’s Cascade agent. Read https://docs.prefect.io/v3/how-to-guides/ai/use-prefect-mcp-server and https://docs.windsurf.com/windsurf/cascade/mcp first. Confirm whether I am using Cascade or Devin Local: this setup targets Cascade; do not apply its file format to Devin Local. Check for uvx and existing MCP configuration. Ask which Prefect workspace or self-hosted server I want. With my approval, merge a prefect entry under mcpServers in Cascade’s existing configuration using command uvx and args ["--from", "prefect-mcp", "prefect-mcp-server"]. Preserve other servers, keep credentials out of chat and version control, and help me enable the tools. Confirm the target and read five recent flow runs without changing workflows.
If the connection fails
Confirm the configuration belongs to the agent you are actually using. For Cascade, check uvx availability, local Prefect authentication, and whether a team MCP allowlist blocks the prefect server. Enable the Prefect tools if they are connected but unavailable to the agent.