arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~

Secret MCP:基于证据约束和上下文隔离的网页截图设计规范生成系统

Secret MCP: Evidence-Bounded and Context-Isolated Design Specification Generation from Web Screenshots

Yeongjin Jo

arXiv 2608.24944首次发表:更新:

AI 中文总结

Secret MCP是开源本地系统,可从网页截图生成可审计的设计规范,通过分离各环节实现证据约束与上下文隔离,经测试满足编排不变性和语法合约合规性。

AI 中文摘要

截图转代码系统以渲染实现为优化目标,但网页截图缺失了文档结构、交互逻辑、响应式规则以及区分观察结果与猜测所需的来源信息。多参考提示还存在将一个参考的证据或推论污染另一个参考的风险。我们提出了Secret MCP,这是一个开源的本地系统,可为每个公开网页参考生成一份可审计的设计规范。它将检索、证据准备、模型调用、存储和检查环节分离。长截图会被调整大小并以重叠方式平铺;证据记录保留了准备空间和源空间的坐标以及实测调色板。一份包含19个部分的合约涵盖页面清单、导航几何、响应式矩阵、组件、可访问性、验收标准,以及针对实测、观察、推断和未知主张的明确标签。参考通过采样器接口依次处理。经评估的MCP适配器为每个参考发送一个采样/createMessage请求,其中includeContext设为none;全新处理适配器提供更强的边界。我们在两个级别评估了提交版本c130c9c:实时检索与夹具模型集成运行在排除第三个参考后选择了两个参考,准备了9张证据图片,发出了2个采样请求,生成了2份文档,且未出现跨参考标识符;对3份外部生成的设计索引的静态审计发现,每份文档都包含全部19个要求部分,每份文档有1个唯一参考标识符,共8个页面规范、1943个像素级测量值和319个颜色文本。这些测试确立了编排不变性和语法合约合规性,而非语义或视觉重建的准确性。尽管MCP采样将在2026年弃用,采样器抽象仍在直接模型API和传输中保留了这些边界。

英文摘要

Screenshot-to-code systems optimize for rendered implementations, but screenshots omit document structure, interaction logic, responsive rules, and provenance needed to distinguish observation from guesswork. Multi-reference prompts also risk contaminating one reference with evidence or inferences from another. We present Secret MCP, an open-source local system that produces one auditable design specification per public web reference. It separates retrieval, evidence preparation, model invocation, storage, and inspection. Long captures are resized and tiled with overlap; evidence records preserve prepared- and source-space coordinates and a measured color palette. A 19-section contract covers page inventories, navigation geometry, responsive matrices, components, accessibility, acceptance criteria, and explicit labels for measured, observed, inferred, and unknown claims. References are processed sequentially through a sampler interface. The evaluated MCP adapter sends one sampling/createMessage request per reference with includeContext set to none; a fresh-process adapter provides a stronger boundary. We evaluate commit c130c9c at two levels. A live retrieval and fixture-model integration run selected two references after excluding a third, prepared nine evidence images, issued two sampling requests, and produced two documents with zero cross-reference identifier occurrences. A static audit of three externally generated design indexes found all 19 required sections in every document, one unique reference identifier per document, eight page specifications, 1,943 pixel-valued measurements, and 319 color literals. These tests establish orchestration invariants and syntactic contract compliance, not semantic or visual reconstruction accuracy. The sampler abstraction preserves these boundaries across direct model APIs and transports despite MCP sampling's 2026 deprecation.

Comments7 pages, 2 figures, 3 tables. Source code and evaluation artifacts: https://github.com/yyeongjin/secret_mcp

论文原文

arXiv 摘要页 · PDF 原文 · HTML 原文

↑