Tdcv2

io.github.NickLiapin由 GitHub 账号 NickLiapin 发布v0.1.7更新于 Nov 7, 2026

Fake, mock and test data generator: CSV, JSON, SQL from a .tdc config, made locally by TDCv2.

已验证STDIO仅桌面开发者工具数据与分析

概览

AI 生成的概览

根据简短的 .tdc 配置在本机生成假数据、模拟数据和测试数据(CSV、JSON、SQL 插入语句或任意文本),并提供校验配置、预览或写入文件、管理数据包的工具。

可以做什么
  • 阅读内置的 TDCv2 文档与指南,再编写配置
  • 校验 .tdc 配置,返回诊断信息、提示和修改建议
  • 生成 CSV、JSON、SQL 或文本测试数据,可在内存中预览若干行,或在项目内写出完整文件
  • 按关键词搜索已安装的数据包,并安装缺失的语言或国家数据包
  • 汇总项目中的 CSV、JSON 或 SQL 文件:行数、各列取值分布与范围、每张表的 INSERT 行数
  • 格式化 .tdc 配置
适用场景
适合需要数据库种子数据、测试夹具、演示数据或合成记录的场合,尤其是希望得到真实感的姓名、地址、IBAN 等取值,并且结果能由配置文件稳定复现,而不是手写生成脚本。
运行要求
以本地 stdio 进程运行,通过 npx 启动 tdcv2-mcp 包,需要 Node.js 20 或更高版本。未声明账号、API 密钥或环境变量;对于在根目录启动服务器的客户端,可用 TDCV2_PROJECT 指定项目文件夹。首次下载 npm 包和下载数据包时需要网络访问。
安装前请注意
生成的文件会写入项目文件夹,助手因此可以在磁盘上创建文件。运行 tdc_pack_add 时会从公共注册表下载数据包,客户端会先请求你授权。若配置中使用 http 生成器,会把指定字段的值发送到该网址。插件与技能只安装一种,否则技能会重复加载并启动两个服务器。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Tdcv2,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

TDCv2 for AI agents

A data generator for your coding agent: fake, mock, synthetic and test data with TDCv2 — realistic names, emails, addresses, phone numbers, IBANs and more. The agent writes a small .tdc config, the TDCv2 engine generates the rows on your machine, and the same config gives the same file, byte for byte, every time you run it. CSV, JSON, SQL inserts or any text format; fields that agree with each other; exact shares; related tables; data packs for 95 languages and 198 countries. Think Faker, but for whole datasets: database seeds, test fixtures, demo data.

Two parts, one version:

  • a skill — teaches the agent the TDC language, the workflow and the traps (skills/tdcv2);
  • an MCP server, tdcv2-mcp — the same, as tools: check a config, generate, find and install data packs, summarise a file, read the docs (mcp/).

Install

Claude Code and Cowork — the plugin brings both the skill and the server. The simplest way: in claude.ai or the Claude app, Customize → Plugins → Discover, find TDCv2 — Fake & Test Data Generator, Add; Claude Code picks it up at the next session and keeps it updated. Or from this repository's marketplace:

sh
claude plugin marketplace add NickLiapin/tdcv2-agentsclaude plugin install tdcv2@tdcv2

Install one way, not both — otherwise the skill loads twice and two servers start.

Codex, Copilot, Gemini CLI, Cursor and other agents that read skills — put the skill where your agent looks for it:

sh
npx -y [email protected] install-skill            # ~/.claude/skills/tdcv2npx -y [email protected] install-skill --agents   # ~/.agents/skills/tdcv2npx -y [email protected] install-skill --project  # ./.claude/skills/tdcv2npx -y [email protected] install-skill --dir <skills folder>

Any MCP client (Claude Desktop, Cursor, VS Code…):

json
{ "mcpServers": { "tdcv2": { "command": "npx", "args": ["-y", "[email protected]"] } } }

Claude Desktop starts servers in /: add "env": {"TDCV2_PROJECT": "/path/to/project"} to that entry so the files have a folder to go to. On Windows use "command": "npx.cmd" if the client cannot start npx. Everything needs Node.js 20 or newer.

