flow-mcp
A minimal MCP server that provides business control primitives (finish, pause, resume, rewind, abort) for agent/skill orchestration, persisting actionable facts into structured state files.
README
flow-control-mcp
极简、稳定的业务控制原语 MCP Server。
flow-control-mcp 只做一件事:把 Agent/Skill 调用的 flow.* 业务控制工具,写成 .runs/state.json.businessControl 中可验证、可审计、可调度消费的结构化事实。
1. Install
npm install -g flow-control-mcp
本地开发:
npm install
npm run build
Node.js 要求 >=20。
2. Generate Claude Code Config
flow-control-mcp config claude --json
输出可作为跨用户共享模板:
{
"mcpServers": {
"flow-control-mcp": {
"command": "flow-control-mcp",
"args": [],
"env": {
"FLOW_MCP_REQ_PATH": "${FLOW_MCP_REQ_PATH}"
}
}
}
}
FLOW_MCP_REQ_PATH 应由 Agent Runtime 按会话注入;不同会话可以注入不同 request path。
前提:目标环境已通过 npm install -g flow-control-mcp 安装,并且 flow-control-mcp 在 Runtime PATH 中可用。Server 启动时仍会校验 Node.js >=20。
3. Verify
flow-control-mcp doctor --req-path /absolute/request/path --json
doctor 会检查实际 Node 路径、Node 版本、.runs、control-context.json、state.json、写权限和锁。
开发门禁:
npm run typecheck
npm run build
npm test
npm run test:integration
npm pack --dry-run
打包:
# 默认:不包含 runtime dependencies,安装时由 npm 拉取依赖
npm run pack:default
# 离线部署:包含 runtime dependencies
npm run pack:bundled
Contract
- Server 名称:
flow-control-mcp - Tools:
flow.finish、flow.pause、flow.resume、flow.rewind、flow.abort - Context:
FLOW_MCP_REQ_PATH/.runs/control-context.json - State:
FLOW_MCP_REQ_PATH/.runs/state.json.businessControl - Logs:运行日志只写 stderr;stdout 只用于 MCP 协议或 CLI 输出
最小 control-context.json:
{
"runId": "run-123",
"stage": "design",
"actionIndex": 1
}
更多 Claude Code、Linux、Windows 和故障定位说明见 docs/claude-code.md。
Skill 中如何调用 5 个业务控制原语见 docs/skill-usage.md。
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.