MockHero

io.github.dinosaur24由 GitHub 帳號 dinosaur24 發布v0.2.0更新於 Oct 27, 2026

Generate realistic relational test data — 156 field types, 22 locales, JSON/CSV/SQL, free previews.

發布方自己的服務:Spendict

已驗證Streamable HTTP可網頁執行資料庫開發者工具

概覽

AI 產生的概覽

MockHero 讓助理產生逼真的關聯式測試資料(156 種欄位類型、22 種語言地區、JSON/CSV/SQL),提供免費預覽與選用付費方案。

可以做什麼
  • 依結構化 schema 或自然語言描述產生測試資料,支援關聯外鍵、多語言地區與 JSON/CSV/SQL 輸出
  • 使用電商、部落格、SaaS、社群等預建範本產生資料
  • 將 SQL CREATE TABLE 語句或 JSON 樣本轉換為 MockHero 的 schema 格式
  • 列出支援的欄位類型與可用範本
  • 估算 agent 方案費用,並完成免登入結帳流程:建立結帳、查詢狀態、領取 API 金鑰
適用情境
適合需要為開發、示範或測試準備種子資料,並希望由助理直接產生彼此關聯的資料表而不必手寫 schema 的情境。免費預覽模式可應付小規模明確 schema 或範本請求,金鑰則可解鎖提示詞產生與更大規模的請求。
執行需求
可作為本機 npm 套件透過 npx 執行(需 Node.js),也可連線遠端 Streamable HTTP 端點。選用的 MOCKHERO_API_KEY 可啟用提示詞模式、更大請求與 CSV/SQL 輸出;MOCKHERO_API_BASE 可覆寫 API 基礎位址。免費預覽、schema 偵測、欄位類型清單、範本與費用估算不需金鑰。
安裝前請注意
結帳工具會啟動真實的 Polar 付款流程與按量計費(每日免費額度用完後每 100 筆資料 0.001 美元),需由人在瀏覽器中完成付款。claim_agent_api_key 只會回傳一次 API 金鑰,須妥善保存。資料由第三方服務產生,請勿送出敏感 schema 或樣本。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MockHero,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.dinosaur24%2Fmockhero/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "mockhero": {
      "type": "http",
      "url": "https://mockhero.dev/mcp/agent"
    }
  }
}

README

@mockherodev/mcp-server

MCP server for MockHero — generate realistic test data from Claude Desktop, Claude Code, Cursor, Windsurf, and other AI agents.

Works with or without an API key:

  • No key (free preview): generate up to 100 records per request from explicit table schemas or small templates. Schema detection, field-type listing, templates, and cost estimates are always free.
  • With MOCKHERO_API_KEY (recommended): plain-English prompt generation, larger requests, CSV/SQL output on paid tiers, and metered agent-plan usage.

Hosted agent endpoint

Agents that support remote Streamable HTTP MCP can skip the npm install and connect directly to:

text
https://mockhero.dev/mcp/agent

The hosted endpoint includes the same tools as this package: cost estimation, loginless Polar checkout, checkout status, API key claiming, schema detection, templates, and data generation. Pass a key via Authorization: Bearer mh_YOUR_API_KEY (or the api_key tool argument) for authenticated calls.

Hosted agent endpoint

Agents that support remote Streamable HTTP MCP can connect directly to:

text
https://mockhero.dev/mcp/agent

The hosted endpoint includes cost estimation, loginless Polar checkout, checkout status, API key claiming, schema detection, templates, and authenticated data generation.

Setup

Claude Desktop

Add to ~/.claude/claude_desktop_config.json:

json
{  "mcpServers": {    "mockhero": {      "command": "npx",      "args": ["@mockherodev/mcp-server"],      "env": {        "MOCKHERO_API_KEY": "mh_live_your_key_here"      }    }  }}

Omit the env block entirely to run in free preview mode.

Cursor

Add to .cursor/mcp.json in your project:

json
{  "mcpServers": {    "mockhero": {      "command": "npx",      "args": ["@mockherodev/mcp-server"],      "env": {        "MOCKHERO_API_KEY": "mh_live_your_key_here"      }    }  }}

Claude Code

bash
# Free preview modeclaude mcp add mockhero -- npx @mockherodev/mcp-server
# Authenticatedclaude mcp add mockhero -- env MOCKHERO_API_KEY=mh_live_xxx npx @mockherodev/mcp-server

Get an API key without leaving your agent (loginless checkout)

No signup or dashboard needed. The agent-plan purchase flow is fully tool-driven:

  1. estimate_agent_usage — estimate cost first. The agent plan includes 500 free records per day, then $0.001 per 100 records (rounded up per request), billed monthly through Polar as Merchant of Record.
  2. create_agent_checkout — pass a billing email; returns a Polar checkout URL and a one-time claim_token. A human completes payment in the browser.
  3. check_agent_checkout_status — poll with the claim_token until status is paid.
  4. claim_agent_api_key — exchange the claim_token for the API key. The key is returned exactly once — store it securely.
  5. Restart this server with MOCKHERO_API_KEY=mh_... set (recommended path from here on).

Prefer a dashboard? Sign up free at mockhero.dev instead.

Tools

generate_test_data

Generate realistic test data from a structured schema or plain English description. Relational foreign keys, 156 field types, 22 locales, JSON/CSV/SQL output. Explicit schemas up to 100 records run free without a key; prompt mode and larger requests need MOCKHERO_API_KEY.

"Generate 50 users with German names and 200 orders linked to them"

generate_from_template

Generate data from a pre-built template (ecommerce, blog, saas, social) — no schema definition needed. Small scales (e.g. 0.05) stay within the free 100-record preview.

Use the ecommerce template at 2x scale with German locale

detect_schema

Convert SQL CREATE TABLE statements or JSON samples into MockHero's schema format. Free, no key required.

list_field_types

List all 156 supported field types with descriptions and parameters. Free, no key required.

list_templates

List pre-built schema templates. Free, no key required.

estimate_agent_usage

Estimate agent-plan cost before generating: free daily allowance remaining, billable records, billable 100-record units, and estimated dollar cost. Free, no key required.

create_agent_checkout

Create a loginless Polar checkout for the metered agent plan. Returns a checkout URL and one-time claim_token.

check_agent_checkout_status

Poll a checkout by claim_token until it is paid.

claim_agent_api_key

Claim the API key after payment. Returned once — store it and set MOCKHERO_API_KEY.

Environment variables

VariableRequiredDescription
MOCKHERO_API_KEYNoMockHero API key (mh_...). Without it, generation runs in free preview mode (≤100 records per request, explicit schemas/templates only).
MOCKHERO_API_BASENoBase URL of the MockHero API. Default https://mockhero.dev.

Pricing

  • Free tier: 500 records/day, 100 per request, JSON output.
  • Agent plan (loginless, metered): 500 free records/day, then $0.001 per 100 records, billed monthly via Polar (Merchant of Record).
  • Full pricing: mockhero.dev/agent-pricing.json

Links

來源:packages/mcp-server/README.md,提交 36778a4

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

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

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Spendict 整合