Prefect with Gemini CLI
Add Prefect’s MCP tools to Gemini CLI using a local Prefect connection.

Before you start
Gemini CLI, uv installed and available on PATH, and local Prefect authentication for your Cloud workspace or self-hosted server.
Setup
Configure local authentication
Set up your Prefect profile or environment variables before starting the MCP server. See the guide for Cloud and self-hosted options.
Prefect connection setupRegister the server
Run this in your terminal, then check that Gemini CLI can discover the Prefect tools.
Terminalgemini mcp add prefect uvx --from prefect-mcp prefect-mcp-server
Ask Gemini CLI to configure the connection
Paste this into your coding agent to walk through the setup.
Help me add Prefect’s MCP server to Gemini CLI. Use https://github.com/PrefectHQ/prefect-mcp-server for the supported configuration. Check for an existing Prefect MCP entry and for uvx before changing anything. Ask which Cloud workspace or self-hosted server I want to connect. Explain the changes, get my approval, and preserve existing servers. Keep credentials out of chat. Verify the active target and inspect recent runs without modifying workflows.
If the connection fails
If the server fails to start, check that uvx is available to Gemini CLI. If authentication fails, check the local Prefect profile or environment variables used by the MCP process.