cdxml-toolkit
Summary: cdxml-toolkit is a ChemDraw MCP server that resolves chemical identities, verifies molecule edits with RDKit/ChemScript, and produces editable CDXML, reaction schemes, and Office objects.
Resolve chemistry — turn names, abbreviations, condensed formulas, or CAS numbers into molecule dicts (SMILES, formula, MW, exact mass, IUPAC) using a 4-tier chain: reagent DB → formula parser → ChemScript → PubChem.
Analyze & edit molecules —
analyze,name_surgery, SMARTS transforms,set_smiles,set_name, and named reaction templates, each returning an MCS structural diff (atoms added/removed/changed, delta formula/MW).Draw & render — single molecules to standalone CDXML, or full reaction schemes (YAML, compact DSL, or reaction JSON) to publication-ready CDXML with arrows, conditions, and layout control.
Parse reactions and schemes — structured JSON from CDXML/CDX/RXN/ELN CSV or experiment directories (species, roles, equivalents, conditions, topology, narrative), plus context-efficient summaries via field selection.
Read images — DECIMER OCR/OCSR for structures, confidence scores, bounding boxes, and optional text labels; remote upload is opt-in only.
Convert and rasterize — bidirectional CDX ↔ CDXML conversion and native PNG/SVG rendering through ChemDraw COM.
Scheme layout tools — clean, merge, polish, and segment schemes; batch-render multiple CDXML files with configurable DPI and format.
Office integration — extract, inspect, embed, batch-embed, replace, and template-fill editable ChemDraw OLE objects inside PPTX, DOCX, XLS, and XLSX.
Laboratory data workflows — parse LCMS/NMR PDFs, analyze LCMS time series, format verified lab entries, assemble lab books, discover experiment files, and parse SciFinder RDF.
Search and compare — compound lookup by Tanimoto similarity across experiment JSON, plus single and batch molecule comparison (up to 256 pairs) via ChemScript identity and RDKit fingerprints.
ChemScript SDK access — catalog public types/members and execute declarative SDK programs in an isolated, sandboxed process.
Runtime self-inspection — report version, profile, code digest, and local capability status, with explicit optional native/Office/ChemScript probes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cdxml-toolkit Draw a 3-step reaction scheme for the Boc deprotection from this image."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
This repository has moved. The toolkit is now maintained in the toolkit/ folder of ChemDraw Skill, with its full history. This repository is archived and read-only. Open issues and pull requests there.
CDXML Toolkit — ChemDraw MCP Server and Python Chemical Drawing
Platform support: Portable CDXML and RDKit workflows run on Windows, macOS, and Linux. ChemDraw COM rendering, ChemScript, and editable ChemDraw objects in Word or PowerPoint require a Windows host with a licensed desktop ChemDraw installation.
Featured demos
Explore real paper images and data through native previews, reference comparisons and editable downloads.
Case | What it demonstrates | Available scope |
Five structures, conditions, yields and wavy bonds | Complete figure; not pixel-identical | |
Eight structures, electron arrows, charges and conditions | Complete figure; not pixel-identical | |
Editable lanes, spots and Rf | Runnable example | |
Assembly from native ChemDraw templates | Runnable example | |
Real processed 1D data and an editable spectrum | Runnable example | |
Numerical data as editable curves | Runnable example | |
Full native scheme and electron arrows | Stereo acceptance pending; not 1:1 | |
Full native scheme and electron arrows | Stereo acceptance pending; not 1:1 |
Twenty structures: resolving stereo-reader disagreement

The source-oriented reconstruction disagreed between ChemScript and RDKit for 16 structures. The saved interoperability revision agrees for 20/20, preserving the reviewed molecular targets. Compound 1 uses explicit stereobonds and therefore differs visually from the source. Same-scale ink IoU: 0.6960; this is not pixel-identical or independent experimental stereo validation.
Editable CDXML · Failure analysis, workflow and rights · Per-compound evidence and versions
The embedded X-ray is a source crop. Paper-derived artwork is excluded from the MIT license; see the case's source and rights statement.
Incremental workflow available: linked structure/scene records, verified candidate caching, local checks and explicit dual-variant acceptance. A controlled three-caption-edit replay reduced native calls from 8 to 2 (33.53 s to 8.88 s); this is not an end-to-end recognition speed claim. Source-oriented version · Workflow · Measured evidence.
Paper reaction scheme
Turn a published reaction scheme into an editable ChemDraw document. This example preserves the five structures, reaction conditions, yields and compound labels shown in the reference image.
Original paper figure

Editable reconstruction — ChemDraw-native output

Download editable CDXML · Inspect structure-by-structure comparisons · Source and verification details
Structures extracted from the saved CDXML match the five reviewed reference structures. The shared wavy bond for 17a/17b remains unspecified, as in the original figure.
Visually reviewed and editable; not pixel-identical. Font metrics, arrows and some line geometry still differ. Matching saved structures does not independently prove that every detail was recognized correctly.
Sceptrin mechanism
Reference excerpt

ChemDraw reconstruction

Editable CDXML · Native CDX · Side-by-side comparison · Verification and source limitations
Eight numbered structures and six chloride counterions retain their molecular inventory, depicted stereochemistry and formal charges through an actual ChemDraw CDXML → CDX → CDXML save cycle. Undefined R groups remain generic substituents. The reconstruction is visually reviewed, not pixel-identical: font metrics, electron-arrow paths, some bridge geometry and the placement of the delocalized charge indicators differ. The source's cropped recrystallization statement is not completed by inference.
Native TLC
Native TLC plate, lane and spot objects with illustrative Rf values.

