CDXML Toolkit
MCP server and Python toolkit that lets a Claude agent draw molecules and reaction schemes as publication-ready ChemDraw CDXML, extract structures from images, and parse reaction/analysis files — with tool-grounded chemistry to avoid SMILES hallucination.
| Type | MCP server |
| Supplier | Hiu Fung Kevin Lee |
| Availability | Beta — PyPI cdxml-toolkit v0.5.17 (2026) |
| Pricing | Free / OSS (MIT) |
| Capabilities | Read/Write — resolves and renders structures, writes CDXML/PNG files, reads/writes ChemDraw objects in Office documents |
| Verified | works · 2026-07-27 — PyPI 0.5.17 resolves; cdxml-mcp entry point + module launch confirmed |
| Security | caution · 2026-07-27 — provenance matches leehiufung911, MIT, no OSV advisories, single-maintainer Beta + Windows/ChemDraw dependency |
How to install
Prerequisites: Windows only — requires ChemDraw / ChemOffice 2015+ installed (CDXML rendering, render_to_png, and Office OLE tools call ChemDraw via COM). Python 3.10–3.13 (3.14 is unsupported by TensorFlow/DECIMER).
Install into a dedicated conda environment:
conda create -n cdxml python=3.12 pip -y
conda activate cdxml
pip install cdxml-toolkit
cdxml-doctor --no-tests
(cdxml-doctor --no-tests is a one-shot setup check — it prints diagnostics and exits; it is not a long-lived service.)
- Claude Desktop — add to
%APPDATA%\Claude\claude_desktop_config.json, pointingcommandat the Python interpreter inside thecdxmlconda env (replaceYOUR_USERNAME; runwhere pythoninside the activated env to find the exact path):{ "mcpServers": { "cdxml-toolkit": { "command": "C:\\Users\\YOUR_USERNAME\\miniconda3\\envs\\cdxml\\python.exe", "args": ["-m", "cdxml_toolkit.mcp_server"] } } }Claude Desktop launches this over stdio — you do not keep a terminal open.
- Claude Code — direct MCP add (stdio), using the same env Python interpreter:
claude mcp add --transport stdio cdxml-toolkit -- "C:\Users\YOUR_USERNAME\miniconda3\envs\cdxml\python.exe" -m cdxml_toolkit.mcp_server(Upstream documents only the Claude Desktop JSON form; the
claude mcp addequivalent above mirrors it — replace the interpreter path with your env’spython.exe.) The package also installs acdxml-mcpconsole entry point, soclaude mcp add --transport stdio cdxml-toolkit -- cdxml-mcpworks if thecdxmlenv is on yourPATH.
Upstream also ships a CLAUDE.md in the repository root with anti-hallucination rules; copy it into your agent’s working directory so the agent always resolves structures through tools rather than writing SMILES from memory or vision.
What it does
Exposes 15 grounded chemistry tools so the model reasons about chemistry while the tools handle structure resolution, 2D layout, and CDXML:
- Resolution —
resolve_name(name/abbreviation/CAS/formula → molecule JSON),modify_molecule(6 edit operations with 162 named-reaction templates, returns MCS diffs to verify the change). - Rendering —
draw_molecule(single molecule → CDXML),render_scheme(YAML/text/reaction JSON → publication-ready CDXML),render_to_png(CDXML → PNG via ChemDraw COM). - Perception —
parse_reaction(ELN export → semantic JSON with species, roles, SMILES),summarize_reaction,extract_structures_from_image(image → validated SMILES via the DECIMER OCR neural network),parse_scheme(CDXML → species/steps/topology JSON). - Analysis —
parse_analysis_file(LCMS/NMR PDF → structured peak data),format_lab_entry. - Office integration —
extract_cdxml_from_office/embed_cdxml_in_office(pull/inject editable ChemDraw OLE objects in PPTX/DOCX),convert_cdx_cdxml,search_compound(SMILES-similarity search across directories).
Primary use cases: drawing publication-ready reaction schemes, digitizing structures from figures/screenshots, ELN and LCMS/NMR parsing, ChemDraw office-document automation.
Notes
Grounding is the design goal: the bundled CLAUDE.md instructs the agent to never write SMILES from memory or vision — every structure must come from resolve_name, modify_molecule, or extract_structures_from_image (which runs DECIMER OCR and returns validated SMILES), and edits go through modify_molecule so an MCS diff confirms the transformation. Large CDXML/JSON outputs are written to files (the tool returns a path) to keep them out of the model’s context window.
The Windows + ChemDraw requirement is a hard dependency for CDXML rendering, render_to_png, and the Office OLE tools; the toolkit is not usable on macOS/Linux or without a ChemDraw install. Distinct from the RDKit-based servers catalogued here (chemcp, rdkit-mcp, rdkit-skill, rdkit-agent), which render SVG/PNG offline via RDKit but do not produce editable ChemDraw CDXML or automate Office documents.
Sources
Installed this tool?
Share feedback — install path, OS, errors, workarounds. The form opens with this tool pre-selected and a link back to this page.