Skip to content
Back to search

serein-flow

可扩展的节点流编辑器与工作流引擎,内置 MCP,支持 AI 自动生成节点与流程。An extensible node-flow editor and workflow engine with built-in MCP, enabling AI-powered generation of nodes and workflows.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/fhhyyp--serein-flow/badge.svg)](/listings/fhhyyp--serein-flow)

HTML

<a href="/listings/fhhyyp--serein-flow"><img src="/api/listings/fhhyyp--serein-flow/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 227 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # SereinFlow
  2. [中文文档 | Chinese documentation](README.zh-CN.md)
  3. **Documentation portal:** [SereinFlow tutorials and current API reference](http://sereinflow.ningxi.cc) (Chinese).
  4. SereinFlow is a web-first workflow orchestration and execution system. It
  5. combines a visual web console, an ASP.NET Core API, isolated Worker Runner
  6. processes, and an MCP service for AI-tool integration.
  7. ## Project Overview
  8. SereinFlow is used to create, maintain, and run project workflows. The web
  9. console manages projects, flows, versions, runs, and environment settings. The
  10. API coordinates persisted data and execution requests, while untrusted scripts
  11. and plugins run only in separate Worker Runner processes. The MCP service
  12. exposes controlled tools, resources, and prompts so AI clients can work with
  13. SereinFlow safely.
  14. | Path | Purpose |
  15. | --- | --- |
  16. | `src/SereinFlow.Api` | ASP.NET Core API and the HTTP/stdio MCP host. |
  17. | `src/SereinFlow.SDK` | Typed HTTP client SDK for third-party applications. |
  18. | `frontend/sereinflow-web` | Vue + Vite web console. |
  19. | `plugins/sereinflow-ai-toolkit` | Local MCP client and Skill source material. |
  20. | `docs` | Maintained technical references. |
  21. ## Community & Technical Support
  22. If you need help using SereinFlow, join the QQ group **955830545** to contact me for technical support, usage discussions, or issue feedback.
  23. ## Prerequisites
  24. - .NET SDK `10.0.100` or a compatible SDK selected by
  25. [`global.json`](global.json).
  26. - Node.js `24.19.0`, as defined in [`.node-version`](.node-version), and npm
  27. `11.6.2`.
  28. - Windows is assumed for the environment-variable and Codex instructions
  29. below. The API and frontend commands are otherwise standard .NET and npm
  30. commands.
  31. Projects that use SereinLang rely on the pinned source snapshot under
  32. `src/ThirdParty/SereinScript`. A normal SereinFlow build needs neither a
  33. separate SereinScript checkout nor a path environment variable.
  34. ## Run Locally
  35. ### 1. Start the API
  36. From the repository root, run:
  37. ```powershell
  38. dotnet run --project .\src\SereinFlow.Api\SereinFlow.Api.csproj
  39. ```
  40. By default, the API and HTTP MCP service listen on `http://127.0.0.1:8188`,
  41. with MCP available at `http://127.0.0.1:8188/mcp`. The first start initializes
  42. local data under the configured `data` directory.
  43. ### 2. Start the Web Console
  44. Open a second terminal and run:
  45. ```powershell
  46. Set-Location .\frontend\sereinflow-web
  47. npm ci
  48. npm run dev
  49. ```
  50. Open the URL printed by Vite, usually `http://localhost:5173`. The development
  51. server proxies `/api` and `/hubs` to `http://127.0.0.1:8188` by default. Set
  52. `VITE_API_PROXY_TARGET` before starting the frontend when the API uses another
  53. address.
  54. ## Configure the MCP Service
  55. HTTP and MCP allow direct access by default, with no API key or sign-in.
  56. The framework targets industrial-control applications; application developers
  57. choose their network isolation and authentication. The default MCP connection is:
  58. ```json
  59. {
  60. "mcpServers": {
  61. "sereinflow": {
  62. "type": "http",
  63. "url": "http://127.0.0.1:8188/mcp"
  64. }
  65. }
  66. }
  67. ```
  68. Initialize this connection and discover its tools and resources to verify access.
  69. No credential environment variable is needed in the default `None` mode.
  70. ### Optional API-key Authentication
  71. The existing `SereinFlow.Security.ApiKeys` package remains optional. To enable it
  72. in the standalone host, set `SereinFlow:Security:Mode` to `ApiKey` and restart.
  73. Embedding hosts opt in with `UseApiKeySecurity()` or integrate existing identity
  74. providers with `UseHostSecurity()`. The key setup steps below apply only after
  75. API-key authentication is explicitly enabled.
  76. The following workflow configures an HTTP MCP client for a locally running
  77. SereinFlow instance. Start both the API and the web console before continuing.
  78. ### 1. Generate the Administrator Key
  79. On the web sign-in page on the server machine, select **Create initial
  80. administrator**, save the returned key, and sign in. Manage further keys in
  81. **Environment settings**. Save the administrator key
  82. shown there. It normally begins with `sfk_...`, and the complete Secret is
  83. shown only once when it is created or rotated.
  84. ### 2. Add the Environment Variable
  85. In Windows **Edit environment variables for your account**, add a user variable
  86. named `SEREINFLOW_MCP_API_KEY` whose value is the complete key you just
  87. generated. Alternatively, run this PowerShell command, replacing the example
  88. value with the real key:
  89. ```powershell
  90. setx SEREINFLOW_MCP_API_KEY "sfk_replace_with_your_complete_secret"
  91. ```
  92. After running `setx` or saving the system setting, close and reopen terminals
  93. and AI tools. Existing processes do not receive the new variable automatically.
  94. ### 3. Create a Local Skill for Your AI Tool
  95. Ask the AI tool you use to create a local Skill from the contents of
  96. [`plugins/sereinflow-ai-toolkit`](plugins/sereinflow-ai-toolkit). Its
  97. [`.mcp.json`](plugins/sereinflow-ai-toolkit/.mcp.json) defines the local HTTP
  98. MCP endpoint; add the `SEREINFLOW_MCP_API_KEY` credential variable only when API-key authentication is enabled. The
  99. [`SKILL.md`](plugins/sereinflow-ai-toolkit/skills/sereinflow/SKILL.md) defines
  100. the connection, diagnostics, capability-discovery, and safe-operation rules.
  101. Preserve the following connection contract when creating the Skill. Never put
  102. the real key in the repository, a Skill file, or logs:
  103. ```json
  104. {
  105. "mcpServers": {
  106. "sereinflow": {
  107. "type": "http",
  108. "url": "http://127.0.0.1:8188/mcp",
  109. "bearer_token_env_var": "SEREINFLOW_MCP_API_KEY"
  110. }
  111. }
  112. }
  113. ```
  114. ### 4. Verify the MCP Service
  115. First confirm that the route is reachable. With the API running, the following
  116. command is expected to print `405`. That means the `/mcp` route is listening;
  117. MCP requests must use `POST`.
  118. ```powershell
  119. try {
  120. Invoke-WebRequest -Method Get http://127.0.0.1:8188/mcp -ErrorAction Stop
  121. } catch {
  122. [int]$_.Exception.Response.StatusCode
  123. }
  124. ```
  125. Then start a new AI-tool session, connect to the `sereinflow` MCP server, and
  126. discover `tools/list`, `resources/list`, `resources/templates/list`, and
  127. `prompts/list`. A successful initialization and returned catalogs confirm that
  128. MCP authentication and the service are working.
  129. - A `401` normally means the endpoint and route are reachable but the key is
  130. missing, invalid, expired, or revoked.
  131. - Connection refusal or a timeout means the API is not reachable at
  132. `127.0.0.1:8188`.
  133. ### 5. Complete Setup
  134. Local MCP setup is complete once the AI tool can initialize and discover the
  135. MCP tools, resources, and prompts.
  136. ## Use SereinFlow MCP in Codex
  137. This credential-variable setup is needed only when optional API-key
  138. authentication is enabled. Default direct access requires no key variable.
  139. Codex's default safety policy can block this environment variable from being
  140. passed to Shell and command-line environments it launches. To use the
  141. SereinFlow MCP service in Codex, add the following to
  142. `%USERPROFILE%\.codex\config.toml`. If this table already exists, add only the
  143. variable line and do not declare the table twice:
  144. ```toml
  145. [shell_environment_policy.filters]
  146. SEREINFLOW_MCP_API_KEY = "include"
  147. ```
  148. Fully restart Codex and start a new task. This rule allows Codex-launched
  149. Shells to receive the variable; the MCP HTTP client must still use the
  150. `bearer_token_env_var` configuration shown above to read it.
  151. ## Build and Verify Locally
  152. ```powershell
  153. dotnet restore SereinFlow.sln
  154. dotnet build SereinFlow.sln --no-restore
  155. dotnet test SereinFlow.sln --no-build
  156. Set-Location frontend/sereinflow-web
  157. npm ci
  158. npm run build
  159. ```
  160. To verify the full publish layout for an upload library, publish
  161. [`tests/SereinFlow.TestLibrary`](tests/SereinFlow.TestLibrary/README.md). The
  162. command creates `artifacts/libraries/SereinFlow.TestLibrary-1.6.1.zip` with the
  163. complete publish output and required archive layout:
  164. ```powershell
  165. dotnet publish tests\SereinFlow.TestLibrary\SereinFlow.TestLibrary.csproj -c Release
  166. ```
  167. ## Security Notes
  168. An MCP key is a credential, not project configuration. Do not commit an
  169. `sfk_...` key to Git or place it in `.env` examples, test data, Skill files,
  170. prompts, or logs. Rotate or revoke a key from **Environment settings** when it
  171. is exposed, lost, or no longer needed.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.