
datuma_k
io.github.marthvon由 GitHub 账号 marthvon 发布v1.0.0更新于 Oct 24, 2026
Query, validate, preview, and generate source from *.dtct data contracts and *.ngin templates.
概览
本地 MCP 服务器,让助手在项目中查询、校验、预览并基于 datuma_k 数据契约与模板生成源码。
- 可以做什么
- 列出项目目录以及契约和模板路径,可指定根目录。按 trait、model、field、attribute 或 type 查询契约目录。校验契约与模板,需要项目中的关键字文件。预览生成计划而不写入任何内容。根据模板生成源码并写入生成的片段。给出何时使用 ngin 模板而非手写代码的建议,并推断 trait、widget、关联说明、同步风险和别名等模式。读取内置的 dtct、ngin 与规范语言资源及实践文档。
- 适用场景
- 适用于使用 datuma_k 数据契约和 ngin 模板的代码仓库,希望助手查看契约目录、检查契约、试运行生成,或搭建新的模型与字段时。
- 运行要求
- 通过 npx 从 npm 包以 stdio 在本地运行,需要 Node.js。必须已安装 datuma_k 二进制并位于 PATH 中,或通过 DATUMA_K 环境变量提供其绝对路径。进程工作目录应为包含 .env 的 datuma_k 项目目录,或在每次工具调用时传入 root。
安装
在 SourceWeft 中
- 打开 控制台中的 datuma_k,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
datuma_k MCP
stdio MCP server for agents using the installed datuma_k binary in an app repo. It does not link the compiler crate. Set DATUMA_K to the binary if it is not on PATH.
Install
Published to npm as @marthvon/datuma-k-mcp and to the MCP Registry as io.github.marthvon/datuma-k.
Cursor / Claude example (mcp.json):
datuma_k must be on PATH. If it is not, point DATUMA_K at the binary:
From source
Then use "command": "node" with "args": ["/ABS/PATH/TO/datuma_k/mcp/dist/index.js"].
The process cwd should be the datuma_k project (the directory with .env), or pass root on each tool call.
Tools
Resources
datuma://language/dtctdatuma://language/ngindatuma://language/standardsdatuma://docs/keywordsdatuma://docs/practicesdatuma://docs/when-ngin
Prompts
add-model, add-field, scaffold-ngin, should-use-ngin, infer-contract-patterns
Tests
Publishing
Two registries, in this order. npm hosts the tarball; the MCP Registry hosts only metadata and verifies it against the published npm package, so npm must go first or the second publish fails with Registry validation failed for package.
The io.github.marthvon/ prefix is not cosmetic: GitHub device-flow auth only grants that namespace. A different prefix needs DNS or HTTP auth.
One-time setup
npm requires 2FA to publish. If the account does not have it, npm publish fails with 403 ... Two-factor authentication or granular access token with bypass 2fa enabled is required, before it ever looks at the tarball. Check with npm profile get; enable with npm profile enable-2fa auth-and-writes or on npmjs.com, and keep the recovery codes.
Release
Bump the version in three places — the registry rejects a version it has already seen, and a mismatch between the npm package version and server.json packages[0].version fails verification:
package.json→versionserver.json→versionserver.json→packages[0].version
Then:
mcp-publisher login persists a token, so day-to-day releases are npm publish then mcp-publisher publish.
Verify:
What ships
files in package.json limits the tarball to dist, resources, and README.md. resources/ is required at runtime — server.ts resolves it as dist/../resources — so dropping it from files produces a package that installs cleanly and fails on every resource read. Confirm with npm pack --dry-run before publishing.
Troubleshooting
来源:mcp/README.md,提交 1e55220
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分