esq-builder-mcp
Provides five MCP tools to build, validate, upload/publish, and analyze ESQ 1.0 question bank packages.
esq_build_package: validates and builds an ESQ ZIP from manifest, papers, answers, and output path; optionalauto_fixrepairs mechanical issues like non-ASCII keys, single-brace blanks, missing sequences, and records fixes.esq_validate_package: validates an ESQ ZIP using the built-in validator by default, or the official CLI whenvalidator_pathorESQ_VALIDATOR_PATHis set.esq_upload_and_publish: uploads a validated ZIP to the question-bank backend and optionally publishes, with 503 retry and job_id-based publish retry.esq_parse_wordlist: parses kajweb/dict JSONL high-frequency wordlists, with optional top_n and level labeling.esq_hot_words: computes hot words from passage texts, filtering by since_year, stopwords, and a word regex.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@esq-builder-mcp validate and auto-fix my ESQ question bank, then package it as a ZIP"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ESQ BUILDER MCP
题库包自由 · 双轨校验 · auto_fix 修复留痕 · uvx 一行接入
esq-builder-mcp 把 ESQ 1.0 题库包工具链固化为 5 个 MCP 工具:构建(自动修复机械性坑)→ 校验(内置 vendored + 官方 CLI 双轨)→ 上传发布(503 重试),外加 kajweb 词表解析与真题热点词统计。已上架 MCP Registry。
⭐ 如果 esq-builder-mcp 对你有帮助,点个 Star 就是最大的支持
为什么
技能(SKILL.md)传的是流程知识,LLM 每次执行都可能踩坑(ASCII key、双花括号、上传路径 405……)。本 server 把这些坑固化进工具代码——调用方不会再遇到它们。
工具 | 作用 | 固化的坑 |
| 校验 + 打包 ESQ ZIP(可选 | externalKey 纯 ASCII 3-200 位; |
| 校验 ESQ 包(默认内置校验器,可选官方 CLI 对账) | 双轨校验(见下) |
| 上传 + 发布到刷题机后端 | 路径写死 |
| kajweb/dict JSONL 高频词解析(.jsonl 或 book zip) | 逐行 json.loads(整文件 load 报 Extra data);wordRank 排序 |
| 真题 passage 热点词统计 | 近两年过滤;去停用词; |
auto_fix:机械性坑自动修复
esq_build_package(auto_fix=true) 在校验前自动修复「纯机械」的坑,修复明细记录在返回值 fixes 数组(审计):
含中文/非法字符的 packageId/paperKey/unitKey/questionKey →
cn.xxx.y2021.u1风格重建,answers 两级键自动同步改名单花括号
{blank:N}→ 双花括号{{blank:N}}缺失的
unit.sequence补 index+1;不达标 blockKey(如 2 位的p1)归一为block-{index}
判断性问题(空位数≠题数、答案不在选项中)不会被静默修复,仍走「拒绝 + 可行动错误」。默认 false 保持严格行为。
双轨校验
esq_validate_package 有两条通道,返回值 validator 字段标明所用通道:
默认:内置校验器(
esq_validator.py,vendor 自 backend/app/services/esq.py 校验子集,import 调用)——零外部依赖,PyPI/uvx/PyInstaller 分发可用;对账:官方 CLI——显式传
validator_path或设ESQ_VALIDATOR_PATH时走 subprocess 调官方校验器。
两条通道的一致性由 tests/test_validator_conformance.py 守护(本机有刷题机仓库时自动执行;后端校验逻辑变更后先跑它再同步 vendored 副本)。
Related MCP server: seohead
🚀 快速开始
# PyPI(任意 MCP 客户端,无需 clone)
uvx esq-builder-mcp # stdio 模式
# Windows 单文件 exe:到 Releases 下载 esq-builder-mcp.exe,客户端 command 直指该 exeZCode(~/.zcode/cli/config.json → mcpServers)或其他客户端:
{
"mcpServers": {
"esq-builder": {
"command": "uvx",
"args": ["esq-builder-mcp"]
}
}
}Windows 下 MCP 命令参数一律用正斜杠路径(Codex config.toml 转义坑的同款规避)。
📐 工具参数参考
以下参数表与 src/esq_builder_mcp/server.py 的实际签名逐一对应。
esq_build_package
参数 | 类型 | 必填 | 默认 | 说明 |
| object | 是 | — |
|
| array | 是 | — |
|
| object | 是 | — |
|
| string | 是 | — | 输出 ZIP 绝对路径 |
| boolean | 否 |
| 见上节;修复明细在返回值 |
返回 {ok, zip_path, totals, errors, fixes, warnings}。
esq_validate_package
参数 | 类型 | 必填 | 默认 | 说明 |
| string | 是 | — | ESQ 包路径 |
| string | 否 | (内置校验器) | 指定后改走官方校验器 CLI subprocess 对账;也可用环境变量 |
返回 {valid, errors|totals, validator};valid=true 且 0 errors 才可上传。
esq_upload_and_publish
参数 | 类型 | 必填 | 默认 | 说明 |
| string | 是 | — | ESQ 包路径(上传前先 |
| string | 否 |
| 刷题机后端地址(需先启动后端) |
| integer | 否 | (后端当前激活级别) | 题库 profile |
| boolean | 否 |
| 是否发布;publish 失败时上传已成功,用返回的 |
返回 {ok, job_id, uploaded, published}。
esq_parse_wordlist
参数 | 类型 | 必填 | 默认 | 说明 |
| string | 是 | — | kajweb/dict 高频词表 JSONL 或 book zip 路径 |
| integer | 否 | (全部) | 只取前 N 个(如四级核心词取 1162) |
| string | 否 | (不标注) | 级别名(如「四级·高频」) |
返回 {ok, count, bad_lines, words:[{rank, word, phonetic, translations, synonyms}]}。
esq_hot_words
参数 | 类型 | 必填 | 默认 | 说明 |
| array | 是 | — |
|
| integer | 否 |
| 只统计该年份之后的真题(默认近两年热点) |
| integer | 否 |
| 取前 N 个 |
| array | 否 | (无) | 额外停用词 |
返回 {ok, texts_scanned, unique_words, hot_words:[{term, count}]}。
🧪 测试
uv run pytest -v # 111 项;含 vendored vs 官方 CLI 一致性对账(无刷题机环境自动 skip)
uv run ruff check src tests && uv run bandit -r src -q --skip B101 # lint 与安全静态扫描(CI 同款)🌍 环境变量
变量 | 默认 | 说明 |
| (未设) | 设定后 |
🔁 与技能的关系
上游技能:
~/.agents/skills/esq-question-bank-import/SKILL.md(流程与数据源)本 server 是其「确定性环节」的工具化;AI 标注答案等 LLM 判断环节仍在技能侧。
📄 许可证、安全与隐私 (License, Security & Privacy)
许可证:MIT License
安全政策:SECURITY.md
隐私保护:PRIVACY.md(零遥测、100% 本地运算)
📌 更多:作者仓库矩阵(墨题刷题机 / 第二大脑 / 安全三部曲 / 孵化线)
Available Tools
5 toolsesq_build_packageEsq Build PackageC
校验并构建 ESQ 1.0 题库包 ZIP。
Inputs: papers (required), answers (required), manifest (required), output_path (required), +1 more. Returns: object
esq_hot_wordsEsq Hot WordsB
真题 passage 文本 → 热点词频统计(去停用词, [a-zA-Z][a-zA-Z'-]{3,})。
Inputs: texts (required), top_n, since_year, extra_stopwords. Returns: object
esq_parse_wordlistEsq Parse WordlistC
解析 kajweb/dict 高频词表 JSONL(wordRank=真题词频排序)。
Inputs: jsonl_path (required), level, top_n. Returns: object
esq_upload_and_publishEsq Upload And PublishA
上传 ESQ 包到刷题机后端并(可选)发布。上传前先 esq_validate_package。
Inputs: zip_path (required), publish, base_url, profile_id. Returns: object
esq_validate_packageEsq Validate PackageB
校验 ESQ 包(默认内置校验器, 与刷题机官方 esq.py 同规则)。
Inputs: zip_path (required), validator_path. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
esq_build_package and esq_validate_package overlap slightly since build also validates, but the descriptions clarify that build produces a ZIP while validate is a standalone check used as a pre-upload step. esq_parse_wordlist and esq_hot_words both deal with word frequency but target clearly different inputs (wordlist JSONL vs passage text).
All tools share the esq_ prefix and mostly follow a verb_noun pattern (build_package, validate_package, upload_and_publish, parse_wordlist). esq_hot_words breaks the pattern as a bare noun phrase, a minor deviation.
Five tools is well-scoped for a package builder/publisher, and each tool earns its place in the build-validate-upload pipeline plus two auxiliary analysis utilities.
The core lifecycle (build, validate, upload/publish) is covered, and the word-frequency helpers round out the domain. Minor gaps exist for listing/managing previously built packages, but the primary workflow has no dead ends.
Maintenance
Related MCP Connectors
Create, edit, validate, publish, and inspect Formasty forms and quizzes over authenticated MCP.
Manage Kajabi from any MCP client — products, pages, contacts, offers, emails, analytics.
Structured analysis API and remote MCP tool for text, JSON records and numeric series.
CSV structural checks and keyed diffs, SRT formatting, MCP result checks and review discovery.
Related MCP Servers
- AlicenseAqualityBmaintenanceZero-dependency stdio bridge to Moltline Studio's fleet of 14 hosted MCP servers covering code review, time operations, data transforms, business ops, education, research, outreach and more. Free tier requires no registration; premium tools unlock with a license. Independently audited, MCPize Verified A.10MIT
- AlicenseNot gradedqualityBmaintenanceEnables local-first SEO evidence tooling by analyzing Screaming Frog exports, running bounded live and infrastructure checks, and producing structured audits, task backlogs, and reports via CLI and MCP.MIT
- FlicenseNot gradedqualityCmaintenanceEnables creating and administering multiple quizzes, adding questions, registering participants, validating answers, reviewing responses, and managing leaderboards through MCP, accessible locally via stdio or remotely over HTTP.-
- AlicenseAqualityBmaintenanceEnables authors to automate publishing and managing their own Qimao (七猫) novel author-backend works through an MCP client, covering login and status, book creation and metadata, chapter add/edit/delete and batch publishing, short stories, read-only statistics and income, plus a local manuscript library, originality checks, and a genre knowledge base. Write operations follow a two-stage preview-then-confirm flow and it runs over stdio or Streamable HTTP with 30 tools and 8 read-only resources.3016 npmMIT