SeedBase Test Data

io.github.marcelglaeser由 GitHub 账号 marcelglaeser 发布v0.2.2更新于 Oct 24, 2026

Generate realistic, FK-consistent synthetic test data for your databases from your AI assistant.

已验证Streamable HTTP可网页运行数据库开发者工具

概览

AI 生成的概览

SeedBase MCP 服务器,让助手列出项目、导入数据库结构,并生成以外键一致方式构造的合成测试数据(SQL INSERT)。

可以做什么
  • 列出并创建 SeedBase 项目,显示 id、名称和数据库类型
  • 从 SQL DDL、INSERT 转储、CSV/TSV、JSON 或 ORM 模型代码导入结构,并替换当前结构
  • 按指定 SQL 方言把项目结构读回为 CREATE TABLE 语句
  • 生成新的合成数据集,可设置每张表的行数,并按 id 获取仍在运行的生成任务
适用场景
当你需要为 Postgres、MySQL、SQLite 或 MSSQL 数据库准备贴近真实、保持外键关系的测试数据,并希望由助手端到端完成结构导入与数据生成时适用。
运行要求
需要 SeedBase 账号和 API 密钥(dr_sk_...):本地 stdio 方式通过环境变量 SEEDBASE_API_KEY 提供,托管端点则通过 Authorization bearer 请求头提供。本地方式经 npx 运行,需要 Node.js 18 以上,并需能访问 SeedBase 网络服务。
安装前请注意
API 密钥是敏感凭据,可访问你的 SeedBase 项目,请勿写入共享配置。导入结构会替换项目现有结构;创建项目和生成数据都会改动 SeedBase 账号中的状态。生成的数据和结构信息会发送到 SeedBase 的服务器。

安装

在 SourceWeft 中

  1. 打开 控制台中的 SeedBase Test Data,将其添加到工作区。
  2. 连接 Authorization token 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.marcelglaeser%2Fseedbase/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "seedbase-test-data": {
      "type": "http",
      "url": "https://seedba.se/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_TOKEN>"
      }
    }
  }
}

README

[Seedbase]

@seedbase/client

[smithery badge]

Generate realistic, relationship-preserving, privacy-safe test data for your databases — and pull it straight into your local or CI database.

Seedbase lives on seedbase.dev: you model (or import) a schema there, generate datasets, and use this package to pull them into Postgres, MySQL, SQLite and more. Schema-aware, foreign-key-correct, reproducible by seed.

This is the Node.js client, a counterpart to the Python SDK.

Install

bash
npm install @seedbase/client

Zero runtime dependencies — pure ESM, built on the native fetch of Node 18+.

Quickstart

js
import { SeedbaseClient } from "@seedbase/client";
// Token from the argument, $SEEDBASE_TOKEN, or ~/.seedbase/config.jsonconst client = new SeedbaseClient({ token: "dr_sk_..." });
// Trigger a generation and wait for it to finishconst gen = await client.generate(projectId, { seed: 42, wait: true });
// Download the result (Uint8Array)const bytes = await client.download(gen.id, { format: "sql" });import { writeFile } from "node:fs/promises";await writeFile("dump.sql", bytes);

MCP server (Claude Code, Claude Desktop & friends)

This package ships seedbase-mcp — a zero-dependency Model Context Protocol server that lets AI assistants generate test data for you. Describe what you need ("fill my Shop project with MySQL test data") and the assistant drives SeedBase end-to-end through five tools:

ToolWhat it does
list_projectsList your SeedBase projects (id, name, database type)
create_projectCreate a new, empty project
import_schemaImport a schema from SQL DDL (raw pg_dump --schema-only works), CSV/JSON or ORM model code
get_ddlGet a project's schema as CREATE TABLE statements, per dialect
generate_test_dataGenerate a fresh FK-consistent dataset and return it as SQL (large results are written to a local file, never truncated)

Hosted (zero install) — point any Streamable-HTTP MCP client at https://seedbase.dev/mcp with an Authorization: Bearer dr_sk_... header:

bash
claude mcp add-json seedbase '{"type":"http","url":"https://seedbase.dev/mcp","headers":{"Authorization":"Bearer dr_sk_..."}}'

Local via Claude Code (stdio):

bash
claude mcp add-json seedbase '{"type":"stdio","command":"npx","args":["-y","-p","@seedbase/client","seedbase-mcp"],"env":{"SEEDBASE_API_KEY":"dr_sk_..."}}'

