IF

IFlytek Workflow MCP Server Integration

Deploy a simple MCP server implementation to call iFlytek workflows via MCP tools.

Quick Install
npx -y @iflytek/ifly-workflow-mcp-server

Overview

The IFlytek Workflow MCP Server is a lightweight Model Context Protocol (MCP) server implementation that exposes iFlytek workflows as MCP tools. It lets LLM-based applications call and orchestrate iFlytek workflows through the standardized MCP interface, making it easy to provide contextual tool invocations to models or agents.

This server is useful when you want to integrate iFlytek’s workflow automation (multi-node flows, branching, loops, and streaming outputs) into LLM-based systems without writing custom adapters. By running the MCP server alongside your agent/MCP client, you can invoke published iFlytek workflows using the same tooling you already use to manage other MCP tools.

Features

  • Exposes iFlytek workflows over the Model Context Protocol (MCP) so LLMs/agents can call them as tools
  • Supports the full workflow model: start/end nodes, 14 node types (logic, tools, transforms, etc.), complex variable I/O
  • Execution orchestration: sequential, parallel, looped, and nested sub-workflow execution
  • Streaming output via hook mechanism for real-time responses
  • Multi-model orchestration support (Model-of-Models) at decision points in a workflow
  • Simple configuration via a YAML file listing flows and credentials
  • Designed to plug into MCP clients (e.g., Claude Desktop / MCP-compatible clients) via a persistent MCP server entry

Installation / Configuration

  1. Clone the repository (or point your MCP client to install from GitHub):
git clone https://github.com/iflytek/ifly-workflow-mcp-server
cd ifly-workflow-mcp-server
# Follow repo README for language-specific setup (Python/Node/etc.)
  1. Create a config.yaml with the workflows and credentials you want the server to expose. Example:
- flow_id: 'your_flow_id_123'               # required: published workflow id
  name: 'My Support Flow'                   # optional: local name
  description: 'Customer support flow'      # optional
  api_key: 'API_KEY:API_SECRET'             # required: get from iFlytek console
  1. Add a persistent MCP server entry in your MCP client config (example for claude_desktop_config.json or mcp.json):
{
  "mcpServers": {
    "ifly-workflow-mcp-server": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/iflytek/ifly-workflow-mcp-server",
        "ifly_workflow_mcp_server"
      ],
      "env": {
        "CONFIG_PATH": "/path/to/config.yaml"
      }
    }
  }
}

Notes:

  • CONFIG_PATH environment variable should point to your YAML file.
  • The MCP client will start the server and register it as an available MCP tool provider.

Obtaining flow_id and credentials

  1. Create a bot and build a workflow in the iFlytek console (BotCenter / Xinghuo).
  2. Debug and verify the workflow end-to-end.
  3. Publish the workflow and choose the “Publish as API” option.
  4. Bind the workflow to an application to obtain the flow_id and API credentials (API Key and API Secret). Combine them as “API_KEY:API_SECRET” for the config.yaml.

If you cannot bind an app, register an application at https://www.xfyun.cn.

Available Resources

  • GitHub repository: https://github.com/iflytek/ifly-workflow-mcp-server
  • MCP specification: https://modelcontextprotocol.io/introduction
  • iFlytek BotCenter / Workflow console: https://xinghuo.xfyun.cn/botcenter/createbot
  • iFlytek official portal for application registration: https://www.xfyun.cn

Available Tools / Capabilities

The MCP server exposes each configured workflow as an MCP tool. Typical capabilities available via the tool interface:

  • Invoke workflow by passing structured input (maps/JSON) to Start Node
  • Receive output from End Node (synchronous result or streaming hooks)
  • Pass and receive complex variables across nodes (nested objects, arrays)
  • Support for execution modes: sequential, parallel, loop, nested sub-workflows
  • Option to select different models at decision points (MoM hybrid model routing)

Example of calling the tool from an MCP-capable agent:

  • Provide a JSON payload to the workflow tool
  • Receive a streaming response if the workflow uses hooks
  • Handle multi-turn interactions if the workflow expects follow-up inputs

Use Cases

  • Customer support automation: route incoming user queries through a decision node to select an intent classifier model, run appropriate knowledge-base lookup nodes, and assemble a final answer — all invoked by an LLM agent via MCP.
  • Data enrichment pipelines: send user-provided records through parallel enrichment nodes (third-party APIs, internal services) and aggregate results before returning to the model for generation.
  • Multi-step document processing: orchestrate OCR → entity extraction → validation → summarization nodes; use loop/nested execution for batched documents.
  • Interactive assistants with tool use: allow an LLM to call a workflow that performs a sequence of actions (search, compute, notify) and streams intermediate progress back to the user.

Tips for Developers

  • Test workflows in the iFlytek console before wiring them into MCP to ensure expected inputs/outputs.
  • Use streaming hooks for long-running flows so the model or UI can display incremental progress.
  • Manage credentials securely (do not commit config.yaml with API keys into source control).
  • Start with a single simple flow entry in config.yaml, then expand to multiple flows as you validate behavior.

For code-level details, examples, and contribution guidelines, see the repository on GitHub.