Step by step for each agent and client: TDC for AI agents.

Then ask in plain words — "500 customers from 20 countries as CSV", "a pytest test for validate_user on 50 different users" — and the agent takes it from there: writes the config, checks it with the engine, generates, and hands you the file together with the config that reproduces it.

Privacy

The engine runs locally. Neither the skill nor the server sends your data or your configs anywhere. The server reads .tdc files and writes generated files only inside the project folder it is started in.

Network access, all of it:

  • the plugin starts the server with npx -y [email protected], its own version (scripts/mcp-launch.mjs), so the first start downloads that exact version and its dependencies, the TDCv2 engine among them, from the npm registry;
  • npx -y [email protected] … in the commands above does the same, and so does npx -y [email protected] …, the exact engine version the agent runs;
  • with an engine of another version, the agent may read that version's doc page from raw.githubusercontent.com;
  • data packs are downloaded only when you or the agent run tdcv2 pack add (through the server: tdc_pack_add, which your client asks you to allow);
  • a config with <gen type="http" src="…"> sends the named values to that URL — only if someone writes such a config.

Nothing else is fetched, and nothing is sent. The full policy: PRIVACY.md.

Versions

This release, 0.1.7, is checked against TDCv2 0.3.7. The skill's reference is built from the engine's documentation for that version; with another engine version the agent reads that version's pages, and the engine's own check has the last word.

License

MIT

来源:README.md,提交 69ce546

工具

7

tdc_check

Check a TDCv2 config

Validate a .tdc config without generating anything. Returns every diagnostic with its code, line, column, hint and "did you mean" suggestion, plus warnings and whether a seed is set. Run it until the config is clean.

输入参数pathconfig

tdc_generate

Generate data from a TDCv2 config

Make test data — CSV, JSON, SQL, any text — from a .tdc config, instead of writing a generator script. Without `output`: renders in memory and returns the first `preview` lines (max 50) — nothing is written. With `output`: writes the whole file inside the project folder and returns its size, a per-column summary and the first lines. A failed <assert> comes back as row, message, condition and values, so the config can be fixed. Same config and seed give the same bytes every time.

输入参数pathseedcountconfigoutputpreview

tdc_find_packs

Find TDCv2 data packs

Search the data packs installed on this machine by words ("last name", "iban", "city") — the paths to write in <gen type="template" value="…"/>. Never guess a path; ask this. Returns path, the locales that have it, and what it holds (never the values).

输入参数limitquery必填locale

tdc_pack_add

Install TDCv2 data packs

Install data packs for other languages and countries — "fr", "de", "ja", "france", "brazil" — when tdc_find_packs says a locale is missing. Runs `tdcv2 pack add` of the engine this project uses, which downloads the packs from the public TDCv2 pack registry. In a project without a pack store it first runs `tdcv2 init --yes`, which writes tdcv2.config.json and a tdcv2-packs/ folder there (engines before --no-examples also add a few tdcv2-examples/ files).

输入参数ids必填

tdc_peek

Summarise a generated file

A short summary of a CSV, JSON or SQL file in the project: row count; per column the distinct values, the split, the range; INSERT rows per table. The proof that a file holds what was asked, without reading it all.

输入参数path必填rowscolumn

tdc_read_docs

Read the TDCv2 guide and reference

Start here when asked for test data, fixtures or seed data: the TDCv2 guide ("guide" — read it before the first config), traps check does not catch ("traps"), using the data from test code in five languages ("from-code"), several linked tables in one file ("linked-tables"), the list of reference pages ("index"), or one reference page such as "generators/date". `query` searches the page list.

输入参数pagequeryoffset

tdc_format

Format a TDCv2 config

Pretty-print a .tdc config the way `tdcv2 format` does. Returns the text unchanged if it does not parse.

输入参数config必填

版本历史

6
  1. v0.1.7最新Nov 4, 2026
  2. v0.1.6Oct 25, 2026
  3. v0.1.5Oct 17, 2026
  4. v0.1.4Oct 16, 2026
  5. v0.1.2Oct 1, 2026
  6. v0.1.1Sep 29, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分