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 集成