MockHero

v0.2.0
io.github.dinosaur24/mockhero Checked 16 hours ago Published 5 months ago

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

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

generate_test_data

Generate realistic test data for database tables. Send either a structured schema (tables with fields) or a plain English description. Supports relational data with foreign keys, locale-aware names and addresses, 22 locales, 156 field types, and multiple output formats (JSON, CSV, SQL). The killer feature: define multiple tables with "ref" fields, and all foreign key relationships are correct — orders reference real user IDs, reviews link to real products. One call seeds your entire database. Auto-locale: add a "country" field as an enum with country codes (DE, FR, US, etc.) and names, em…

ParameterTypeDescription
formatstringOutput format
localestringDefault locale (en, de, fr, es, ja, etc.). Auto-detected from country field if present.
promptstringPlain English description (e.g. "50 users with German names and 200 orders linked to them"). Requires a MockHero API key.
seednumberSeed for reproducible output. Same seed + same schema = identical data.
sql_dialectstringSQL dialect (only when format=sql)
tablesarrayStructured schema — array of table definitions

generate_from_template

Generate test data using a pre-built schema template. Pick a template (ecommerce, blog, saas, social) and optionally adjust the scale, locale, format, and seed. The template handles all the table definitions, field types, and foreign key relationships for you. Scale multiplier: 1.0 = default counts, 2.0 = double, 0.5 = half. Example: ecommerce template at scale 2.0 generates 100 users, 200 products, etc. Small template previews up to 100 records can run free without an API key (use a small scale such as 0.05); larger or production usage requires a MockHero API key (see create_agent_checkout…

ParameterTypeDescription
template *stringTemplate name
formatstringOutput format
localestringDefault locale (en, de, fr, es, etc.)
scalenumberScale multiplier for record counts (default 1.0). Free keyless previews are capped at 100 records — use a small scale such as 0.05.
seednumberSeed for reproducible output
sql_dialectstringSQL dialect (only when format=sql)

detect_schema

Convert an existing database schema or JSON sample into MockHero's schema format. Send a SQL CREATE TABLE statement and get back the structured schema ready to use with generate_test_data. Or send a sample JSON record and MockHero will infer the field types. This is useful when you have migration files or an existing database and want to generate test data that matches your schema without manually writing the definition. No API key required.

ParameterTypeDescription
sample_jsonobjectExample JSON record to infer schema from
sqlstringSQL CREATE TABLE statement(s) to convert

list_field_types

List all 156 available field types for test data generation. Returns every supported type organized by category (Identity, Location, Financial, Temporal, Technical, Content, Logic, Social, HR, Ecommerce, Security, AI/ML, Healthcare, Edge Cases, Special) with descriptions, parameters, and examples. Use this to discover what types are available before building a schema. No API key required.

list_templates

List pre-built schema templates for common application patterns. Available templates: - ecommerce: Customers, products, orders, order items, reviews (5 tables) - blog: Authors, posts, comments, tags, post_tags (5 tables) - saas: Organizations, members, subscriptions, invoices (4 tables) - social: Users, posts, likes, follows, messages (5 tables) Each template includes realistic field types, proper foreign key relationships, weighted enum distributions, and auto-locale detection via country fields. No API key required.

estimate_agent_usage

Estimate MockHero agent-plan cost before generating data. No login or API key is required; when MOCKHERO_API_KEY is configured the estimate uses actual daily usage. Agent plan pricing: 500 free records per day, then $0.001 per 100 records (rounded up per request), billed monthly through Polar as Merchant of Record. Send the same tables/template/prompt you plan to generate. For prompt-based estimates you must also pass estimated_records because this tool does not run prompt-to-schema conversion.

ParameterTypeDescription
daily_used_beforeintegerOptional assumption for records already used today when no API key is supplied.
estimated_recordsintegerRequired for prompt estimates because this tool does not run prompt-to-schema conversion.
formatstringOutput format
localestringDefault locale such as en, de, fr, es, or ja.
promptstringPlain-English data request. Requires estimated_records.
scalenumberMultiplier for template record counts.
seednumberSeed for reproducible output.
sql_dialectstringSQL dialect (only when format=sql)
tablesarrayStructured schema — array of table definitions
templatestringPre-built template name

create_agent_checkout

Create a loginless Polar Checkout URL for MockHero's metered agent plan. Polar is the Merchant of Record for checkout, tax collection, and remittance. No MockHero account or login is required — supply a billing email and receive a Polar checkout URL plus a one-time claim_token. After the checkout is paid, poll check_agent_checkout_status, then call claim_agent_api_key to receive the API key. Agent plan: 500 free records per day, then $0.001 per 100 records, billed monthly.

ParameterTypeDescription
email *stringBilling email for the agent or the agent operator.

check_agent_checkout_status

Poll a Polar checkout created by create_agent_checkout using the returned claim_token. Returns the checkout status (pending, paid, claimed, expired) and the next action to take (complete_checkout, claim_api_key, already_claimed, expired). Once status is paid, call claim_agent_api_key with the same token.

ParameterTypeDescription
token *stringclaim_token returned by create_agent_checkout.

claim_agent_api_key

Claim the MockHero API key after Polar marks the loginless agent checkout as paid. The key is returned once. Store the returned key securely and restart this MCP server with MOCKHERO_API_KEY set (or export it in the environment) to unlock plain-English prompt generation, requests above 100 records, and production usage.

ParameterTypeDescription
token *stringclaim_token returned by create_agent_checkout.