Skip to main content
Glama

完美 MCP 服务器

Prefect的模型上下文协议 (MCP) 服务器实现,允许 AI 助手通过自然语言与 Prefect 进行交互。

特征

该 MCP 服务器提供对以下 Prefect API 的访问:

  • 流程管理:列出、获取和删除流程

  • 流程运行管理:创建、监控和控制流程运行

  • 部署管理:管理部署及其时间表

  • 任务运行管理:监视和控制任务运行

  • 工作队列管理:创建和管理工作队列

  • 区块管理:访问区块类型和文档

  • 变量管理:创建和管理变量

  • 工作区管理:获取有关工作区的信息

Related MCP server: n8n MCP Server

配置

设置以下环境变量:

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)

用法

运行 MCP 服务器,并进行以下操作:

docker compose up

示例输入

连接后,AI助手可以帮助用户使用自然语言与Prefect进行交互。示例:

  • “显示我的所有流程”

  • “列出昨天所有失败的流程运行”

  • “触发‘数据处理’部署”

  • “暂停‘每日报告’部署计划”

  • “我上次 ETL 流程运行的状态如何?”

发展

一些端点尚未实现

添加新功能

要向现有 API 添加新功能:

  1. 将该函数添加到src/mcp_prefect中的相应模块

  2. 将函数添加到模块中的get_all_functions()列表中

要添加新的 API 类型:

  1. enums.py中将新类型添加到APIType

  2. src/prefect/中创建一个新模块

  3. 更新main.py以包含新的 API 类型

使用示例:

{ "mcpServers": { "mcp-prefect": { "command": "mcp-prefect", "args": [ "--transport", "sse" ], "env": { "PYTHONPATH": "/path/to/your/project/directory" }, "cwd": "/path/to/your/project/directory" } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/allen-munsch/mcp-prefect'

If you have feedback or need assistance with the MCP directory API, please join our Discord server