MCP server for interacting with Prefect
Project description
prefect-mcp-server
[!WARNING] This project is under active development and may change drastically at any time.
This is an experimental MCP server for Prefect. APIs, features, and behaviors are subject to change without notice. We encourage you to try it out, provide feedback, and contribute! Please create issues or open PRs with your ideas and suggestions.
an MCP server for interacting with prefect resources.
quick start
deploy on FastMCP Cloud
- fork this repository on github (
gh repo fork prefecthq/prefect-mcp-server) - go to fastmcp.cloud and sign in
- create a new server pointing to your fork:
- server path:
src/prefect_mcp_server/server.py - requirements:
pyproject.toml(or leave blank)
- server path:
- get your server URL (e.g.,
https://your-server-name.fastmcp.app/mcp) - add to your favorite MCP client (e.g., claude code):
# add to claude code with http transport
# environment variables are required when using FastMCP Cloud
claude mcp add prefect \
-e PREFECT_API_URL=https://api.prefect.cloud/api/accounts/[ACCOUNT_ID]/workspaces/[WORKSPACE_ID] \
-e PREFECT_API_KEY=your-cloud-api-key \
--transport http https://your-server-name.fastmcp.app/mcp
[!NOTE] when deploying to FastMCP Cloud, the server has no access to your local Prefect configuration. you must provide
PREFECT_API_URLandPREFECT_API_KEY(for Prefect Cloud) orPREFECT_API_AUTH_STRING(for OSS with basic auth) as environment variables in theclaude mcp addcommand above.
run locally
when running the MCP server locally (via stdio transport), it will automatically use your local Prefect configuration from ~/.prefect/profiles.toml if available.
# minimal setup - inherits from local prefect profile
claude mcp add prefect \
-- uvx prefect-mcp-server@git+https://github.com/prefecthq/prefect-mcp-server.git
# or explicitly set credentials
claude mcp add prefect \
-e PREFECT_API_URL=https://api.prefect.cloud/api/accounts/[ACCOUNT_ID]/workspaces/[WORKSPACE_ID] \
-e PREFECT_API_KEY=your-cloud-api-key \
-- uvx prefect-mcp-server@git+https://github.com/prefecthq/prefect-mcp-server.git
[!NOTE] for open-source servers with basic auth, use
PREFECT_API_AUTH_STRINGinstead ofPREFECT_API_KEY
capabilities
this server enables MCP clients like Claude Code to interact with your Prefect instance:
monitoring & inspection
- view dashboard overviews with flow run statistics and work pool status
- query deployments, flow runs, task runs, and work pools with advanced filtering
- retrieve detailed execution logs from flow runs
- track events across your workflow ecosystem
orchestration & actions
- trigger deployment runs with custom parameters and tags
- pass dynamic configurations to workflows at runtime
intelligent debugging
- get contextual guidance for troubleshooting failed flow runs
- diagnose deployment issues including concurrency problems
- identify root causes of workflow failures
development
setup & testing
# clone the repo
gh repo clone prefecthq/prefect-mcp-server && cd prefect-mcp-server
# install dev deps and pre-commit hooks
just setup
# run tests (uses ephemeral prefect database via prefect_test_harness)
just test
links
- FastMCP - the easiest way to build an mcp server
- FastMCP Cloud - deploy your MCP server to the cloud
- Prefect - the easiest way to build workflows
- Claude Code - one of the best MCP clients
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file prefect_mcp-0.0.1a1.tar.gz.
File metadata
- Download URL: prefect_mcp-0.0.1a1.tar.gz
- Upload date:
- Size: 271.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77be2941a8b6d14731b26bae72ad29559e79d36e73cff8bd4728eeeb6e1dacd4
|
|
| MD5 |
6631d3912a9bda591d908104173e4eff
|
|
| BLAKE2b-256 |
77a49501dcf033b43dea904300925c9293400b3508d86d07901b17617769443a
|
File details
Details for the file prefect_mcp-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: prefect_mcp-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.8.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13adb2170c2fdbb1ab7bd6e2ece61acf91cde9e574be760ea36a0b6f080b060d
|
|
| MD5 |
ce120a7e73b9ff815371523cdb757632
|
|
| BLAKE2b-256 |
dd7ba39ea0aebd7faad51ac7b9e67ceeb7fedb990c1926b77043676de077930a
|