Skip to main content
Glama
rafim-dev

Schema Bridge MCP Server

⚡ Schema Bridge MCP Server & CLI

License: MIT MCP Protocol Node.js Platform

Model Context Protocol (MCP) Server & CLI for Instant Schema Conversion & Mock API Generation.
Effortlessly compile SQL DDL, Prisma schemas, and JSON into Zod validation schemas, TypeScript interfaces, and Python Pydantic v2 models, plus generate synthetic mock datasets in seconds.


🌟 Why Schema Bridge?

Converting database schemas into API validation rules, TypeScript types, and synthetic testing data is repetitive, tedious, and error-prone.

schema-bridge-mcp gives Claude Desktop, Cursor, Command Code, and Cline native superpowers to automate schema translations and mock generation on demand.


Related MCP server: mock-mcp

🚀 Quick Setup (MCP Stdio)

1. Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "schema-bridge": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/schema-bridge-mcp/dist/index.js"]
    }
  }
}

2. Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "schema-bridge": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/schema-bridge-mcp/dist/index.js"]
    }
  }
}

🛠️ MCP Tools Exposed

Tool

Parameters

Description

schema_convert

source_schema: string, target_format: 'zod' | 'typescript' | 'pydantic'

Ingests SQL DDL (CREATE TABLE), Prisma schemas, or JSON and converts to production Zod schemas, TypeScript types, or Pydantic v2 models.

schema_generate_mock

source_schema: string, count?: number

Generates realistic, contextual synthetic mock datasets (UUIDs, names, emails, dates, prices, statuses) strictly respecting your field types.

schema_validate

payload: string, schema: string

Compares runtime JSON payloads against database schemas and flags missing fields or mismatched types instantly.


💻 Standalone Terminal CLI Usage

# Clone & install dependencies
git clone https://github.com/rafim-dev/schema-bridge-mcp.git
cd schema-bridge-mcp
npm install
npm run build

# Convert SQL DDL to Zod Schema
node dist/index.js convert "CREATE TABLE users (id UUID PRIMARY KEY, email TEXT, is_active BOOLEAN);" zod

# Convert Prisma to TypeScript interfaces
node dist/index.js convert schema.prisma typescript

# Generate 5 realistic mock records
node dist/index.js mock "CREATE TABLE orders (id INT, total FLOAT, customer_email TEXT);" 5

📦 Pro Distribution & Power Bundle


📄 License

MIT License. Authored by rafim_dev.

Available Tools

3 tools
schema_convertA

Convert any database schema (SQL DDL, Prisma) or JSON payload into production-ready Zod schemas, TypeScript interfaces, or Python Pydantic v2 models.

ParametersJSON Schema
NameRequiredDescriptionDefault
entityNameNoName of the entity/model (default: inferred from schema).
schemaInputYesRaw SQL DDL, Prisma model definition, JSON string, or file path.
targetFormatYesDesired output code format.

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does not disclose any behavioral details such as side effects, error handling, whether file paths are read, or if the operation is pure. The phrase 'production-ready' implies quality but does not explain actual behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, clear sentence that conveys the full purpose without redundancy. All key elements (input, output, and scope) are included efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is adequate for a conversion tool: it specifies the input and output formats and implies the scope. Given no output schema is present, no return details are needed. While it could mention edge cases or format-specific notes, the description is complete for typical usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides 100% coverage of parameters (schemaInput, targetFormat, entityName) with descriptions. The tool description itself does not add extra meaning beyond the schema, so it meets the baseline but does not exceed it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'convert' and specifies the input (database schema or JSON payload) and output (Zod, TypeScript interfaces, Pydantic v2 models). It is distinct from sibling tools like schema_validate and schema_generate_mock, which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The purpose inherently implies when to use (when conversion between schema formats is needed). While not explicitly stating 'use this instead of validate or mock generation', the sibling contexts make the usage clear. No explicit alternative conditions are provided, but the distinction is obvious.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

schema_generate_mockA

Generate realistic, relational synthetic mock JSON data (names, emails, dates, UUIDs, currencies, statuses) from any SQL, Prisma, or JSON schema.

