Qingflow MCP (CRUD)
Enables CRUD operations on Qingflow forms, queries, and records through agent-native tools like qf.query.plan and qf.query.rows.
README
Qingflow MCP (CRUD)
This MCP server exposes a canonical, agent-native public surface:
qf_tool_spec_getqf_form_getqf_field_resolveqf_value_probeqf.query.planqf.query.rowsqf.query.recordqf.query.aggregateqf.query.exportqf.records.mutate
Legacy tools still exist internally for compatibility logic, but they are no longer advertised via listTools().
It intentionally excludes delete for now.
Setup
Runtime requirement:
- Node.js
>=18
- Install dependencies:
npm install
- Set environment variables:
export QINGFLOW_BASE_URL="https://api.qingflow.com"
export QINGFLOW_ACCESS_TOKEN="your_access_token"
Optional:
export QINGFLOW_FORM_CACHE_TTL_MS=300000
export QINGFLOW_REQUEST_TIMEOUT_MS=18000
export QINGFLOW_EXECUTION_BUDGET_MS=20000
export QINGFLOW_ADAPTIVE_PAGING=1
export QINGFLOW_ADAPTIVE_MIN_PAGE_SIZE=20
export QINGFLOW_ADAPTIVE_TARGET_PAGE_MS=1200
export QINGFLOW_EXPORT_MAX_ROWS=10000
export QINGFLOW_EXPORT_DIR="/tmp/qingflow-mcp-exports"
Run
Development:
npm run dev
Build and run:
npm run build
npm start
Run tests:
npm test
Command Line Usage
qingflow-mcp still defaults to MCP stdio mode:
qingflow-mcp
Use CLI mode for quick local invocation:
# list all available tools
qingflow-mcp cli tools
# machine-readable tool list
qingflow-mcp cli tools --json
# canonical plan -> execute
qingflow-mcp cli call qf.query.plan --args '{
"kind":"rows",
"query":{
"app_key":"your_app_key",
"select":[1001,1002],
"where":[{"field":1003,"op":"between","from":"2026-01-01","to":"2026-01-31"}],
"limit":20
}
}'
# then execute with returned plan_id
qingflow-mcp cli call qf.query.rows --args '{"plan_id":"plan_xxx"}'
CLI Install
Global install from GitHub:
npm i -g git+https://github.com/853046310/qingflow-mcp.git
Install from npm (pinned version):
npm i -g qingflow-mcp@0.7.0
Or one-click installer:
curl -fsSL https://raw.githubusercontent.com/853046310/qingflow-mcp/main/install.sh | bash
Safer (review script before execution):
curl -fsSL https://raw.githubusercontent.com/853046310/qingflow-mcp/main/install.sh -o install.sh
less install.sh
bash install.sh
MCP client config example:
{
"mcpServers": {
"qingflow": {
"command": "qingflow-mcp",
"env": {
"QINGFLOW_BASE_URL": "https://api.qingflow.com",
"QINGFLOW_ACCESS_TOKEN": "your_access_token"
}
}
}
}
Recommended Flow
qf_apps_listto pick app.qf_form_getto inspect field ids/titles.qf_field_resolvefor field-name toque_idmapping.qf_value_probewhen the agent needs candidate field values and explicit match evidence.qf_record_createorqf_record_update.- If create/update returns only
request_id, callqf_operation_getto resolve async result.
Full calling contract (Chinese):
Canonical Usage
Public agent flow is now:
qf_form_get/qf_field_resolvewhen field mapping is unclearqf_value_probewhen field value candidates are unclearqf.query.plan- Execute the returned
plan_idwith:qf.query.rowsqf.query.recordqf.query.aggregateqf.query.exportqf.records.mutate
Planner Example
{
"kind": "aggregate",
"query": {
"app_key": "your_app_key",
"where": [
{ "field": 1003, "op": "between", "from": "2026-01-01", "to": "2026-01-31" }
],
"group_by": [1003],
"metrics": [
{ "op": "count" },
{ "column": 1002, "op": "sum" }
],
"strict_full": true
}
}
Execute Example
{
"plan_id": "plan_xxx"
}
Rules:
- Public execute tools require
plan_id. - Optional
query/actionecho is only used for drift checking. - If execute input drifts from the planned canonical query, the server returns
PLAN_DRIFT. - Public filtering uses canonical
where[]; legacyfiltersare no longer part of the public contract.
Aggregate Business Counts
Aggregate business summaries use one canonical count contract:
{
"summary": {
"counts": {
"source_record_count": 370,
"group_assignment_count": 405,
"metric_nonnull_record_count": 395
},
"primary_metric_total": 12272931.75,
"primary_metric_missing_count": 10
}
}
Default answer for “多少单/多少条” must read summary.counts.source_record_count.
Completeness
Canonical completeness is technical-only:
is_completeraw_scan_completescan_limit_hitfetched_pagesrequested_pagesactual_scanned_pagesscanned_pagesscan_limithas_morenext_page_tokenstop_reasonoutput_truncatedomitted_itemsomitted_chars
When strict_full=true, any incomplete result fails with INCOMPLETE_RESULT.
Error Protocol
Failures return structured JSON with a machine-readable error.code, for example:
{
"ok": false,
"error": {
"code": "PLAN_REQUIRED",
"message": "...",
"fix_hint": "...",
"retryable": true
}
}
Common codes:
PLAN_REQUIREDPLAN_NOT_READYPLAN_DRIFTFORBIDDEN_RUNTIME_ALIASVALIDATION_ERRORINCOMPLETE_RESULTUPSTREAM_TIMEOUTUPSTREAM_API_ERROR
Troubleshooting
If you see runtime errors around Headers or missing web APIs:
- Upgrade Node to
>=18. - Upgrade package to latest:
npm i -g qingflow-mcp@latest
- Verify runtime:
node -e "console.log(process.version, typeof fetch, typeof Headers)"
Publish
npm login
npm publish
If you publish under an npm scope, use:
npm publish --access public
Security Notes
- Keep
QINGFLOW_ACCESS_TOKENonly in runtime env vars; do not commit.env. - Rotate token immediately if it appears in screenshots, logs, or chat history.
Community
- Contributing: CONTRIBUTING.md
- Security: SECURITY.md
- Conduct: CODE_OF_CONDUCT.md
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。