- Home
- MCP servers
- Prefect
Prefect
- python
7
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"fortunto2-prefect-mcp-server": {
"command": "uvx",
"args": [
"prefect-mcp-server"
],
"env": {
"PREFECT_API_KEY": "YOUR_API_KEY",
"PREFECT_API_URL": "http://localhost:4200/api"
}
}
}
}You run a Prefect MCP Server to expose and manage your Prefect 3 workflows through a dedicated MCP endpoint. This server lets you interact with Prefect APIs via the MCP protocol, enabling consistent integration with your MCP clients and Cursor IDE environment.
How to use
Connect your MCP client to the Prefect MCP Server you configured. Use the MCP client’s standard request flow to perform actions such as listing work available flows, triggering runs, and querying status. The server is designed to be reliable in a development setup and works with the Cursor IDE as your integration environment.
How to install
Prerequisites you need before starting:
- Python 3.9 or newer
- A preferred virtual environment tool (such as uv) for managing Python environments
- Prefect 3 (install as part of your workflow)
Step-by-step commands to set up the server in your project:
uv venv --python 3.12
source .venv/bin/activate
uv pip install -U prefect-mcp-server
Configuration
{
"mcpServers": {
"prefect": {
"command": "uvx",
"args": [
"prefect-mcp-server"
],
"env": {}
}
}
}
Environment variables
Set these environment variables to configure your Prefect environment. You can create a file named .env in the project root with entries such as:
PREFECT_API_URL=http://localhost:4200/api
Running the server
To start the server, use the following command in your project terminal:
uv run <script>
Notes on running in Cursor IDE
If you use the Cursor IDE, the server is automatically invoked with the command specified in your MCP configuration file and the integrated tooling will help you manage the development lifecycle.
Security and troubleshooting
Ensure your Prefect API URL is reachable from the development environment. If you encounter authentication issues, set or refresh PREFECT_API_KEY in your environment and verify the API URL is correct and accessible.
Additional information
Additional guidance on Prefect installation and usage can be found in the Prefect documentation. For context about MCP concepts, refer to the MCP guidance specific to your tooling and integration setup.