Avrotize & Structurize
MCP serverDev toolsavrotize converts data schemas between formats and generates code from them. Once added, your AI can translate schemas between formats like Avro, JSON Schema, and others, and produce ready-to-use code from schema definitions.
Unavailable. This server has no hosted endpoint yet, so Ahel can't serve it.
Ahel cannot run this one yet; its page stays here for reference.
What your AI can do with it
- Convert schemas between formats such as Avro and JSON Schema
- Generate code from schema definitions
- Keep data models consistent across different schema formats
- Turn existing schemas into code for your projects
Getting started
- Read the source or reference documentation for what it needs to run.
- Check this page for availability before you add it to a pipeline on Ahel.
From the project's README
As published by clemensv/avrotize in README.md.
mcp-name: io.github.clemensv/avrotize
📚 Documentation & Examples | 🎨 Conversion Gallery
Avrotize is a "Rosetta Stone" for data structure definitions, allowing you to convert between numerous data and database schema formats and to generate code for different programming languages.
It is, for instance, a well-documented and predictable converter and code generator for data structures originally defined in JSON Schema (of arbitrary complexity).
The tool leans on the Apache Avro-derived Avrotize Schema as its schema model.
- Programming languages: Python, C#, Java, TypeScript, JavaScript, Rust, Go, C++
- SQL Databases: MySQL, MariaDB, PostgreSQL, SQL Server, Oracle, SQLite, BigQuery, Snowflake, Redshift, DB2
- Other databases: KQL/Kusto, SurrealDB, MongoDB, Cassandra, Redis, Elasticsearch, DynamoDB, CosmosDB
- Data schema formats: Avro, JSON Schema, JSON Structure, XML Schema (XSD), Protocol Buffers 2 and 3, ASN.1, Apache Parquet, JSON Type Definition (JTD), CDDL, CUE, FlatBuffers, Apache Thrift IDL, Smithy IDL, Cap'n Proto, RAML 1.0 Data Types, and OpenAPI 3.x
Installation
You can install Avrotize from PyPI, having installed Python 3.10 or later:
pip install avrotize
For MCP server support (avrotize mcp), install with the MCP extra:
pip install "avrotize[mcp]"
For SQL database support (sql2a command), install the optional database drivers:
# PostgreSQL
pip install avrotize[postgres]
# MySQL
pip install avrotize[mysql]
# SQL Server
pip install avrotize[sqlserver]
# All SQL databases
pip install avrotize[all-sql]
Usage
Avrotize provides several commands for converting schema formats via Avrotize Schema.
Converting to Avrotize Schema:
avrotize s2a- Convert JSON Structure to Avrotize Schema.avrotize j2a- Convert JSON schema to Avrotize Schema.avrotize p2a- Convert Protobuf (2 or 3) schema to Avrotize Schema.avrotize x2a- Convert XML schema to Avrotize Schema.avrotize asn2a- Convert ASN.1 to Avrotize Schema.avrotize jtd2a- Convert JSON Type Definition (JTD) to Avrotize Schema.avrotize cue2a- Convert a supported CUE schema subset to Avrotize Schema.avrotize fbs2a- Convert FlatBuffers schema to Avrotize Schema.avrotize thrift2a- Convert Apache Thrift IDL to Avrotize Schema.avrotize smithy2a- Convert Smithy 2.0 IDL data shapes to Avrotize Schema.avrotize capnp2a- Convert Cap'n Proto schema to Avrotize Schema.avrotize raml2a- Convert RAML 1.0 Data Types to Avrotize Schema.avrotize kstruct2a- Convert Kafka Connect Schema to Avrotize Schema.avrotize sql2a- Convert SQL database schema to Avrotize Schema.avrotize k2a- Convert Kusto table definitions to Avrotize Schema.avrotize surreal2a- Convert SurrealQL schema definitions to Avrotize Schema.avrotize pq2a- Convert Parquet schema to Avrotize Schema.avrotize csv2a- Convert CSV file to Avrotize Schema.
Converting from Avrotize Schema:
avrotize a2s- Convert Avrotize Schema to JSON Structure.avrotize a2j- Convert Avrotize Schema to JSON schema.avrotize a2p- Convert Avrotize Schema to Protobuf 3 schema.avrotize a2x- Convert Avrotize Schema to XML schema.avrotize a2asn- Convert Avrotize Schema to ASN.1 schema.avrotize a2jtd- Convert Avrotize Schema to JSON Type Definition (JTD).avrotize a2cue- Convert Avrotize Schema to the supported CUE schema subset.avrotize a2fbs- Convert Avrotize Schema to FlatBuffers schema.avrotize a2thrift- Convert Avrotize Schema to Apache Thrift IDL.avrotize a2smithy- Convert Avrotize Schema to Smithy 2.0 IDL data shapes.avrotize a2capnp- Convert Avrotize Schema to Cap'n Proto schema.avrotize a2raml- Convert Avrotize Schema to RAML 1.0 Data Types.avrotize a2sql- Convert Avrotize Schema to SQL table definition.avrotize a2k- Convert Avrotize Schema to Kusto table definition.avrotize a2tsml- Convert Avrotize Schema to Tabular Model Scripting Language (TMSL).avrotize a2surreal- Convert Avrotize Schema to SurrealQL schema definitions.avrotize a2pq- Convert Avrotize Schema to Parquet or Iceberg schema.avrotize a2ib- Convert Avrotize Schema to Iceberg schema.avrotize a2mongo- Convert Avrotize Schema to MongoDB schema.avrotize a2cassandra- Convert Avrotize Schema to Cassandra schema.avrotize a2es- Convert Avrotize Schema to Elasticsearch schema.avrotize a2dynamodb- Convert Avrotize Schema to DynamoDB schema.avrotize a2cosmos- Convert Avrotize Schema to CosmosDB schema.avrotize a2couchdb- Convert Avrotize Schema to CouchDB schema.avrotize a2firebase- Convert Avrotize Schema to Firebase schema.avrotize a2hbase- Convert Avrotize Schema to HBase schema.avrotize a2neo4j- Convert Avrotize Schema to Neo4j schema.avrotize a2dp- Convert Avrotize Schema to Datapackage schema.avrotize a2csv- Convert Avrotize schema to CSV schema.avrotize a2graphql- Convert Avrotize schema to GraphQL schema.avrotize a2md- Convert Avrotize Schema to Markdown documentation.
Converting to and from JSON Structure:
avrotize j2s- Convert JSON Schema to JSON Structure.avrotize s2j- Convert JSON Structure to JSON Schema.avrotize s2p- Convert JSON Structure to Protocol Buffers (.proto files).avrotize s2x- Convert JSON Structure to XML Schema (XSD).avrotize s2asn- Convert JSON Structure Schema to ASN.1 schema.avrotize jtd2s- Convert JSON Type Definition (JTD) to JSON Structure.avrotize s2jtd- Convert JSON Structure to JSON Type Definition (JTD).avrotize cddl2s- Convert CDDL schema to JSON Structure.avrotize s2cddl- Convert JSON Structure to CDDL schema.avrotize oas2s- Convert OpenAPI 3.x document to JSON Structure.avrotize cue2s- Convert a supported CUE schema subset to JSON Structure.avrotize s2cue- Convert JSON Structure to the supported CUE schema subset.avrotize fbs2s- Convert FlatBuffers schema to JSON Structure.avrotize s2fbs- Convert JSON Structure to FlatBuffers schema.avrotize thrift2s- Convert Apache Thrift IDL to JSON Structure.avrotize s2thrift- Convert JSON Structure to Apache Thrift IDL.avrotize smithy2s- Convert Smithy 2.0 IDL data shapes to JSON Structure.avrotize s2smithy- Convert JSON Structure to Smithy 2.0 IDL data shapes.avrotize capnp2s- Convert Cap'n Proto schema to JSON Structure.avrotize s2capnp- Convert JSON Structure to Cap'n Proto schema.avrotize raml2s- Convert RAML 1.0 Data Types to JSON Structure.avrotize s2raml- Convert JSON Structure to RAML 1.0 Data Types.avrotize s2sql- Convert JSON Structure Schema to SQL table definition.avrotize s2k- Convert JSON Structure Schema to Kusto table definition.avrotize k2s- Convert Kusto table definitions to JSON Structure.avrotize s2tsml- Convert JSON Structure to Tabular Model Scripting Language (TMSL).avrotize s2pq- Convert JSON Structure to Parquet schema.avrotize s2ib- Convert JSON Structure to Iceberg schema.avrotize s2cassandra- Convert JSON Structure Schema to Cassandra schema.avrotize s2graphql- Convert JSON Structure schema to GraphQL schema.avrotize s2dp- Convert JSON Structure schema to Datapackage schema.avrotize s2csv- Convert JSON Structure schema to CSV schema.avrotize s2md- Convert JSON Structure schema to Markdown documentation.
Inferring schemas from data:
avrotize json2a- Infer Avro schema from JSON files.avrotize json2s- Infer JSON Structure schema from JSON files.avrotize xml2a- Infer Avro schema from XML files.avrotize xml2s- Infer JSON Structure schema from XML files.
Generate code from Avrotize Schema:
avrotize a2cs- Generate C# code from Avrotize Schema.avrotize a2java- Generate Java code from Avrotize Schema.avrotize a2py- Generate Python code from Avrotize Schema.avrotize a2ts- Generate TypeScript code from Avrotize Schema.avrotize a2js- Generate JavaScript code from Avrotize Schema.avrotize a2go- Generate Go code from Avrotize Schema.avrotize a2rust- Generate Rust code from Avrotize Schema.avrotize a2cpp- Generate C++ code from Avrotize Schema.
Generate code from JSON Structure:
avrotize s2cs- Generate C# code from JSON Structure schema.avrotize s2java- Generate Java code from JSON Structure schema.avrotize s2py- Generate Python code from JSON Structure schema.avrotize s2ts- Generate TypeScript code from JSON Structure schema.avrotize s2js- Generate JavaScript code from JSON Structure schema.avrotize s2go- Generate Go code from JSON Structure schema.avrotize s2rust- Generate Rust code from JSON Structure schema.avrotize s2cpp- Generate C++ code from JSON Structure schema.
Other commands:
avrotize validate- Validate JSON instances against Avro or JSON Structure schemas.avrotize mcp- Run Avrotize as a local MCP server exposing conversion tools to MCP clients.avrotize pcf- Create the Parsing Canonical Form (PCF) of an Avrotize Schema.avrotize validate-tmsl- Validate TMSL scripts locally against documented object structure.
Overview
MCP server
You can run Avrotize as a local MCP server over stdio:
avrotize mcp
Catalog-ready metadata files are included:
- Official MCP Registry manifest: server.json
- Microsoft/GitHub MCP catalog listing template: catalogs/microsoft-github-mcp.md
- Generic cross-catalog manifest (optional): mcp-server.json
- VS Code + Copilot usage quickstart: copilot-vscode-mcp-quickstart.md
To publish to the official MCP Registry:
mcp-publisher validate server.json
mcp-publisher publish server.json
The MCP server exposes tools to:
- describe server capabilities and routing guidance (
describe_capabilities) - list available conversion commands (
list_conversions) - inspect a conversion command (
get_conversion) - execute conversions (
run_conversion)
You can use Avrotize to convert between Avro/Avrotize Schema and other schema formats like JSON Schema, XML Schema (XSD), Protocol Buffers (Protobuf), ASN.1, and database schema formats like Kusto Data Table Definition (KQL) and SQL Table Definition. That means you can also convert from JSON Schema to Protobuf going via Avrotize Schema.
You can also generate C#, Java, TypeScript, JavaScript, and Python code from Avrotize Schema documents. The difference to the native Avro tools is that Avrotize can emit data classes without Avro library dependencies and, optionally, with annotations for JSON serialization libraries like Jackson or System.Text.Json.
The tool does not convert data (instances of schemas), only the data structure definitions.
Mind that the primary objective of the tool is the conversion of schemas that describe data structures used in applications, databases, and message systems. While the project's internal tests do cover a lot of ground, it is nevertheless not a primary goal of the tool to convert every complex document schema like those used for devops pipeline or system configuration files.
Why?
Data structure definitions are an essential part of data exchange, serialization, and storage. They define the shape and type of data, and they are foundational for tooling and libraries for working with the data. Nearly all data schema languages are coupled to a specific data exchange or storage format, locking the definitions to that format.
Avrotize is designed as a tool to "unlock" data definitions from JSON Schema or XML Schema and make them usable in other contexts. The intent is also to lay a foundation for transcoding data from one format to another, by translating the schema definitions as accurately as possible into the schema model of the target format's schema. The transcoding of the data itself requires separate tools that are beyond the scope of this project.
The use of the term "data structure definition" and not "data object definition" is quite intentional. The focus of the tool is on data structures that can be used for messaging and eventing payloads, for data serialization, and for database tables, with the goal that those structures can be mapped cleanly from and to common programming language types.
Therefore, Avrotize intentionally ignores common techniques to model object-oriented inheritance. For instance, when converting from JSON Schema, all content from allOf expressions is merged into a single record type rather than trying to model the inheritance tree in Avro.
Avrotize Schema
Avrotize Schema is a schema model that is a full superset of the popular Apache Avro Schema model. Avrotize Schema is the "pivot point" for this tool. All schemas are converted from and to Avrotize Schema.
Since Avrotize Schema is a superset of Avro Schema and uses its extensibility features, every Avrotize Schema is also a valid Avro Schema and vice versa.
Why did we pick Avro Schema as the foundational schema model?
Avro Schema ...
- provides a simple, clean, and concise way to define data structures. It is quite easy to understand and use.
- is self-contained by design without having or requiring external references. Avro Schema can express complex data structure hierarchies spanning multiple namespace boundaries all in a single file, which neither JSON Schema nor XML Schema nor Protobuf can do.
- can be resolved by code generators and other tools "top-down" since it enforces dependencies to be ordered such that no forward-referencing occurs.
- emerged out of the Apache Hadoop ecosystem and is widely used for serialization and storage of data and for data exchange between systems.
- supports native and logical types that cover the needs of many business and technical use cases.
- can describe the popular JSON data encoding very well and in a way that always maps cleanly to a wide range of programming languages and systems. In contrast, it's quite easy to inadvertently define a JSON Schema that is very difficult to map to a programming language structure.
- is itself expressed as JSON. That makes it easy to parse and generate, which is not the case for Protobuf or ASN.1, which require bespoke parsers.
It needs to be noted here that while Avro Schema is great for defining data structures, and data classes generated from Avro Schema using this tool or other tools can be used to with the most popular JSON serialization libraries, the Apache Avro project's own JSON encoding has fairly grave interoperability issues with common usage of JSON. Avrotize defines an alternate JSON encoding
in avrojson.md.
Avro Schema does not support all the bells and whistles of XML Schema or JSON Schema, but that is a feature, not a bug, as it ensures the portability of the schemas across different systems and infrastructures. Specifically, Avro Schema does not support many of the data validation features found in JSON Schema or XML Schema. There are no pattern, format, minimum, maximum, or required keywords in Avro Schema, and Avro does not support conditional validation.
In a system where data originates as XML or JSON described by a validating XML Schema or JSON Schema, the assumption we make here is that data will be validated using its native schema language first, and then the Avro Schema will be used for transformation or transfer or storage.
Adding CloudEvents columns for database tables
When converting Avrotize Schema to Kusto Data Table Definition (KQL), SQL Table Definition, or Parquet Schema, the tool can add special columns for CloudEvents attributes. CNCF CloudEvents is a specification for describing event data in a common way.
The rationale for adding such columns to database tables is that messages and events commonly separate event metadata from the payload data, while that information is merged when events are projected into a database. The metadata often carries important context information about the event that is not contained in the payload itself. Therefore, the tool can add those columns to the database tables for easy alignment of the message context with the payload when building event stores.
Convert Proto schema to Avrotize Schema
avrotize p2a <path_to_proto_file> [--out <path_to_avro_schema_file>]
Parameters:
<path_to_proto_file>: The path to the Protobuf schema file to be converted. If omitted, the file is read from stdin.--out: The path to the Avrotize Schema file to write the conversion result to. If omitted, the output is directed to stdout.
Conversion notes:
- Proto 2 and Proto 3 syntax are supported.
- Proto package names are mapped to Avro namespaces. The tool does resolve imports and consolidates all imported types into a single Avrotize Schema file.
- The tool embeds all 'well-known' Protobuf 3.0 types in Avro format and injects them as needed when the respective types are imported. Only the
Timestamptype is mapped to the Avro logical type 'timestamp-millis'. The rest of the well-known Protobuf types are kept as Avro record types with the same field names and types. - Protobuf allows any scalar type as key in a
map, Avro does not. When converting from Proto to Avro, the type information for the map keys is ignored. - The field numbers in message types are not mapped to the positions of the fields in Avro records. The fields in Avro are ordered as they appear in the Proto schema. Consequently, the Avrotize Schema also ignores the
extensionsandreservedkeywords in the Proto schema. - The
optionalkeyword results in an Avro field being nullable (union with thenulltype), while therequiredkeyword results in a non-nullable field. Therepeatedkeyword results in an Avro field being an array of the field type. - The
oneofkeyword in Proto is mapped to an Avro union type. - All
optionsin the Proto schema are ignored.
Convert Avrotize Schema to Proto schema
Shortened here. Read the whole README on GitHub.
Signals
- GitHub stars
- 132
- Forks
- 15
- Last commit
- Oct 2026
- Weekly downloads
- 6k
Advanced
- Delivery
- avrotize MCP server → your Ahel connector (mcp.ahel.ai) → your AI.
- Item type
- mcp-server
- Key
io-github-clemensv-avrotize- Source
- github.com/clemensv/avrotize
More in Dev tools
MCP server · airtreks
More in Dev toolsworld-data-statistics
MCP server · adarsh4052
More in Dev toolsdraw.io
MCP server · jgraph
More in Dev tools0nMCP
MCP server · 0nork
More in Dev toolssportwizzard
MCP server · adamruehle
More in Dev toolskorean-law-mcp
MCP server · chrisryugj
More in Dev tools