Skip to main content
Glama

seedmask-mcp — Offline Deterministic pg_dump, MySQL, CSV & JSONL PII Anonymizer MCP Server, CLI & GitHub Action

z121245017-ai/seedmask-mcp MCP server

Zero-dependency, 100% offline Model Context Protocol (MCP) Server, CLI, and GitHub Action enabling AI coding agents (Claude Desktop, Claude Code, Cursor, Windsurf, Antigravity) and pull-request CI pipelines to deterministically sanitize PostgreSQL COPY ... FROM stdin dumps, MySQL INSERT INTO dumps, RFC 4180 .csv exports, and .jsonl / .json traces without breaking cross-table FOREIGN KEY joins, UNIQUE constraints, ISO/IEC 7812 Luhn payment card check digits, or GB 11643-1999 Mod 11-2 18-digit Resident ID check characters.

MCP Tools Exposed (stdio)

Tool

Purpose

Safety Annotations

anonymize_sql_or_structured_dump

Deterministically anonymizes PostgreSQL COPY ... FROM stdin blocks (preserving \N NULLs & jsonb), SQL INSERT INTO multi-row statements ('' & \' quote-safe), RFC 4180 .csv exports, and .jsonl/.json payloads via HMAC-SHA256 token mapping.

readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false

audit_unmasked_pii_exposure

Scans SQL seed scripts, CSV exports, and JSONL fixtures offline for live non-RFC-2606 emails, Luhn payment cards outside sandbox BINs, valid GB 11643-1999 18-digit IDs, public IPv4s, and unredacted JWT/API tokens without echoing raw secrets.

readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false

verify_cross_table_fk_consistency

Anonymizes two or more related SQL, CSV, or JSONL datasets under a shared HMAC-SHA256 session salt and verifies 100% FOREIGN KEY join parity across parent and child tables.

readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false

validate_synthetic_checksums

Validates or deterministically generates format-preserving test identifiers passing ISO/IEC 7812 Luhn Mod-10 (400000 test cards), GB 11643-1999 Mod 11-2 (18-digit Chinese Resident IDs), RFC 2606 safe emails, and RFC 5737 documentation IPs.

readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false

Related MCP server: SeedWeaver

Quick Start (MCP Client & Local CLI)

# Start MCP server over stdio (supports both NDJSON and Content-Length framing)
npx -y github:z121245017-ai/seedmask-mcp

# List MCP tool schemas from terminal
npx -y github:z121245017-ai/seedmask-mcp --list

# Deterministically sanitize a pg_dump or MySQL seed file offline
npx -y github:z121245017-ai/seedmask-mcp --input ./prod_dump.sql --output ./staging_seed.sql --salt staging-2026

# Audit repository test fixtures for accidental PII leaks (exits 2 on findings)
npx -y github:z121245017-ai/seedmask-mcp --input ./fixtures/seed.sql --audit-only

# Invoke any MCP tool directly via --cli
npx -y github:z121245017-ai/seedmask-mcp --cli validate_synthetic_checksums '{"generateFromSeed":"qa-checkout-01"}'

Claude Desktop / Cursor / Windsurf / Antigravity Config

{
  "mcpServers": {
    "seedmask": {
      "command": "npx",
      "args": ["-y", "github:z121245017-ai/seedmask-mcp"]
    }
  }
}

Docker (node:22-alpine, non-root USER node)

docker build -t seedmask-mcp .
docker run -i --rm seedmask-mcp

GitHub Action (z121245017-ai/seedmask-mcp@v1)

Block accidental commits of unmasked production emails, Luhn payment cards, 18-digit Resident IDs, public IPs, and bearer credentials inside .sql, .csv, and .jsonl test fixtures:

name: SeedMask Fixture PII Gate

on:
  pull_request:
    paths:
      - '**/*.sql'
      - '**/*.csv'
      - '**/*.jsonl'

permissions:
  contents: read

jobs:
  seedmask:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Scan SQL, CSV & JSONL fixtures for unmasked PII
        uses: z121245017-ai/seedmask-mcp@v1
        with:
          paths: 'seeds,fixtures'
          strict: 'true'

Format-Preserving Checksum & Referential Integrity Matrix

PII Category

Deterministic Output Standard

Downstream Validator Compatibility

Email (UNIQUE / FK)

first.last.<6hex>@example.test (RFC 2606)

Case-normalized HMAC keeps users.email = orders.email joins intact

Payment Card (PAN)

4000-00xx-xxxx-xxxC (Visa sandbox BIN)

Passes ISO/IEC 7812 Luhn Mod-10 check digit validation

18-Digit CN Resident ID

Valid GB/T 2260 region + calendar YYYYMMDD + Mod 11-2

Passes GB 11643-1999 (ISO 7064 Mod 11-2, including X check char)

Phone (CN / E.164)

138/139 11-digit mobile & +1-xxx-555-01xx

Preserves +86, hyphen, parenthesis, and numeric JSON column types

Client IP (IPv4 / IPv6)

203.0.113.1..254 & 2001:db8:5eed::/48

RFC 5737 & RFC 3849 non-routable documentation blocks

API Keys & JWTs

smk_test_EXAMPLE_REDACTED_<12hex>

Eliminates live bearer credentials while keeping 3-part JWT structure

Commercial Air-Gapped Browser Workbench & DevSecOps Suite

Need a zero-install Bilingual Air-Gapped Browser Workbench (connect-src 'none') for drag-and-drop SQL/CSV/JSONL sanitization, zero-plaintext JSON/Markdown compliance audit certificates, 1080×1440 sign-off cards, and Excel column audit summaries without touching the command line?

Explore SeedMask Pro Workbench and our full offline DevSecOps & developer utility catalog at https://z121245017-ai.github.io/.

Verification

npm test

License

MIT License — 0 external npm dependencies, 0 network calls, 100% local deterministic execution.

Available Tools

4 tools
anonymize_sql_or_structured_dumpA
Read-onlyIdempotent

Deterministically anonymizes PostgreSQL COPY ... FROM stdin blocks, SQL INSERT INTO statements, RFC 4180 CSV exports, or JSONL/JSON payloads offline using HMAC-SHA256 token mapping while preserving cross-table FOREIGN KEY joins, \N NULLs, Luhn card checksums, and GB 11643-1999 Mod 11-2 18-digit IDs.

Inputs: format, content, filePath, filename, +3 more.

audit_unmasked_pii_exposureA
Read-onlyIdempotent

Scans SQL seed files, CSV fixtures, or JSONL logs offline for unmasked live emails, Luhn payment cards outside sandbox BINs, GB 11643-1999 18-digit IDs, public IPv4s, and unredacted JWT/API tokens without echoing raw secrets.

Inputs: content, filePath, filename, redactFindings, +1 more.

validate_synthetic_checksumsB
Read-onlyIdempotent

Validates or deterministically generates format-preserving test identifiers passing ISO/IEC 7812 Luhn Mod-10 (16-digit cards), GB 11643-1999 Mod 11-2 (18-digit Chinese Resident IDs), RFC 2606 emails, and RFC 5737 IPs.

Inputs: sessionSalt, cardCandidate, cnIdCandidate, generateFromSeed.

verify_cross_table_fk_consistencyA
Read-onlyIdempotent

Anonymizes two or more related SQL, CSV, or JSONL datasets under a shared HMAC-SHA256 session salt and verifies referential integrity (FOREIGN KEY join parity & zero-plaintext audit certificates) across all tables.

Inputs: datasets (required), emailDomain, sessionSalt.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 4 tools

    Disambiguation4/5

    Each tool has a distinct primary action: anonymize, audit, verify cross-table integrity, and validate/generate checksums. anonymize_sql_or_structured_dump and verify_cross_table_fk_consistency both perform anonymization, but the latter is clearly scoped to multi-dataset shared-salt workflows and referential-integrity verification.

    Naming Consistency5/5

    All tool names use consistent snake_case with a leading action verb followed by a clear object phrase. The pattern is predictable across anonymize, audit, verify, and validate operations.

    Tool Count5/5

    Four tools is well-scoped for a focused seed-data anonymization and validation server. Each tool earns its place by covering a distinct stage of the workflow rather than duplicating functionality.

    Completeness4/5

    The surface covers detection, anonymization, cross-table integrity verification, and format-preserving identifier validation/generation. Minor gaps exist around salt/mapping lifecycle management or exporting audit evidence, but core offline masking workflows are covered.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      B
      maintenance
      Zero-Trust local PII & secrets masking MCP (ZTDS RFC v1.0). Zero server logs. Features: 23 zero-trust tools, 30 industry profiles, offline OCR, RAM-only masking. Run: npx -y @privacyscrubber/mcp-server. Website: https://privacyscrubber.com SDK: https://www.npmjs.com/package/@privacyscrubber/sdk
      4
      12
      941 npm
      3
      -
    • A
      license
      A
      quality
      D
      maintenance
      Generates realistic, referentially-coherent test data (SQL INSERTs, JSON, or CSV) from your database schema, resolving foreign keys and respecting constraints. Paste CREATE TABLE DDL or a JSON schema and get ready-to-run seed data with valid relationships.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables k-anonymization of tabular data through generalization and suppression, with utility reporting and an MCP interface for field classification and anonymization. Runs entirely in-process with no network access.
      28 npm
      -