ParametersJSON Schema
NameRequiredDescriptionDefault
countNoNumber of mock records to generate (default: 3, max: 50).
entityNameNoModel name if not specified in schema.
schemaInputYesRaw SQL DDL, Prisma model definition, or JSON string.

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It clarifies the output (mock JSON data) but does not mention any side effects, permissions, or whether the operation is read-only. The description gives a functional overview without explicit behavioral details.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that includes the core purpose and example data types. It is well-structured and front-loaded with the main action, making it easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description is complete for the tool's purpose, covering input formats and output type. It mentions 'relational' to hint at relationship handling, but does not elaborate on output structure. Given the lack of an output schema, this is sufficient but not overly detailed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All three parameters are described with sufficient detail: count specifies range and default, entityName clarifies optionality, and schemaInput explains the accepted formats. Coverage is 100% and the descriptions add meaningful context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: generating realistic, relational synthetic mock JSON data. It identifies the input resource (SQL, Prisma, or JSON schema) and distinguishes it from sibling tools like schema_validate and schema_convert by focusing on generation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly indicates use when mock data is needed from a schema, but it does not explicitly contrast with when to use schema_validate or schema_convert. No direct 'use this for X, not for Y' guidance is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

schema_validateA

Validate a JSON data payload against a schema definition (SQL, Prisma, or JSON Schema) and report detailed type errors and missing fields.

ParametersJSON Schema
NameRequiredDescriptionDefault
dataPayloadYesThe JSON data object or array to validate.
schemaInputYesThe schema definition to validate against.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must carry the full burden of transparency. It states that validation occurs and that errors are reported, but it does not mention side effects (e.g., whether the operation is read-only), return format, or error handling behavior. This leaves some ambiguity about the tool's runtime behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, well-structured sentence that conveys all essential information: the action, the input types, the schema formats, and the output nature. It is concise with no redundant or irrelevant content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the absence of an output schema and annotations, the description adequately covers the tool's purpose and expected result (reporting errors). It lacks details on the exact structure of the report or behavior on success, but these are not critical for basic usage. The context is sufficiently complete for an agent to decide when to call this tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Both parameters have descriptions that go slightly beyond their names: 'The schema definition to validate against' and 'The JSON data object or array to validate' clarify the roles. However, the descriptions are minimal and do not specify expected formats, examples, or constraints. Since schema coverage is 100%, the baseline is 3, and the descriptions are adequate but not enriched.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's primary function: validating a JSON payload against a schema. It specifies supported schema types (SQL, Prisma, JSON Schema) and the nature of the output (detailed type errors and missing fields), making it easy to distinguish from the sibling tools schema_convert and schema_generate_mock.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The purpose is explicit and naturally implies when to use it (when validation is needed). While it does not explicitly contrast with the siblings, the distinct actions (validate vs. convert vs. generate mock) are evident from the tool names and description, providing sufficient guidance without explicit 'use this when' statements.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 3 tool updatesv0.1.0
    • First observedschema_convert
    • First observedschema_generate_mock
    • First observedschema_validate

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a distinct purpose: validating data, converting schemas, and generating mock data. There is no overlap or ambiguity between them.

Naming Consistency5/5

All tools follow the consistent pattern `schema_<verb>`, using clear snake_case naming. The action is immediately identifiable from the name.

Tool Count5/5

Three tools cover a focused schema-related workflow without unnecessary bloat or missing essentials. The count is well-suited to the server's stated purpose.

Completeness5/5

The toolset covers the core lifecycle of schema handling: validation, conversion, and mock generation. No significant gaps are apparent for the described domain.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Generate realistic multi-table synthetic datasets from plain English. Supports 18 industry domains, narrative growth curves (Black Friday, Q4 spike, 10x MRR), and 15 locale packs. Works with Claude Desktop, Cursor, Windsurf, Zed, and Continue.
    7
    68
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to generate TypeScript types, Zod schemas, TypeBox, and JSON Schema from any API endpoint or JSON.
    7
    MIT
  • 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
    57
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rafim-dev/schema-bridge-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server