Editable CDXML · Run this example · Data and template provenance
Native apparatus
Built from installed ChemDraw apparatus templates, preserving their editable native artwork.

Editable CDXML · Run this example · Data and template provenance
Experimental NMR
Real processed 1D NMR data, with peak picking and selected-region integration available. No automatic atom assignment.

Editable CDXML · Run this example · Data and template provenance
Simulated reaction kinetics
Explicitly simulated first-order decay demonstrates the numerical-data-to-figure workflow.

Editable CDXML · Run this example · Data and template provenance
Complex synthesis: 101–112
Full scheme with editable structures. Includes every compound number, reaction condition and mechanism arrow. Native saving preserves connectivity, charge, isotopes and alkene geometry. Bridgehead stereochemistry remains unresolved, and font and line geometry differ; this is not a validated 1:1 reproduction.

Full editable CDXML · Reference comparison · Acceptance and provenance

Complex synthesis: 113–122
Full scheme with editable structures. Includes every compound number, reaction condition and mechanism arrow. Native saving preserves connectivity, charge, isotopes and alkene geometry. Bridgehead stereochemistry remains unresolved, and font and line geometry differ; this is not a validated 1:1 reproduction.

Full editable CDXML · Reference comparison · Acceptance and provenance

Related MCP server: Mol-MCP
Reconstruction scope and structure review
Both complex synthesis examples contain the complete layout, native molecular structures, text, brackets and electron arrows. Molecules remain editable atoms, bonds and expandable abbreviations; screenshots and traced outlines do not substitute for molecular objects.
Check | Current result |
Connectivity, elements, charge, isotopes and alkene geometry after native saving | Save-cycle checks pass for both figures |
Complete stereochemistry | Not accepted; RDKit and ChemScript return opposing assignments at some bridgeheads |
Visual comparison with the reference | Native previews and full comparisons inspected; font, arrow and some line geometry still differ |
Strict pixel-for-pixel 1:1 | Not achieved |
Save-cycle agreement does not establish perfect recognition of the reference. Compounds 105–109, 115–120 and 121 contain conflicting specified configurations; some expanded chains and abbreviation definitions in the source also need clarification. The reconstructions preserve each depiction rather than silently making the route chemically self-consistent. The atom-level comparison records component hashes and atom mappings for review; absence of a disagreement does not independently establish source stereochemistry.
After installing the runtime, rebuild these two layouts offline without repeating DECIMER recognition:
python examples/paper-reconstructions/rebuild.py ./paper-figures-outputUse a new output directory. This assembles saved molecular components; native previews still require Windows ChemDraw. See the rebuild example and limitations. Source paper artwork is not relicensed under the software license.
Publication figures
Create editable figures with explicit atom coordinates, six reaction-arrow styles, electron arrows, rich conditions, atom numbering and native-template preservation.
Tool | Use it for |
| Fixed-coordinate structures, arrows, rich text, grids, highlights and native templates |
| Inspect atom indices and CIP labels; explicit stereo edits, bounded stereoisomer/tautomer enumeration, MCS and R-group decomposition |
| Save side-by-side images and difference measurements for actual visual review |
The renderer checks chemical identity by extracting structures from the saved CDXML. Wavy bonds remain unspecified; enhanced AND/OR/ABS stereo groups are retained. Chemistry checks and visual similarity are separate: neither a valid SMILES nor a low image-difference score proves a faithful paper reproduction. Unsupported fresh radical and non-tetrahedral depictions require a verified native template.
Installation: these features require the source version installed by the Quick Start commands; they are not included in the v0.7.0a1 release.
What it provides
Area | Practical result |
Chemistry grounding | Resolve names, abbreviations, CAS numbers, formulas, and recognized image candidates through databases, ChemScript, OPSIN, or DECIMER. |
Controlled structure work | Compare molecules, apply named transformations, preserve stereochemistry, and inspect MCS-based structural differences. |
ChemDraw output | Draw molecules, clean or merge schemes, convert CDX/CDXML, and render native PNG or SVG files. |
Laboratory figures | Native TLC objects and Rf measurement; editable apparatus assembled from installed ChemDraw templates. |
Scientific data | Peak picking and selected-region integration for processed 1D NMR; editable numerical plots. No automatic atom assignment or complete FID pipeline. |
Office workflows | Extract, replace, and batch-embed editable ChemDraw OLE objects in PowerPoint and Word. |
Experiment workflows | Parse ELN exports, SciFinder RDF, LCMS or NMR reports, and assemble structured lab-book material. |
Agent service | Run through stdio locally or authenticated Streamable HTTP for a trusted remote computer. |
Source and release identity
The current source prepares 0.7.0a2; a local checkout is not evidence that this version has been published. The existing v0.7.0a1 release predates publication-figure and incremental-reconstruction support. For reproducibility, record the full source commit or wheel hash as well as the version.
get_toolkit_capabilities(detail="summary") reports the selected profile, source runtime_identity.version, and runtime_identity.code_sha256, separately from installed distribution metadata. The digest covers normalized Python sources, not dependencies or all package data. It identifies code edits without including molecule contents. A metadata mismatch warning means the editable checkout or installed package needs reinstalling; it is not an installation success claim.
Business results with an explicit top-level ok=false propagate as MCP tool errors and failed calls in metrics. Reports successfully generated with individual checks marked failed/not-run retain those separate acceptance states. Default worker timeouts use the registered tool limit, then the global environment/default; an explicit per-call timeout takes precedence.
Quick start
Required: 64-bit Python 3.10–3.13. Portable CDXML and RDKit operations run without ChemDraw. Native rendering, ChemScript, and editable Office objects require Windows plus a licensed desktop ChemDraw installation. Python 3.14 is not supported yet.
conda create -n cdxml python=3.12 pip -y
conda activate cdxml
git clone https://github.com/ZiChenWang114514/cdxml-toolkit-community.git
Set-Location .\cdxml-toolkit-community
# Both distributions expose the cdxml_toolkit import package.
pip uninstall -y cdxml-toolkit
pip install -e ".[all]"
# Read-only environment and capability report.
cdxml-doctor --no-testsThe default installation includes the portable CDXML, RDKit, and MCP runtime. Optional groups are windows, office, chemscript, analysis, scientific, image, decimer, opsin, http, all, and dev.
Install the current community source directly when a checkout is unnecessary:
pip install "cdxml-toolkit-community[all] @ git+https://github.com/ZiChenWang114514/cdxml-toolkit-community.git@main"cdxml-doctor --no-tests does not change the machine. To detect ChemDraw and prepare a compatible ChemScript environment interactively, run:
cdxml-doctor --no-tests --configure-chemscript
cdxml-doctor --jsonChemScript is optional. OPSIN provides offline IUPAC name resolution when Java is available. The wheel does not bundle a JRE; the runtime first checks JAVA_HOME and java on PATH. A pre-approved local archive can be installed with explicit integrity metadata:
$env:CDXML_TOOLKIT_JRE_ZIP = "C:\installers\temurin-jre.zip"
$env:CDXML_TOOLKIT_JRE_SHA256 = "approved sha256"
cdxml-doctor --no-testsArchive size, extracted size, paths, links, and optional SHA-256 are checked before installation.
Connect an agent
Any MCP-compatible agent can connect to the runtime. Start the full 39-tool stdio service:
cdxml-mcpRegister the Python interpreter and arguments in your client's MCP configuration. A common JSON format is:
{
"mcpServers": {
"chemdraw": {
"command": "C:\\Users\\YOU\\miniconda3\\envs\\cdxml\\python.exe",
"args": ["-m", "cdxml_toolkit.mcp_runtime"]
}
}
}Configuration location and syntax depend on the client. Restart the agent, then try:
Resolve aspirin, draw it as CDXML, and render a PNG preview.For paper reconstruction and laboratory figures, load the client-independent ChemDraw Skill. The historical profile identifier codex remains available for compatibility; it does not restrict which agent can use the tools.
Copy CLAUDE.md into an agent workspace when the client supports project instructions. It tells the agent to obtain molecular structures from tools, use OCSR for images, preserve chemical semantics, and verify transformations instead of inventing structure strings.
How the runtime works
Important runtime properties:
Tool calls run in subprocess workers with configurable hard timeouts and structured errors.
ChemDraw, Word, and PowerPoint automation share serialized native-resource coordination.
Output-producing tools validate artifacts and avoid unintentionally replacing existing files.
Metrics record counts, duration, timeouts, worker failures, and queue length without tool arguments or molecular content.
get_toolkit_capabilitiesreports the available local features before an agent chooses a workflow.
Tool profiles
Choose the smallest useful profile to reduce tool-selection noise:
Profile | Tools | Focus |
| 16 | Compatible core tools plus capability discovery |
| 21 | Office inspection, replacement, templates, and batch embedding |
| 20 | Experiment discovery, LCMS series, lab books, and SciFinder RDF |
| 20 | Molecule comparison and controlled ChemScript SDK access |
| 39 | Complete local and remote collection |
The generated MCP tool reference and JSON schema contain the exact live signatures. CI checks both files for drift.
Streamable HTTP
Stdio remains the local default. An activated Windows workstation can serve a trusted remote computer after installing the http extra:
$env:CHEMDRAW_MCP_HTTP_API_KEY = "generate-a-long-random-value"
cdxml-mcp --transport streamable-http --host 0.0.0.0 --port 8029 `
--allowed-host chemdraw-host.example:8029 `
--allowed-origin https://trusted-client.exampleRemote binding requires a bearer key and an explicit host list. /health contains no molecule data; /metrics requires authentication when the server is remotely reachable.
DECIMER image upload is disabled by default. Remote recognition requires confirm_upload=true, validates that the payload decodes as an image, and enforces request and response limits.
Command line
Command | Purpose |
| Complete MCP runtime; 39-tool |
| Compatible 15-tool core server |
| Read-only diagnostics, tests, and explicit ChemScript setup |
| Render JSON, YAML, or compact text to CDXML |
| Render CDXML to PNG or SVG |
| Merge schemes or clean reaction layout |
| Embed editable ChemDraw objects in PPTX or DOCX |
| Parse instrument reports |
| Regenerate the Markdown and JSON tool references |
The scheme renderer accepts YAML, reaction JSON, and a compact text syntax described in the showcase catalog.
Development
python -m pip install -e ".[dev,windows,office,analysis,image,scientific]"
python -m pytest -m "not network" -q
python -m build
python -m twine check dist/*Hosted CI checks Python 3.10–3.13, MCP SDK 1.x and 2.x, generated references, portable tests, and distributions. Native ChemDraw, ChemScript, Word, and PowerPoint checks run on a licensed Windows workstation.
Read the contribution guide, security policy, and maintenance guide before proposing or releasing changes.
Community stewardship
This repository continues leehiufung911/cdxml-toolkit. The distribution is cdxml-toolkit-community; the compatible Python import remains cdxml_toolkit.
Community maintainer: ZiChenWang114514
Original author: Hiu Fung Kevin Lee (@leehiufung911)
Third-party data and component notices: NOTICE.md
License: MIT
The original project was directed by Hiu Fung Kevin Lee, a PhD organic chemist, and documented as built and tested with Claude Code (Opus 4.6).
Data-driven publication figures
Create substrate-scope and full-structure SAR panels from CSV/XLSX and trusted structures. Stable compound IDs bind measurements to editable ChemDraw objects. Update data or replace a structure after native editing while preserving unrelated layout and annotations; ambiguous matches produce conflict drafts. See the workflow and examples. XLSX support requires the toolkit publication extra.
Available Tools
35 toolsanalyze_lcms_seriesAnalyze Lcms SeriesC
Analyze a chronological series of standard LCMS PDF reports.
Inputs: files (required), output_path, mz_tolerance, rt_tolerance, +2 more.
assemble_lab_bookAssemble Lab BookC
Assemble a deterministic lab-book entry from experiment files.
Inputs: input_dir (required), experiment, output_path, tracking_json.
batch_compare_moleculesBatch Compare MoleculesC
Compare up to 256 molecule pairs with one ChemScript bridge session.
Inputs: pairs (required), n_bits, radius, fingerprint.
batch_embed_cdxml_in_officeBatch Embed Cdxml In OfficeC
Create PPTX or DOCX containing editable ChemDraw OLE objects.
Inputs: cdxml_paths (required), output_path (required), margin_pt.
clean_scheme_layoutClean Scheme LayoutC
Clean an existing CDXML reaction layout without changing the source file.
Inputs: input_path (required), approach, output_path, render_preview.
compare_moleculesCompare MoleculesB
Compare two molecule representations using ChemScript identity and RDKit Tanimoto fingerprints.
Inputs: molecule_a (required), molecule_b (required), n_bits, radius, +1 more.
convert_cdx_cdxmlA
Convert bidirectionally between CDX (binary) and CDXML (XML) formats.
Direction is detected from the file extension:
.cdx input → .cdxml output
.cdxml input → .cdx output
Uses available backends in order: ChemDraw COM (best fidelity, Windows) → pycdxml (pure Python, partial support) → OpenBabel.
ChemDraw COM requires ChemDraw to be installed and closed before running.
Args: input_path: Path to .cdx or .cdxml file. output_path: Output file path. If not given, same directory as input with the swapped extension (e.g. foo.cdx → foo.cdxml).
Returns: Dict with keys: ok, input, output (absolute path to written file). Returns {ok: False, error: "..."} if conversion fails.
Safety override: Convert CDX/CDXML through a validated no-overwrite staging file.
Inputs: input_path (required), output_path.
diagnose_runtimeDiagnose RuntimeC
Report local runtime capabilities; native probes are explicit and temporary.
Inputs: run_native_probe, run_office_probe, run_chemscript_probe.
discover_experiment_filesDiscover Experiment FilesC
Discover and classify files belonging to one experiment.
Inputs: input_dir (required), experiment, output_path.
draw_moleculeA
Render a single molecule to a standalone CDXML document.
Takes a molecule dict (at minimum {"smiles": "..."}) and generates a self-contained CDXML string with 2D coordinates in ACS Document 1996 style (BondLength=14.40, Arial 10pt). Optionally places a text label below the structure using the "label", "name", or "iupac_name" field (in that order).
IMPORTANT: Do NOT construct {"smiles": "..."} with hand-edited SMILES. Always get mol_json from another tool (resolve_name, modify_molecule, parse_reaction, etc.). If you need to edit a SMILES, use modify_molecule(operation="set_smiles") first — it gives you an MCS diff to verify the edit was correct before drawing.
Args: mol_json: Molecule dict with at least {"smiles": "..."}. Optional display fields: "label" (used verbatim), "name", "iupac_name". Should come from another tool's output, not hand-constructed. output_path: If given, also write CDXML to this file path.
Returns: Dict with keys: ok, cdxml (CDXML document string), and output_path if a path was specified. Returns {ok: False, error: "..."} on failure.
Safety override: Draw a molecule through a validated no-overwrite staging file.
Inputs: mol_json (required), output_path.
embed_cdxml_in_officeA
Embed a CDXML file as an editable ChemDraw OLE object in PPTX or DOCX.
Converts CDXML → CDX + EMF preview via ChemDraw COM, builds a CFB OLE compound file, and injects it into a PPTX slide or DOCX paragraph as a double-clickable, editable ChemDraw object.
Requires: ChemDraw COM (Windows, ChemDraw 16+), python-pptx or python-docx. ChemDraw must be installed and closed before calling this tool.
The output format (.pptx or .docx) is detected from office_path extension. If office_path does not exist, a new file is created.
Args: cdxml_path: Path to the CDXML file to embed. office_path: Path to the target .pptx or .docx file. Created if it does not exist. output_path: Output file path. If not given, writes to office_path (modifies in place via temp file).
Returns: Dict with keys: ok, input_cdxml, output (absolute path to written Office file), format ("pptx" or "docx"), num_objects_embedded. Returns {ok: False, error: "..."} if embedding fails.
Safety override: Create a new validated PPTX or DOCX and reject all existing targets.
Inputs: cdxml_path (required), office_path (required), output_path.
execute_chemscript_sdkExecute Chemscript SdkC
Execute a declarative ChemScript SDK program in an isolated Python.NET process.
Inputs: program (required), max_items, allow_file_io, allow_overwrite, +1 more.
extract_cdxml_from_officeA
Extract embedded ChemDraw objects from a PPTX, DOCX, XLS, or XLSX file.
Office files (PPTX/DOCX/XLSX) are ZIP archives that may contain ChemDraw OLE objects as binary blobs. XLS files are OLE2 compound documents with embedded ChemDraw objects stored in MBD* sub-storages. This tool extracts every ChemDraw object, converts it to CDXML, and writes the files to output_dir.
Requires: olefile. CDX→CDXML conversion uses available backends.
Args: file_path: Path to a .pptx, .docx, .xlsx, or .xls file. output_dir: Directory for extracted CDXML files. Default: a folder named "_chemdraw/" next to the input file.
Returns: Dict with keys: ok, input, output_dir, objects (list of: source_path, cdxml_output, cdx_output, error for each extracted object). Returns {ok: False, error: "..."} if extraction fails entirely.
Safety override: Extract every object transactionally; publish nothing on partial failure.
Inputs: file_path (required), output_dir.
extract_structures_from_imageA
Extract chemical structures from an image using DECIMER.
Takes a PNG, JPG, or PDF image and returns SMILES + confidence scores + bounding boxes for every detected chemical structure. Segments the image into individual structure regions automatically. Optionally detects nearby text labels via OCR.
DECIMER models download on first run (~570 MB to ~/.data/DECIMER-V2/). Requires: DECIMER, opencv-python, and optionally pytesseract/easyocr.
The returned SMILES should be passed through resolve_name or modify_molecule to verify and enrich — DECIMER SMILES may not be canonical and can have low confidence for complex structures.
Args: image_path: Path to PNG, JPG, or PDF file. detect_labels: Attempt OCR detection of text labels near structures. Requires pytesseract or easyocr; labels are null without an OCR library. Default True.
Returns: Dict with keys: ok, image_path, structures (list of: smiles, confidence in [0,1], bbox [x0,y0,x1,y1], label or null). Returns {ok: False, error: "..."} if DECIMER is not installed or extraction fails.
Inputs: image_path (required), detect_labels.
extract_structures_via_decimer_apiExtract Structures Via Decimer ApiC
Upload an image to DECIMER only when confirm_upload is explicitly true.
Inputs: image_path (required), hand_drawn, output_path, confirm_upload, +3 more.
fill_office_templateFill Office TemplateC
Fill PPTX/DOCX text and editable ChemDraw placeholders from a manifest.
Inputs: manifest_path (required), template_path (required), output_path.
format_lab_entryA
Format a list of entry dicts into a structured lab book text entry.
Takes a list of typed entry dicts (or a JSON string) and produces a formatted lab book entry. The tool re-parses LCMS PDFs to fill in exact numbers — you only provide peak identifications (name, approximate RT, ion) as search keys.
IMPORTANT: Do NOT write free-form LCMS text. Use the structured entry types below. The tool will look up the actual RT, area%, m/z, and UV from the PDF.
Entry types and their required fields:
{"type": "text", "content": "Procedure paragraph or section header..."}
{"type": "lcms-species", "file": "path/to/report.pdf", "label": "t = 0 min", "peaks": [ {"name": "Product", "rt": 1.02, "ion": {"mode": "ES-", "mz": 444.1}}, {"name": "SM", "rt": 0.65, "ion": {"mode": "ES+", "mz": 275.1}}, {"name": "TPPO", "rt": 1.02, "ion": {"mode": "ES+", "mz": 279.1}} ]}
{"type": "lcms-areas", "file": "path/to/report.pdf", "label": "t = 10 min", "peaks": [ {"name": "Product", "rt": 1.03, "compound_related": true}, {"name": "Byproduct", "rt": 1.26, "compound_related": false} ]}
{"type": "lcms-species", "file": "path/to/report.pdf", "label": "Purified product", "peaks": [ {"name": "Product", "rt": 1.01, "ion": {"mode": "ES-", "mz": 444.2}, "purity": true, "detector": "220nm"} ]}
{"type": "lcms-manual", "file": "path/to/manual_integration.pdf", "label": "Manual LC", "peaks": [ {"name": "Product", "rt": 1.01, "compound_related": true} ]}
{"type": "nmr", "content": "1H NMR (400 MHz, DMSO-d6): ..."}
Workflow: First call parse_analysis_file on each PDF to see peaks/masses. Then build entries referencing those PDFs with approximate RT and ion as search keys. This tool re-reads the PDF and fills in exact numbers.
Args: entries_json: List of entry dicts, or a JSON string, or {"entries": [...]}. output_path: If given, write the formatted text to this file and return {ok, output_path, size} instead of {ok, text}.
Returns: Dict with keys: ok, text (formatted lab book entry string). When output_path is provided, returns {ok, output_path, size} instead.
Safety override: Format a lab entry and atomically publish verified text.
Inputs: entries_json (required), output_path.
get_toolkit_capabilitiesGet Toolkit CapabilitiesA
Return versions, profile, tool schema digest, and local capability status.
Inputs: no named parameters.
inspect_chemdraw_objects_in_officeInspect Chemdraw Objects In OfficeC
Inventory editable ChemDraw objects and extract numbered CDXML previews.
Inputs: input_path (required), output_dir, render_previews.
inspect_chemscript_sdkInspect Chemscript SdkC
Catalog every public ChemScript type/member, with filtering or a complete JSON export.
Inputs: limit, query, offset, type_name, +2 more.
merge_reaction_schemesMerge Reaction SchemesC
Merge parallel, sequential, or unrelated CDXML reaction schemes.
Inputs: input_paths (required), mode, equiv_mode, output_path, +4 more.
modify_moleculeA
Analyze or transform a molecule with structural verification.
IMPORTANT: This is the ONLY correct way to modify a molecule. Never edit SMILES strings yourself and pass them directly to draw_molecule — always go through modify_molecule so you get an MCS-based structural diff to verify the change was correct.
Takes a molecule dict (at minimum {"smiles": "..."}) and applies one of 6 operations. Returns the modified molecule with a structural diff showing exactly what atoms/bonds were added, removed, or changed.
Operations: "analyze" — Inspect without modifying: functional groups, IUPAC names, formula, MW, prefix form. No extra kwargs needed. "name_surgery" — Modify via IUPAC name: add/remove substituents. Pass add=[{"locant": "2", "prefix": "fluoro"}] and/or remove=["methyl"] kwargs. "smarts" — Apply a SMARTS reaction transform. Pass smarts= "reaction SMILES" (e.g. "[c:1][F]>>[c:1][Cl]") or reaction_name= from list_reactions output. "set_smiles" — Use when you have edited a SMILES and want to verify the change. Pass the original mol_json and new_smiles=. The MCS diff will confirm exactly what was added/removed. Do NOT generate SMILES from scratch — use resolve_name. "set_name" — Set the display name. Pass new_name=. "reaction" — Apply a named template from list_reactions. Pass reaction_name= and optionally reagent={"smiles": ...} for binary reactions (coupling, etc.).
Args: mol_json: Source molecule dict with at least {"smiles": "..."}. operation: One of: "analyze", "name_surgery", "smarts", "set_smiles", "set_name", "reaction". add: For "name_surgery" — list of {"locant": str, "prefix": str} dicts. remove: For "name_surgery" — list of prefix strings to remove. new_smiles: For "set_smiles" — validated SMILES string. new_name: For "set_name" — new display name string. reaction_name: For "smarts"/"reaction" — template name. reagent: For "reaction" — dict with "smiles" key for the second reagent. smarts: For "smarts" — reaction SMARTS string. description: For "set_smiles" — optional context note.
Returns: For "analyze": ok, input_smiles, canonical_name, alternative_names, functional_groups, prefix_form, bracket_tree, formula, mw. For modifications: ok, input_smiles, output_smiles, input_name, output_name, aligned_names, diff (atoms_added, atoms_removed, atoms_changed, mcs_smarts, delta_formula, delta_mw), formula, mw.
Inputs: mol_json (required), operation (required), add, remove, +6 more.
parse_analysis_fileA
Parse an LCMS or NMR analysis PDF to extract peaks and data.
Supports Waters LCMS reports and MestReNova NMR PDFs. Returns structured peak data for LCMS species identification or NMR characterisation.
This module is under active development. If unavailable, the tool returns a graceful error rather than crashing.
Args: pdf_path: Path to an LCMS or NMR PDF report. output_path: If given, write the parsed data as JSON to this file and return {ok, output_path, size} instead of the full dict.
Returns: For LCMS: dict with retention_times, peak_areas, masses, UV traces. For NMR: dict with chemical_shifts, multiplicities, integrations. When output_path is provided, returns {ok, output_path, size}. Returns {ok: False, error: "..."} if module unavailable or parse fails.
Safety override: Parse an analysis file and atomically publish verified JSON.
Inputs: pdf_path (required), output_path.
parse_reactionA
Parse reaction files into a semantic JSON descriptor.
Extracts every species with canonical SMILES, role classification (using Schneider fingerprint scoring for reactant/reagent binary, plus curated database for semantic roles like base/solvent/catalyst), display names, equivalents, mass data, and adducts. Produces a single JSON source of truth suitable for summarize_reaction, render_scheme, or LCMS analysis.
Provide at least one file path. Multiple may be combined (e.g. cdxml + csv) to merge structural data with ELN metadata.
Args: cdxml: Path to a .cdxml reaction file. cdx: Path to a .cdx reaction file (converted internally). csv: Path to a Findmolecule ELN CSV export. rxn: Path to a .rxn file. input_dir: Directory containing experiment files (auto-discovers cdxml/cdx/csv/rxn by experiment ID). output_path: If given, write the result JSON to this file and return {ok, output_path} instead of the full dict.
Returns: Reaction descriptor dict with keys: version, experiment, input_files, reaction_smiles, reaction_class, species (list with role, smiles, formula, mw, etc.), conditions, and eln_data. When output_path is provided, returns {ok, output_path} instead.
Safety override: Parse a reaction and atomically publish its JSON descriptor.
Inputs: cdx, csv, rxn, cdxml, +2 more.
parse_schemeA
Parse a CDXML reaction scheme into a structured description.
Reads a CDXML file containing a reaction scheme (single- or multi-step) and returns a structured JSON with a species registry, reaction graph, topology classification, and a natural language narrative suitable for LLM reasoning.
Uses two strategies in order: step-attribute path (reads attributes if present) then geometry-based fallback (spatial arrow detection). Text labels near arrows are classified as "chemical", "condition_ref", "footnote", "yield", "compound_label", "citation", or "bioactivity".
Args: cdxml_path: Path to a CDXML file containing a reaction scheme. output_path: If given, write the result JSON to this file and return {ok, output_path, size} instead of the full dict.
Returns: Dict with keys: source_file, species (dict of species records with smiles, name, formula, mw, role, text_category), steps (list with reactant/product/reagent species IDs and conditions), topology (linear/parallel/convergent/divergent), content_type, narrative (human-readable summary), and optionally sub_schemes for multi-panel files. When output_path is provided, returns {ok, output_path, size}.
Safety override: Parse a scheme and atomically publish its JSON descriptor.
Inputs: cdxml_path (required), output_path.
parse_scifinder_rdfParse Scifinder RdfC
Parse SciFinder RDF and optionally enrich CAS data over the network.
Inputs: input_path (required), output_path, resolve_cas, confirm_pubchem.
polish_reaction_schemePolish Reaction SchemeC
Run the audited deterministic polishing pipeline on a CDXML scheme.
Inputs: input_path (required), eln_csv, approach, align_mode, +4 more.
render_cdxml_filesRender Cdxml FilesC
Render one or more CDXML files through native ChemDraw COM.
Inputs: input_paths (required), dpi, format, output_dir.
render_schemeA
Render a chemical reaction scheme to publication-ready CDXML.
Accepts exactly ONE of: yaml_text, compact_text, or json_path. Call with NO arguments to see the full YAML schema reference.
yaml_text: Write YAML with structures (ID + SMILES) and steps (substrates, products, above/below arrow).
json_path: Path to reaction JSON from parse_reaction (auto-layout).
IMPORTANT: Every SMILES in the YAML must come from a tool — resolve_name, modify_molecule, parse_reaction, extract_structures_from_image, etc. Never write SMILES from built-in chemistry knowledge or from reading an image with vision. Always call the appropriate tool first, then use the SMILES from its output in your YAML.
Convention: ONE substrate on center line per step. Additional reagents go in above_arrow (structures or text). This shares intermediates between sequential steps.
Args: yaml_text: YAML scheme descriptor string. compact_text: Compact DSL syntax string. json_path: Path to a reaction JSON file. layout: Layout for json_path: "auto", "landscape", "portrait". output_path: If given, write the CDXML to this file and return {ok, output_path, size} instead of the raw CDXML string.
Returns: CDXML string (when output_path is None), or {ok, output_path, size} when output_path is provided, or YAML schema reference if called with no arguments.
Safety override: Render a scheme through a validated no-overwrite staging file.
Inputs: layout, json_path, yaml_text, output_path, +1 more.
render_to_pngA
Render a CDXML file to PNG using ChemDraw COM.
Uses ChemDraw's native rendering engine (via COM automation) at 300 DPI with a solid white background. ChemDraw must be installed (Professional 16+) and closed before calling this tool.
This tool uses ChemDraw COM exclusively — no RDKit fallback. For a quick preview without ChemDraw, use draw_molecule which returns CDXML that can be opened directly.
Args: cdxml_path: Path to the CDXML file to render. output_path: Output PNG path. If not given, writes to the same directory as the input with a .png extension.
Returns: Dict with keys: ok, input, output (absolute path to PNG file). Returns {ok: False, error: "..."} if ChemDraw COM is unavailable or rendering fails.
Safety override: Render CDXML to a validated PNG through a staging file.
Inputs: cdxml_path (required), output_path.
replace_chemdraw_objects_in_officeReplace Chemdraw Objects In OfficeC
Replace selected ChemDraw OLE contents and previews without moving them.
Inputs: input_path (required), replacements_manifest (required), output_path, render_pdf_preview.
resolve_nameA
Resolve any chemical identifier to a rich molecule descriptor.
Converts a name, abbreviation, condensed formula, or CAS number into a structured molecule dict with SMILES, formula, MW, exact mass, IUPAC name, reagent role, and display text. Uses a 4-tier resolution chain: curated reagent DB → condensed formula parser → ChemScript IUPAC → PubChem.
Do NOT hand-construct SMILES — use this tool instead. The returned dict can be passed directly to modify_molecule, draw_molecule, or used to build a render_scheme input.
Args: query: Chemical identifier — common name, IUPAC name, abbreviation, condensed formula (e.g. "PhB(OH)2"), or CAS number. Examples: "aspirin", "Cs2CO3", "2-chloropyridine", "534-17-8", "Et3N". use_network: Allow PubChem lookup (requires internet). Default True.
Returns: Dict with keys: ok, name, smiles, formula, mw, exact_mass, iupac_name, source (which tier resolved it), role (if in reagent DB), display_text, prefix_form (IUPAC substituent prefix, if applicable). Returns {ok: False, error: "..."} if unresolvable.
Inputs: query (required), use_network.
search_compoundA
Search for a compound across experiment JSON files by SMILES similarity.
Scans a directory of reaction JSON files (from parse_reaction) and returns exact matches and structurally similar compounds above the given Tanimoto threshold. Useful for finding related experiments, checking if a compound has been made before, or tracing a compound through a multi-step synthesis.
This module is under active development. If unavailable, the tool returns a graceful error rather than crashing.
Args: smiles: SMILES string of the compound to search for. Use resolve_name to get a validated SMILES first. experiment_dir: Directory containing reaction JSON files to search. similarity_threshold: Tanimoto similarity cutoff (0–1). Default 0.85.
Returns: Dict with keys: ok, query_smiles, exact_matches (list), similar_matches (list with similarity scores), total_files_searched. Returns {ok: False, error: "..."} if module unavailable or search fails.
Inputs: smiles (required), experiment_dir (required), similarity_threshold.
segment_large_schemeSegment Large SchemeB
Segment a disconnected or multi-panel CDXML scheme into logical regions.
Inputs: cdxml_path (required), verbose, output_path.
summarize_reactionA
Return a compact, context-efficient view of a reaction JSON file.
The full reaction JSON can be 3,000+ tokens with geometry data. This tool returns only the fields you need for a given task, making it practical for LLM reasoning without burning context.
Default fields (when no arguments given): species: id, name, role, role_detail, smiles, display_text, formula, mw top-level: experiment, conditions eln_data: product_yield, reaction_type
Pass ["*"] for any field set to get all fields (equivalent to loading the full JSON). Request specific fields by name for task-focused summaries.
Args: json_path: Path to a reaction JSON file from parse_reaction. species_fields: Species fields to include. Available: id, name, role, role_detail, smiles, smiles_neutral, is_sm, is_dp, is_substrate, is_solvent, exact_mass, exact_mass_full, mw, formula, adducts, source, source_id, csv_equiv, csv_mass, csv_name, csv_volume, csv_supplier, display_text, original_geometry. Pass [""] for all. top_fields: Top-level fields. Available: version, experiment, input_files, reaction_smiles, reaction_class, reaction_name, classification_confidence, warnings, metadata, conditions. Pass [""] for all. eln_fields: ELN data fields. Available: sm_mass, product_obtained, product_yield, procedure_text, procedure_plain, reaction_type, start_date, labbook_name, solvents, solvent_details. Pass ["*"] for all.
Returns: Compact dict with requested fields for each species and top-level keys.
Inputs: json_path (required), eln_fields, top_fields, species_fields.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 35 tools
Many tools have overlapping purposes (e.g., render_scheme vs render_cdxml_files vs render_to_png, extract_structures_from_image vs extract_structures_via_decimer_api, assemble_lab_book vs format_lab_entry). Descriptions clarify distinctions but the large number of similar-sounding tools (e.g., clean_scheme_layout, merge_reaction_schemes, polish_reaction_scheme) could still cause misselection, especially for a busy agent.
All tool names use snake_case and most follow a verb-first pattern (convert_, parse_, resolve_, modify_, render_, embed_, etc.). There are minor deviations like 'render_to_png' (preposition) and 'extract_structures_via_decimer_api' (long but consistent). Overall, naming is predictable and stylistically uniform.
With 35 tools, the server is heavily tool-dense. While the domain (chemistry/cheminformatics) is broad, many tools are highly specialized or meta (diagnose_runtime, inspect_chemscript_sdk, execute_chemscript_sdk, get_toolkit_capabilities) and may not be necessary for typical workflows. The count exceeds the upper bound of a well-scoped set, making it feel bloated.
The toolkit covers a wide range of chemistry workflows: molecule resolution, modification, drawing, reaction parsing, scheme manipulation, office integration, LCMS/NMR analysis, and lab book assembly. There are minor gaps (e.g., no direct molecule editing without modification, no explicit NMR peak assignment tool) but agents can work around these using existing tools.
Maintenance
Related MCP Connectors
Turn any LLM into your lab assistant: search samples, track experiments, analyze data with AI.
Chemistry, pharma and biotech tools for AI assistants: NMR, MS, IR and UV analysis, ADMET and ICH M7, stability (ICH Q1), HPLC methods, DoE, docking, retrosynthesis, biologics. Deterministic results you can check. Built in Leipzig, Germany.
Hosted document tools for agents: extract, parse, classify, convert, OCR, sign, and redact.
Stateless agentic tools over MCP: concept extraction, long-context, knowledge graph, planning.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceChemMCP is an easy-to-use and extensible chemistry toolkit for LLMs and AI assistants, enabling molecular analysis, property prediction, and reaction synthesis tasks without domain-specific training.74Apache 2.0- FlicenseBqualityDmaintenanceProvides computational chemistry tools for LLMs, enabling molecular operations like SMILES processing and geometry manipulation via a modular agent and tool system.9-
- AlicenseNot gradedqualityCmaintenanceConnects AI assistants to a live ChemDraw window on Windows via COM automation, enabling drawing, editing, and organizing chemical structures directly in the open document. Supports structure insert/export, scope tables, shorthand groups, figure layout, chemistry QC, publication tools, annotations, polymer brackets, and TLC plates.2MIT
- AlicenseNot gradedqualityBmaintenanceProvides an MCP interface for publication-quality chemical structure and reaction rendering from SMILES/InChI/molblock, with validation and name parsing. Enables AI agents to draw molecules and reactions as images.50 PyPIMIT