Avrotize

Converts data schemas between formats and generates typed code from them over MCP

By Clemens Vasters (individual) Python Local · stdio Developer toolsDatabases

55 popularity score ★ 132 ↓ 21k/mo

Connect your client

Local (PyPI)

Add in one click

Opens the app, which asks before it adds the server.

Or add it by command or config

Claude CodeTerminal
claude mcp add avrotize -- uvx avrotize mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "avrotize": {
      "command": "uvx",
      "args": [
        "avrotize",
        "mcp"
      ]
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "avrotize": {
      "command": "uvx",
      "args": [
        "avrotize",
        "mcp"
      ]
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "avrotize": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "avrotize",
        "mcp"
      ]
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.avrotize]
command = "uvx"
args = ["avrotize", "mcp"]
Gemini CLITerminal
gemini mcp add --scope user avrotize uvx -- avrotize mcp

What it does

Avrotize is a Python command-line tool that translates data structure definitions between schema languages, using its own Avro-based Avrotize Schema as the pivot. Inputs and outputs include JSON Schema, JSON Structure, XML Schema, Protocol Buffers, ASN.1, Parquet, Kusto table definitions and SQL table definitions for many databases, and it can generate data classes in C#, Java, Python, TypeScript, JavaScript, Rust, Go and C++. Running `avrotize mcp` puts that whole command set behind four MCP tools, so an assistant can find a conversion, look up its arguments and run it on a file or on text pasted into the chat.

The MCP side is thin by design: rather than one tool per conversion, `list_conversions` and `get_conversion` read the same command catalogue the CLI uses, and `run_conversion` calls the matching converter with the options the assistant passes. Any command the CLI has, apart from `mcp` itself, can be run this way, including schema inference from sample JSON, XML or CSV and the commands that read the schema of a live SQL database or Kusto cluster.

In version 3.9.3 the server speaks MCP over stdio through its own small JSON-RPC loop rather than the `mcp` Python library (avrotize/mcp_server.py), so the `avrotize[mcp]` extra the README asks for is not needed for `avrotize mcp` to start; the package also installs an `avrotize-mcp` program that starts the same server directly. The tool converts schemas only, not data that follows them.

What it needs

RuntimePython 3.10+

Python 3.10 or later, and uv for the `uvx` command (or `pip install avrotize` and run `avrotize mcp`). Reading a live SQL database with `sql2a` needs the matching driver extra, for example `uvx --from "avrotize[all-sql]" avrotize mcp`, plus a reachable database and its credentials; `k2a` needs a Kusto cluster and an Azure sign-in.

Limits

Stdio only: the code raises an error for any other transport. It converts schema definitions, not data records, and its makers say converting complex configuration or pipeline schemas is not a goal. Inheritance is not modelled: JSON Schema `allOf` content is merged into one record. The four tools are generic, so the assistant must call `get_conversion` to learn each command's options; there is no per-format tool schema. Written output goes to whatever `output_path` the assistant gives; when none is given, the output is returned as text and the temporary file is deleted.

Who it suits

Developers who work across several schema languages, for example turning JSON Schema or XSD into Protobuf, Avro or SQL table definitions, or generating data classes from a schema, and who want an assistant to run those conversions on local files. It runs entirely on your machine with no account or key, unless you point it at a database or Kusto cluster. It is a community tool, not from Apache or the format owners. Pick something else if you need data transcoding between formats, a hosted endpoint, or a server that confines writes to one folder.

Tools 4

describe_capabilities
Returns when to use the server, the suggested call order and the names of all available commands.
list_conversions
Lists every conversion and code generation command with its group, description and argument names.
get_conversion
Shows the full argument metadata for one named command.
run_conversion
Runs a named command on an input file path or inline content, writing to an output path or returning the result as text.

Similar servers