Skip to main content

MCP Server for Alibaba Cloud FNF (Serverless Workflow)

Project description

yuppie-mcp-fnf

阿里云 FNF (Serverless 工作流) MCP Server — 让 AI 助手通过 MCP 协议操作阿里云 FNF。

功能

流程管理

  • 查询流程详情: 获取指定流程的名称、类型、执行模式、描述等信息
  • 流程列表: 批量查询流程,支持分页

执行管理

  • 异步启动执行: 启动流程执行并立即返回
  • 同步启动执行: 启动流程执行并等待完成
  • 停止执行: 停止正在运行的执行
  • 查询执行状态: 获取指定执行的状态信息
  • 执行历史列表: 查询流程的执行记录列表,支持分页
  • 执行步骤详情: 获取执行的每个步骤的详细信息

快速开始

安装

pip install yuppie-mcp-fnf

配置

通过环境变量配置阿里云凭证:

export FNF_ACCESS_KEY_ID=your_access_key_id
export FNF_ACCESS_KEY_SECRET=your_access_key_secret
# 可选:指定 endpoint(默认 cn-hangzhou.fnf.aliyuncs.com)
export FNF_ENDPOINT=cn-hangzhou.fnf.aliyuncs.com

运行

yuppie-mcp-fnf

开发

git clone https://github.com/yuppie1949/yuppie-mcp-fnf
cd yuppie-mcp-fnf
uv pip install -e ".[dev]"
uv run pytest -v

本地调试

# 方式1: 直接通过环境变量运行
FNF_ACCESS_KEY_ID=xxx FNF_ACCESS_KEY_SECRET=xxx uv run yuppie-mcp-fnf

# 方式2: 使用 .env 文件(推荐)
# 先编辑 .env 填入真实凭证,然后:
uv run yuppie-mcp-fnf

# 方式3: 使用 MCP Inspector 调试
npx @modelcontextprotocol/inspector uv run yuppie-mcp-fnf

工具列表

工具名 说明
fnf_describe_flow 获取 FNF 流程信息
fnf_describe_flow_inputs 获取 FNF 流程信息及入参定义(含类型、示例 JSON)
fnf_list_flows 查询 FNF 流程列表
fnf_start_execution 异步启动 FNF 流程执行
fnf_start_sync_execution 同步启动 FNF 流程执行
fnf_stop_execution 停止 FNF 流程执行
fnf_describe_execution 查询 FNF 执行状态
fnf_list_executions 查询 FNF 执行历史列表
fnf_get_execution_history 获取 FNF 执行步骤详情

入参定义(fnf_describe_flow_inputs)

fnf_describe_flow_inputs 可以从 Flow 的 States 中解析出入参定义,让 AI 知道每个参数的格式。

在 FNF Flow 中创建一个 模板转换 节点(Action: Extensions:TemplateTransform), template 字段写入参的 JSON 定义:

支持的类型

类型 含义 示例值
string 字符串 "示例文本"
int 整数 0
select 下拉选择(需 enum "第一个选项"
object JSON 对象 {"key": "value"}
array[string] 字符串数组 ["item1", "item2"]
file 单文件 "https://example.com/file.pdf"
file-list 文件列表 ["url1", "url2"]

示例

{
    "title": {"type": "string", "label": "文章标题", "required": 1},
    "partment": {"type": "select", "label": "部门", "enum": ["销售部", "技术部"]},
    "count": {"type": "int", "label": "数量"},
    "info": {"type": "object", "label": "详细信息"},
    "tags": {"type": "array[string]", "label": "标签"},
    "cover": {"type": "file", "label": "封面URL"},
    "attachments": {"type": "file-list", "label": "附件列表"}
}

许可证

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yuppie_mcp_fnf-0.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yuppie_mcp_fnf-0.1.0-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file yuppie_mcp_fnf-0.1.0.tar.gz.

File metadata

  • Download URL: yuppie_mcp_fnf-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yuppie_mcp_fnf-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f42f46ac26b3c27054fb2cebbe8ccdfaa1e6d2efd97d7576c9e211241cdb3a21
MD5 a0a2d4c7cc6005f36d768ed3ed851e26
BLAKE2b-256 6d323b02af3ff4edefb44b9c9f4dd08ee665317249f8732d93e7818dc652efeb

See more details on using hashes here.

File details

Details for the file yuppie_mcp_fnf-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: yuppie_mcp_fnf-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for yuppie_mcp_fnf-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33df54e81748a8d1ceefa27274e5d99487d29f2ecef1ac3f8ae23aba02c6777f
MD5 cb53e62048a91c47de93e2eb8484f1ef
BLAKE2b-256 e20a52146b6cf22fc770f15e9b6e40be7619900a325017419da633c916629032

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page