Skip to main content

XMI2SDC

CI Python 3.11+ License: Apache 2.0

XMI2SDC — Agentic XMI/UML to SDC4 Converter

Agentic XMI/UML to SDC4 data model converter.

XMI2SDC converts enterprise UML models exported from Sparx Enterprise Architect, MagicDraw, and other tools into SDC4-compliant data models. It uses a multi-agent pipeline to parse, analyze, map, and assemble models via the SDCStudio Assembly API.

Built for air-gapped, self-hosted environments. No cloud dependencies required.

Agents

Agent Tools LLM Description
parser 3 No Parse XMI files, auto-detect dialect, normalize to intermediate model
analyzer 3 Yes Semantic analysis of class intent, inheritance, associations
mapper 3 Edge cases Apply UML-to-SDC4 type mapping rules, produce mapping plan
reviewer 2 Yes Review mapping completeness, generate conversion report
assembler 3 No Execute mapping plan via SDCStudio Assembly API
orchestrator -- Yes Multi-agent coordinator: parse, analyze, map, review, assemble

Type Mapping

UML Type SDC4 Type Notes
Boolean XdBoolean
Integer (non-negative) XdCount
Integer (signed) XdQuantity Integer restriction
Real / Float / Double XdQuantity
String XdString
Enumeration XdString Literals become enumerations
Date / DateTime / Time XdTemporal
Class (composite) Cluster
Composition association Cluster containment

Requirements

  • Python 3.11+
  • An LLM endpoint reachable via litellm, a frontier-model API key or a local model, for the LLM-assisted analysis and edge-case mapping steps.
  • For assemble only: a reachable SDCStudio Assembly API (the hosted sdcstudio.axius-sdc.com or a self-hosted instance) plus an API key via SDCSTUDIO_API_KEY (or --api-key).

convert (parse + map to a mapping plan) runs fully standalone; only assemble needs SDCStudio access.

Installation

# Install the package and its dependencies
pip install -e .

# Development (tests, linters)
pip install -e ".[dev]"

A requirements.txt mirroring the runtime dependencies is provided to build an environment directly: pip install -r requirements.txt.

Quick Start

Convert an XMI file

# Configure
cp xmi2sdc.example.yaml xmi2sdc.yaml

# Parse and map (produces JSON mapping plan)
xmi2sdc convert model.xmi

# Specify output path
xmi2sdc convert model.xmi -o mapping_plan.json

MCP Mode

Expose toolsets as MCP servers for LLM clients (Claude Code, Cursor, etc.):

xmi2sdc serve --mcp parser
xmi2sdc serve --mcp mapper

ADK Agent Mode

For standalone agent orchestration, a local LLM is required:

ollama pull qwen2.5:7b-instruct
# Agents use ollama/qwen2.5:7b-instruct by default via LiteLLM

CLI Commands

xmi2sdc convert FILE       # Parse XMI and produce SDC4 mapping plan
xmi2sdc serve --mcp AGENT  # Start MCP stdio server for an agent toolset
xmi2sdc info               # Display config summary and agent inventory
xmi2sdc validate-config    # Validate configuration file
xmi2sdc audit show         # Display audit log with filters

Configuration

Create xmi2sdc.yaml:

sdcstudio:
  base_url: "http://localhost:8000"
  api_key: "${SDC_API_KEY}"

cache:
  root: ".xmi2sdc-cache"

audit:
  path: ".xmi2sdc-cache/audit.jsonl"
  log_level: "standard"  # or "verbose"

output:
  directory: "./output"

Environment variables in ${VAR} syntax are substituted at load time. Missing variables cause an immediate error (fail closed).

Supported Dialects

  • Generic XMI 2.x -- Standard OMG XMI exports
  • Sparx Enterprise Architect -- Auto-detected via sparxsystems.com namespace
  • MagicDraw / Cameo -- Auto-detected via nomagic.com namespace

Dialect is detected automatically from namespace declarations in the XMI file. All dialects normalize to the same ParsedXmiModel intermediate representation.

Docker

docker build -t xmi2sdc .

# MCP server mode
docker run -v $(pwd)/xmi2sdc.yaml:/home/sdc/xmi2sdc.yaml:ro \
    -e XMI2SDC_AGENT=parser \
    xmi2sdc

# CLI mode
docker run -v $(pwd)/xmi2sdc.yaml:/home/sdc/xmi2sdc.yaml:ro \
    xmi2sdc info

Development

Branch Workflow

  • main: Production code (protected, PR required)
  • dev: Active development

All work happens on dev. Create a Pull Request to merge into main.

Testing

pip install -e ".[dev]"
pytest

# With coverage
pytest --cov=xmi2sdc --cov-report=term-missing

Linting

ruff check src/ tests/
black --check src/ tests/

Architecture

XMI File ──> Parser Agent ──> ParsedXmiModel ──> Mapper Agent ──> Mapping Plan JSON
                                                                        |
                                                                        v
                               Conversion Report <── Reviewer <── Assembler ──> SDCStudio API

The pipeline separates deterministic operations (parsing, type mapping) from LLM-assisted operations (semantic analysis, edge-case resolution). If any stage fails, earlier results are cached and the pipeline can resume without re-processing.

Contributing

See CONTRIBUTING.md for development guidelines and contribution workflow.

Security

See SECURITY.md for the security policy and vulnerability reporting process.

  • SDCStudio — the SDC4 data model platform and Assembly API provider that XMI2SDC targets.
  • SDC repositories — the open-source SDC ecosystem (validators, agents, and tooling).

License

Apache License 2.0. Copyright 2026 Axius SDC, Inc. See LICENSE and NOTICE.

Metadata

Release files for xmi2sdc 4.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xmi2sdc 4.1.2
File Size Uploaded Provenance
xmi2sdc-4.1.2.tar.gz 4.1 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xmi2sdc 4.1.2
File Interpreter ABI Platform
xmi2sdc-4.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 4.1 MB

Release files / xmi2sdc-4.1.2.tar.gz

Download URL xmi2sdc-4.1.2.tar.gz
Size 4.1 MB
Tags Source
SHA-256 checksum
How to use checksums
0ee422380386bf46bce25a09922cfa71dec40a79eaad6ad4bd0750739446258e
BLAKE2b-256 checksum
How to use checksums
717f75b50e755fd9a3245f3d8bbf4671b2d9edcea6e76f7a86b86315020fbb17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Release files / xmi2sdc-4.1.2-py3-none-any.whl

Download URL xmi2sdc-4.1.2-py3-none-any.whl
Size 41.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55a5718c7f5e3c3e447c582df56d38b153e2bc499565879cadf2e1cadba745d3
BLAKE2b-256 checksum
How to use checksums
05b8e53e2027d0cdca5712b38854a06c01b98b2c2ed3ffde47470894102afb7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

Security for xmi2sdc 4.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xmi2sdc-4.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page