Prefect Workflow Manager
STDIOMCP server implementation allowing AI assistants to interact with Prefect through natural language.
MCP server implementation allowing AI assistants to interact with Prefect through natural language.
A Model Context Protocol (MCP) server implementation for Prefect, allowing AI assistants to interact with Prefect through natural language.
This MCP server provides access to the following Prefect APIs:
Set the following environment variables:
export PREFECT_API_URL="http://localhost:4200/api" # URL of your Prefect API export PREFECT_API_KEY="your_api_key" # Your Prefect API key (if using Prefect Cloud)
Run the MCP server, and prefect:
docker compose up
Once connected, an AI assistant can help users interact with Prefect using natural language. Examples:
Several of the endpoints have yet to be implemented
To add a new function to an existing API:
src/mcp_prefect
get_all_functions()
list in the moduleTo add a new API type:
APIType
in enums.py
src/prefect/
main.py
to include the new API typeExample usage:
{
"mcpServers": {
"mcp-prefect": {
"command": "mcp-prefect",
"args": [
"--transport", "sse"
],
"env": {
"PYTHONPATH": "/path/to/your/project/directory"
},
"cwd": "/path/to/your/project/directory"
}
}
}