Servando
02/20/2026, 12:53 AMMarvin
02/20/2026, 12:53 AMMarvin
02/20/2026, 12:59 AMprefect config view --show-sources
prefect profile ls
prefect profile inspect
- Sanity test the API connection:
prefect work-pool ls
If these fail, fix Cloud login first:
prefect cloud login -k <PREFECT_API_KEY> -w <account_handle>/<workspace_handle>
2) Run the MCP server directly with debug logs
PREFECT_LOGGING_LEVEL=DEBUG uvx --from prefect-mcp prefect-mcp-server
- If you rely on a non-default profile, set it explicitly:
PREFECT_PROFILE=<your_profile> uvx --from prefect-mcp prefect-mcp-server
- Or export env vars instead of profiles:
export PREFECT_API_URL="<https://api.prefect.cloud/api/accounts/<id>/workspaces/<id>>"
export PREFECT_API_KEY="pnu_xxx..."
PREFECT_LOGGING_LEVEL=DEBUG uvx --from prefect-mcp prefect-mcp-server
3) Common runtime errors and quick fixes
- 401 Unauthorized: wrong/expired key or wrong workspace. Re-run prefect cloud login or reset PREFECT_API_KEY and PREFECT_API_URL.
- Connection/timeouts to OSS server: ensure the server is reachable from that machine; for self-signed certs in dev, try:
export PREFECT_API_SSL_VERIFY_CERTS=false
- Profile not loading under your client: set PREFECT_PROFILE or use env vars as above (some clients don’t load shell profiles).
- Slow/large workspace: increase timeout:
export PREFECT_API_REQUEST_TIMEOUT=60
4) Client (Claude/Cursor/etc.) configuration checks
- Prefer STDIO transport: point the client’s MCP server command to:
uvx --from prefect-mcp prefect-mcp-server
- If you tried an HTTP/WebSocket transport, switch to STDIO unless you’ve confirmed HTTP is supported in your client and opened any required ports.
- Check the client’s MCP logs (most clients have a logs pane for each MCP server) for the first error line — that’s the most useful clue.
5) If it still won’t start, please share:
- Which MCP client (Claude Desktop/Code, Cursor, etc.) and OS
- Prefect Cloud vs self-hosted, and how you’re authenticating (profile vs env vars)
- The exact error or the first 30–40 lines of the MCP server startup logs from:
PREFECT_LOGGING_LEVEL=DEBUG uvx --from prefect-mcp prefect-mcp-server
Helpful references
- Docs: Use the Prefect MCP server
- Repo / issues: prefect-mcp-server on GitHub
If you’d like, I can also loop in our team to take a quick look live — happy to set that up.Nate
02/20/2026, 3:44 PMNate
02/20/2026, 3:44 PMServando
02/20/2026, 3:50 PMNate
02/20/2026, 3:51 PMServando
02/20/2026, 3:51 PMNate
02/20/2026, 3:51 PMServando
02/20/2026, 3:55 PMNate
02/20/2026, 5:24 PMcodex executable? i can't reproduce this
» codex mcp add prefect -- uvx --from prefect-mcp prefect-mcp-server
Added global MCP server 'prefect'.
» codex --dangerously-bypass-approvals-and-sandbox e 'whats my prefect identity'
OpenAI Codex v0.104.0 (research preview)
--------
workdir: /Users/nate/github.com/prefecthq/prefect-mcp-server
model: gpt-5.3-codex
provider: openai
approval: never
sandbox: danger-full-access
reasoning effort: high
reasoning summaries: auto
session id: 019c7c13-4179-75d0-b4d8-f11b1133af26
--------
user
whats my prefect identity
mcp: prefect starting
mcp: prefect ready
mcp startup: ready: prefect
thinking
**Planning identity retrieval**
codex
I'll query your connected Prefect instance now and return the identity details directly.
tool prefect.get_identity({})
prefect.get_identity({}) success in 55ms:
{
"content": [
{
"type": "text",
"text": "{\"success\":true,\"identity\":{\"api_url\":\"<http://localhost:4200/api/>\",\"version\":\"0.8.4\"},\"error\":null}"
}
],
"structuredContent": {
"success": true,
"identity": {
"api_url": "<http://localhost:4200/api/>",
"version": "0.8.4"
},
"error": null
},
"isError": false
}
thinking
**Clarifying identity display logic**
codex
Your Prefect identity is:
- `api_url`: `<http://localhost:4200/api/>`
- `version`: `0.8.4`
No user/account identity was returned, which usually means you're connected to a local OSS Prefect API.
tokens used
7,323
Your Prefect identity is:
- `api_url`: `<http://localhost:4200/api/>`
- `version`: `0.8.4`
No user/account identity was returned, which usually means you're connected to a local OSS Prefect API.