
Schema
io.github.rog0x由 GitHub 账号 rog0x 发布v1.0.1更新于 Oct 24, 2026
JSON Schema, TypeScript types, mocks for AI agents
概览
让助手从示例 JSON 数据生成、校验、模拟和对比 JSON Schema 与 TypeScript 类型。
- 可以做什么
- 提供五个 schema 相关工具:generate_json_schema 从示例 JSON 推断 JSON Schema,识别类型、必填字段、email、date、URI、UUID 等格式,并从多个示例中检测枚举模式。generate_typescript 从 JSON 数据或 JSON Schema 生成 TypeScript 接口与类型,支持嵌套对象、数组、可选字段、枚举和联合类型。validate_schema 按 schema 校验数据,并给出 JSON 路径、期望类型、实际值和被违反的约束关键字。mock_from_schema 依据字段名识别生成贴近实际的模拟数据,diff_schemas 对比两个 schema,列出新增、删除和变更的字段,并区分破坏性与非破坏性差异。
- 适用场景
- 适合助手需要从示例数据推导 schema 或 TypeScript 类型、检查数据是否符合 schema、生成测试数据,或评估 schema 变更是否破坏向后兼容性的场景。
- 运行要求
- 以 stdio 本地进程方式运行,通过 npm 包 @rog0x/mcp-schema-tools 安装;README 的安装步骤使用 npm install 与 npm run build 构建,并在 Claude Desktop 中配置用 node 启动构建产物 dist/index.js。未声明任何认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Schema,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mcp-schema-tools
MCP server providing schema validation and generation tools for AI agents.
Tools
generate_json_schema
Generate a JSON Schema from sample JSON data. Infers types, required fields, formats (email, date, URI, UUID), and detects enum patterns from multiple examples.
generate_typescript
Generate TypeScript interfaces and types from JSON data or a JSON Schema. Handles nested objects, arrays, optional fields, enums, and union types.
validate_schema
Validate data against a JSON Schema with detailed error messages including JSON path, expected type, actual value, and the violated constraint keyword.
mock_from_schema
Generate realistic mock data from a JSON Schema. Smart field-name detection produces contextual values: email fields get valid emails, name fields get realistic names, phone fields get formatted numbers, etc.
diff_schemas
Compare two JSON Schemas to find added, removed, and changed fields. Identifies type changes, constraint changes, and classifies each difference as breaking or non-breaking for backwards compatibility analysis.
Setup
Usage with Claude Desktop
Add to your claude_desktop_config.json:
License
MIT
来源:README.md,提交 215f5a3
工具
0版本历史
1- v1.0.1最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。