
Misata generates referentially consistent multi-table datasets from plain English prompts, YAML schemas, or existing database introspection. The MCP server exposes five tools to Claude and other clients: generate from natural language stories, preview inferred schemas before committing, validate existing schemas, introspect live database connections, and produce Oracle reports that verify row counts, foreign key integrity, and constraint satisfaction. You can ask for "a Brazilian fintech dataset with 1,000 customers and 3% fraud" and get back CSV paths plus table previews. Built for seeding dev databases, generating integration test fixtures, and prototyping BI dashboards without touching production data. Optional LLM enhancement layer supports richer semantic inference across Groq, Anthropic, and local Ollama models.
The relational synthetic data engine that satisfies exact business outcomes.
Generate complete multi-table databases with foreign keys that resolve, math that reconciles, and domain-authentic prose with zero Lorem Ipsum. From a single sentence, YAML schema, or live database.
Documentation · Misata Studio · Changelog
Prefer a visual interface? Try Misata Studio to design schemas on an interactive canvas and generate datasets directly in your browser.
Most synthetic data tools take existing data and imitate it. But in modern engineering, you rarely have clean data to start with—or you need data designed around a specific target outcome:
total_spent strictly equals the sum of their order line items."Misata works in reverse: you declare the outcome, and Misata solves for the individual rows that hit it to $0.00 error, guaranteed by a closed-form Gamma conditional-sum mechanism (arXiv:2606.08736). No machine learning models, no real data required, and zero hallucinated foreign keys.
Install via pip:
pip install misata
Generate a complete relational dataset from a single description:
misata generate \
--story "Brazilian fintech with R$ payments, CPF verification, and 3% fraud" \
--rows 1000 \
--output-dir ./demo_data
Outputs clean CSVs and an oracle_report.json verifying zero foreign key orphans, constraint satisfaction, and statistical fidelity.
import misata
# Generate multi-table DataFrames from plain English
data = misata.generate("SaaS startup with 500 users, monthly subscriptions, and 12% churn")
users_df = data["users"]
subscriptions_df = data["subscriptions"]
Replace boring or blank columns in an existing DataFrame with domain-authentic prose:
import misata
import pandas as pd
df = pd.read_csv("support_cases.csv")
# Automatically detects semantic columns (subjects, resolution notes, memos, error traces)
df_enriched = misata.enrich_text(df, seed=42)
The Faker + pandas script draws every column on its own: foreign keys are uniform, amounts are uniform, timestamps are flat across the clock, emails do not match names, and nothing reconciles under a JOIN. Write the shape down instead, and check the result:
# misata.yaml
seed: 7
tables:
customers:
rows: 2000
columns:
customer_id: {type: int, primary_key: true}
email: {type: text, text_type: email}
signup_at: {type: datetime, start: "2024-01-01", end: "2025-12-31"}
orders:
rows: 20000
columns:
order_id: {type: int, primary_key: true}
customer_id: {type: foreign_key, references: customers.customer_id}
ordered_at: {type: datetime, start: "2024-01-01", end: "2025-12-31"}
amount: {type: float, distribution: lognormal, mu: 3.8, sigma: 0.9, decimals: 2}
misata generate --config misata.yaml --output-dir data
misata audit data # contradictions: shipped before ordered, totals that do not add up
misata realism data # synthetic tells: uniform money, even fan-out, flat hours, no nulls
By default customers are unevenly active (a few place most orders), times of
day and days of the week have a rhythm, and every order postdates its
customer. A typo such as lamda: 3 is an error with a suggestion, not a
column of noise.
When the schema is not enough:
processes: declares how tickets, claims or orders move
through steps, with branch probabilities, rework loops and a duration per
step, and writes an event-log table (misata.to_xes for process mining).
Guide@misata.generator("tier") registers a function that
sees the parent row and a seeded RNG; the schema names it with
generator: tier, and misata --plugin my_module loads it on the CLI.
Guide@pytest.mark.misata(schema="misata.yaml") and a test receives
misata_tables or a seeded misata_sqlite URL. No conftest.
Guidetype: json with fields and type: array with
items generate real nested values (emails, cities, codes inside them);
misata.to_jsonl and misata.to_polars keep them nested.
Guidepreset: demo | test | load | ml | eval sets the
realism defaults that job needs: current dates, small fixtures, volume, or
declared dirt. Guidemisata.from_django() reads fields, choices,
lengths, validators and relations.
Guidemisata seed postgresql://... reads the
schema, honours CHECK, UNIQUE and column widths, and inserts everything in
one transaction.Does it obey the schema? On five SQL schemas with CHECK rules, composite keys, a self-referencing hierarchy and a six-level foreign-key chain, Misata generated from the DDL alone has zero violations; the Faker script people write instead has 15,000 to 50,000 per schema, and SDV's multi-table model, trained on valid data, has 3,000 to 5,600 on the three schemas it accepts (it refuses the other two). Counted by a checker that shares no code with Misata (validity benchmark).
How realistic is it? We test blind generation against held-out real data (benchmark). On Olist's real marketplace orders, a names-and-types schema with no access to the data is harder to tell from real rows than a Faker script (classifier AUC 0.63 vs 0.78, mean of five seeds) and than SDV fitted on 15,000 real orders (0.71). On NYC taxi trips it beats the script (0.75 vs 0.79) and gets the night-heavy hour curve closer than SDV does, but its fares are still too wide, and SDV fitted on the real trips stays ahead (0.68). The benchmark publishes both, and says which results followed a fix it prompted.
What separates Misata from legacy libraries like Faker and imitation models like SDV:
Declare the aggregate outcome (revenue curve, churn rate, seasonal surge, default curve), and Misata generates micro-rows whose monthly or annual sums match your target to $0.00 error. While off-the-shelf synthesizers miss aggregate targets by 74–86%, Misata hits them provably (read the research paper).
Misata includes a native Model Context Protocol (MCP) server. Cursor, Claude Code, and Windsurf can call create_sandbox to spin up an isolated SQLite database seeded with realistic relational data in 2 seconds. AI agents can test SQL queries and test code against real tables instead of guessing schema.
pip install "misata[mcp]" && misata mcp install --client all
Parent-child relationships across 10+ tables are resolved via topological rank ordering. Self-referential hierarchies, composite unique constraints, and temporal causality (signup_date <= order_date <= payment_date <= refund_date) are strictly enforced.
No Latin placeholder gibberish. Combinatorial microtext generators provide authentic text across 15+ real-world industries:
TID, QID, PRN).While Faker iterates row-by-row in pure Python (5,000–15,000 rows/s), Misata uses vectorized NumPy array operations. It generates 500,000 to 16,000,000 rows/second on a single CPU core.
misata seed)Point Misata directly at a PostgreSQL, MySQL, or SQLite database. Misata introspects foreign keys, check constraints, enums, and column types, generates a topological insertion plan, and seeds production-like data directly back into your database without writing schema code.
Misata is built for engineers, testers, data teams, and founders across dozens of everyday workloads:
misata seed).generate_diff): Add 5,000 new rows to an existing dataset while auto-offsetting IDs and preserving referential integrity.misata.mimic): Clone distributions and correlations from sensitive CSVs without copying a single original row.Faker was built over a decade ago for single-attribute mock values. For modern applications, it introduces critical failure modes:
| Problem in 2026 | Faker Reality | Misata |
|---|---|---|
| Relational Topology | ✗ 0 concept of databases or FKs; manual glue code required | ✓ Strict topological DAG; 0 orphan FKs guaranteed |
| Cross-Column Coherence | ✗ Incoherent (e.g. "Male" name, mismatched email, invalid city) | ✓ Coherent identities, addresses, and causality |
| Text Realism | ✗ 2,000-year-old Latin "Lorem Ipsum" or robotic templates | ✓ 15+ domain microtext pools (SOAP notes, tickets, memos) |
| Mathematical Consistency | ✗ Violates basic accounting (price * qty != total) | ✓ Exact mathematical formulas and balanced ledgers |
| Performance | ✗ ~10k rows/s (single-threaded Python loops) | ✓ 500k to 16M rows/s (Vectorized NumPy engine) |
| Aggregate Targets | ✗ Impossible (uniform random noise) | ✓ Exact closed-form outcome conformance ($0.00 error) |
| Database Seeding | ✗ Manual SQL scripts or ORM boilerplate | ✓ One-command introspection and seeding (misata seed) |
Read the complete Faker vs SDV vs Misata Guide for full benchmarks and code comparisons.
Misata fits whatever workflow you already use:
| Input Mode | Best For | Learn More |
|---|---|---|
| 1. Plain English Story | Rapid prototyping, zero configuration | Story Guide |
| 2. YAML Schema-as-Code | Committing versioned data definitions to git | YAML Guide |
| 3. Live Database Seeding | Introspecting and populating Postgres, MySQL, SQLite | Database Seeding Guide |
| 4. Python Dict Schema | Programmatic in-memory generation in Python scripts | Dict Schema Guide |
| 5. dbt Project Schemas | Generating fixtures directly from schema.yml | dbt Seeding Guide |
| 6. Prisma Schema | Next.js and Node.js developers seeding full-stack apps | Prisma Guide |
| 7. Multi-Provider LLMs | Groq, OpenAI, Claude, Gemini, or Ollama-driven schemas | LLM Guide |
| 8. Incremental Growth | Appending rows with offset IDs and preserved FKs | Incremental Guide |
Generate domain-complete schemas with tuned statistical distributions out of the box:
SaaS · E-Commerce · FinTech · Healthcare · Logistics · Credit Risk · HR & People · Streaming Media · Insurance · CRM & Sales · Food Delivery · Travel & Hospitality · Gaming · Crypto & DeFi · Predictive Maintenance · Network Intrusion · Islamic Finance · EdTech · Real Estate · Contact Centers · Manufacturing SPC
See the Complete Domain Catalog.
Measured on standard Apple M-series hardware (single CPU core, no GPU):
| Workload | Row Count | Generation Time | Throughput |
|---|---|---|---|
| Single table (lognormal distribution) | 1,000,000 | 0.06 s | ~16M rows/s |
| Star schema (5 tables, 4 FK dependencies) | 1,055,030 | 1.54 s | ~687k rows/s |
| Multi-table enterprise database | 100,000 | 0.42 s | ~240k rows/s |
For in-depth guides, API references, and architecture deep dives:
enrich_text: Deep dive into all 15 microtext pools and DataFrame text enrichment.The closed-form exact-outcome conformance engine is formalised in arXiv preprint 2606.08736:
@article{rasin2026declarative,
title = {Declarative Outcome-Conformant Synthesis: Exact, Closed-Form
Specification Satisfaction and a Conformance Benchmark},
author = {Rasin, Muhammed},
year = {2026},
url = {https://arxiv.org/abs/2606.08736v1}
}
Misata is currently under massive, rapid development to push synthetic realism to its absolute limit: expanding real-world domain knowledge, deepening seed pool vocabularies, elevating textual column realism, and advancing statistical fidelity across every industry vertical.
Contributions from domain experts, data engineers, and researchers are warmly welcomed! Whether you want to:
misata/vocab_seeds.py and misata/microtext.py.git clone https://github.com/rasinmuhammed/misata
cd Misata
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest -q
Misata is open-source under the MIT License.