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.

Related Projects

  • 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xmi2sdc-4.1.0.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xmi2sdc-4.1.0-py3-none-any.whl (40.6 kB view details)

Uploaded Python 3

File details

Details for the file xmi2sdc-4.1.0.tar.gz.

File metadata

  • Download URL: xmi2sdc-4.1.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for xmi2sdc-4.1.0.tar.gz
Algorithm Hash digest
SHA256 9f2ac4fd0d3f58e34eafa6c0434011f87f21645dbd09b061eb5b5d062c3780a8
MD5 e8f62d186e7a49ad591c29c9cdc8a7da
BLAKE2b-256 8327b6703d14e396557bd9d82aef54da267702fdc6d2dc583feff6a957df56f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for xmi2sdc-4.1.0.tar.gz:

Publisher: release.yml on SemanticDataCharter/XMI2SDC

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xmi2sdc-4.1.0-py3-none-any.whl.

File metadata

  • Download URL: xmi2sdc-4.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for xmi2sdc-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eb641b27434766522aa154c94c698ad6f7723cb63e3e7a948f4a60f01e311742
MD5 c5e8db4c32a088bab6cfc45ddef34abf
BLAKE2b-256 13b582e9a7b0ffc993baec6bff1a2bf162efe7d0d89a3f9a1d09743bcbddc4e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for xmi2sdc-4.1.0-py3-none-any.whl:

Publisher: release.yml on SemanticDataCharter/XMI2SDC

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

4.1.1

2 files

This release

4.1.0 This release

2 files

4.0.0

2 files

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