# mdx-a2ui: Safely Convert MDX to A2UI JSON for Enhanced Data Models

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/cixzhang-mdx-a2ui
Generated for open source discovery and AI-assisted research.

mdx-a2ui is an experimental project designed to convert MDX content, which combines prose and a closed component catalog, into A2UI JSON. This tool parses JSX without evaluation, ensuring a secure conversion process. It aims to leverage MDX for authoring while benefiting from A2UI's structured data model and validation capabilities.

GitHub: https://github.com/cixzhang/mdx-a2ui
OSRepos URL: https://osrepos.com/repo/cixzhang-mdx-a2ui

## Summary

mdx-a2ui is an experimental project designed to convert MDX content, which combines prose and a closed component catalog, into A2UI JSON. This tool parses JSX without evaluation, ensuring a secure conversion process. It aims to leverage MDX for authoring while benefiting from A2UI's structured data model and validation capabilities.

## Topics

- MDX
- A2UI
- JSON Conversion
- Content Parsing
- Developer Tool
- Experimental
- Open Source

## Repository Information

Last analyzed by OSRepos: Wed Sep 09 2026 09:42:13 GMT+0100 (Western European Summer Time)
Detail views: 0
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

`mdx-a2ui` is an experimental project by cixzhang that offers a unique approach to converting MDX content into A2UI JSON. This tool focuses on parsing MDX, including its JSX components, without ever evaluating the code, thus enhancing security. It bridges the gap between MDX as an authoring format and A2UI as a robust data model.

The intended flow is:


agent writes MDX  ?  repair (if still streaming)  ?  convert  ?  A2UI JSON  ?  any A2UI renderer


## Why Use and Benefits

The project addresses the distinct strengths of MDX and A2UI. MDX provides a superior authoring experience for an agent, allowing prose to remain prose while interactive elements become components. It is significantly denser than the A2UI it produces, which reduces context costs for models on every replay.

Conversely, A2UI excels as a data model, offering a schema, a validator, renderers for several design systems, and clients that are not a web browser. By converting instead of compiling, `mdx-a2ui` allows users to benefit from both formats securely. An MDX document is code, and `evaluate()` runs it, which is not safe. This library converts instead, accepting attribute expressions only if they parse as a JSON literal, ensuring no evaluator is in the path to abuse.

## Installation

As an experimental project, `mdx-a2ui` is not yet published to npm. Installation details are not available, and it is not recommended for production use at this stage. The project status indicates that nothing is stable, and all exports carry an `experimental_` prefix.

## Examples

Given its experimental status and lack of an npm package, specific usage examples are not provided for direct implementation. Developers interested in contributing or exploring the codebase can refer to the GitHub repository for the latest updates.

## Links

*   GitHub Repository: [cixzhang/mdx-a2ui](https://github.com/cixzhang/mdx-a2ui){:target="_blank"}
*   License: [MIT License](https://github.com/cixzhang/mdx-a2ui/blob/main/LICENSE){:target="_blank"}