Claude Desktop (claude_desktop_config.json):

json
{  "mcpServers": {    "seedbase": {      "command": "npx",      "args": ["-y", "-p", "@seedbase/client", "seedbase-mcp"],      "env": { "SEEDBASE_API_KEY": "dr_sk_..." }    }  }}

Create a free account at seedbase.dev/register (no credit card), then create an API key under Settings → API keys. The free tier is enough to generate full, foreign-key-consistent datasets. The server is stdio-only, talks exclusively to https://seedbase.dev, and stores nothing locally.

Authentication

The token is resolved in this order:

  1. The token option passed to the constructor.
  2. The SEEDBASE_TOKEN environment variable.
  3. The token field in ~/.seedbase/config.json (written by seedbase login).

API keys with the dr_sk_ prefix are sent as Authorization: Bearer ..., other tokens as Authorization: Token .... Get a key at seedbase.dev/settings?tab=api-keys.

API

js
new SeedbaseClient({  token,            // optional, see resolution order above  apiUrl,           // default "https://seedbase.dev/api/v1" (https enforced, http only for localhost)  configPath,       // override ~/.seedbase/config.json  requestTimeout,   // per-request timeout in ms, default 30000  fetch,            // inject a custom fetch (e.g. for tests)});
MethodDescription
listProjects()All datasets/projects (paginated, followed automatically).
getProject(projectId)A single project.
listGenerations(projectId)Generations for a project (paginated).
getGeneration(generationId)A single generation.
generate(projectId, opts)Trigger a generation. opts: { seed, rows, format, rebaseTo, wait, timeout, pollInterval }. With wait: true it polls until the generation reaches completed/failed/cancelled.
download(generationId, { format })Download the generated artifact as a Uint8Array. format defaults to "sql".
seededRows(projectId, { seed, rows })Generate and return the rows as { tableName: [row, ...] }, in foreign-key-safe order.
exportConfig(projectId)The project's engine config as an object.
importConfig(projectId, config)Replace the project's engine config.

All methods are async and return Promises. Failures throw a SeedbaseError (with .statusCode for HTTP errors), carrying a readable message that includes the server's detail or field errors.

js
import { SeedbaseError } from "@seedbase/client";
try {  await client.getProject("missing");} catch (err) {  if (err instanceof SeedbaseError) {    console.error(err.statusCode, err.message);  }}

Prisma seed

Fill a Prisma-managed database with realistic, foreign-key-consistent data, in one call. Your schema must already exist (your prisma migrate owns it); SeedBase only fills it. Free tier.

js
// prisma/seed.tsimport { PrismaClient } from "@prisma/client";import { SeedbaseClient } from "@seedbase/client";import { seedPrisma } from "@seedbase/client/prisma";
const prisma = new PrismaClient();const client = new SeedbaseClient({ token: process.env.SEEDBASE_TOKEN });
await seedPrisma(prisma, client, { project: process.env.SEEDBASE_PROJECT, seed: 42 });

Then run prisma db seed. A runnable demo (offline, no account) is in examples/prisma-seed-demo.mjs.

Links

MIT licensed.

来源:README.md,提交 297782b

工具

6

list_projects

List projects

List your SeedBase projects (id, name, database type). Use this first to find the project to work with.

无需输入参数。

get_ddl

Get schema DDL

Get a project's schema as CREATE TABLE statements. Accepts a project id or name and an optional SQL dialect (postgresql, mysql, sqlite, mssql).

输入参数dialectproject必填

generate_test_data

Generate test data

Generate a fresh synthetic dataset for a project and return it as SQL INSERT statements. Optionally set rows per table. The data is foreign-key consistent.

输入参数rowsseedproject必填

fetch_generation

Fetch generation result

Fetch a previously started generation by id: returns its status, and the SQL INSERT statements once completed. Use this when generate_test_data reported the generation as still running.

输入参数generation_id必填

create_project

Create project

Create a new, empty SeedBase project. Use import_schema afterwards to add the schema.

输入参数name必填db_type

import_schema

Import schema

Import a database schema into a project from pasted content: SQL DDL (CREATE TABLE …, raw pg_dump/mysqldump schema output works), SQL INSERT dumps, CSV/TSV, JSON, or ORM model code (Django, Prisma, SQLAlchemy, …). Replaces the project's current schema.

输入参数formatcontent必填project必填

版本历史

1
  1. v0.2.2最新Sep 16, 2026

评分

已满足适用检查项的 100%

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

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分