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 分