Skip to main content
Glama

cdxml-toolkit-community 与 ChemDraw 原生的 Buchwald-Hartwig 偶联反应,生成 KL-CC-001

平台支持: 可移植的 CDXML 和 RDKit 工作流可在 Windows、macOS 和 Linux 上运行。ChemDraw COM 渲染、ChemScript 以及 Word 或 PowerPoint 中的可编辑 ChemDraw 对象需要装有授权桌面版 ChemDraw 的 Windows 主机。

真正的可编辑方案

该仓库生成原生的化学产物,而非仅截图的输出。下面的反应直接从可编辑的 CDXML 通过 ChemDraw COM 导出;其 YAML 描述和 PNG 渲染保留在源文件旁边:

从可编辑 CDXML 直接导出的两步 ChemDraw 反应方案

YAML 源文件 · 可编辑 CDXML · 原生 PNG · 更多方案示例

Related MCP server: CovAiLent

提供的功能

领域

实际效果

化学基础

通过数据库、ChemScript、OPSIN 或 DECIMER 解析名称、缩写、CAS 号、分子式以及可识别的图像候选。

受控结构操作

比较分子、应用命名变换、保留立体化学,并检查基于 MCS 的结构差异。

ChemDraw 输出

绘制分子、清理或合并方案、转换 CDX/CDXML,并渲染原生 PNG 或 SVG 文件。

Office 工作流

在 PowerPoint 和 Word 中提取、替换和批量嵌入可编辑的 ChemDraw OLE 对象。

实验工作流

解析 ELN 导出、SciFinder RDF、LCMS 或 NMR 报告,并组装结构化的实验记录材料。

智能体服务

通过 stdio 在本地运行,或通过经过身份验证的 Streamable HTTP 为可信的远程计算机运行。

快速开始

要求: 64 位 Python 3.10–3.13。可移植的 CDXML 和 RDKit 操作无需 ChemDraw 即可运行。原生渲染、ChemScript 和可编辑的 Office 对象需要 Windows 以及授权的桌面版 ChemDraw 安装。尚不支持 Python 3.14。

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-tests

默认安装包含可移植的 CDXML、RDKit 和 MCP 运行时。可选组为 windowsofficechemscriptanalysisimagedecimeropsinhttpalldev

当无需检出时,直接安装当前的社区源码:

pip install "cdxml-toolkit-community[all] @ git+https://github.com/ZiChenWang114514/cdxml-toolkit-community.git@main"

cdxml-doctor --no-tests 不会更改机器。要以交互方式检测 ChemDraw 并准备兼容的 ChemScript 环境,请运行:

cdxml-doctor --no-tests --configure-chemscript
cdxml-doctor --json

ChemScript 是可选的。当 Java 可用时,OPSIN 提供离线的 IUPAC 名称解析。该 wheel 不捆绑 JRE;运行时首先检查 JAVA_HOMEPATH 上的 java。可以使用明确的完整性元数据安装预先批准的本地归档:

$env:CDXML_TOOLKIT_JRE_ZIP = "C:\installers\temurin-jre.zip"
$env:CDXML_TOOLKIT_JRE_SHA256 = "approved sha256"
cdxml-doctor --no-tests

安装前会检查归档大小、解压后大小、路径、链接以及可选的 SHA-256。

连接智能体

codex 配置暴露全部 35 个工具。直接启动本地 stdio 服务器:

cdxml-mcp --profile codex

对于 Codex,将服务器添加到 %USERPROFILE%\.codex\config.toml,并将 Python 路径替换为 cdxml 环境中的解释器:

[mcp_servers.chemdraw]
command = "C:\\Users\\YOU\\miniconda3\\envs\\cdxml\\python.exe"
args = ["-m", "cdxml_toolkit.mcp_runtime", "--profile", "codex"]
startup_timeout_sec = 120
tool_timeout_sec = 600

重启智能体,然后尝试:

Resolve aspirin, draw it as CDXML, and render a PNG preview.

%APPDATA%\Claude\claude_desktop_config.jsonmcpServers 下添加服务器:

{
  "mcpServers": {
    "cdxml-toolkit": {
      "command": "C:\\Users\\YOU\\miniconda3\\envs\\cdxml\\python.exe",
      "args": ["-m", "cdxml_toolkit.mcp_runtime", "--profile", "codex"]
    }
  }
}

相同的基于进程的配置适用于其他兼容 MCP 的智能体。

当客户端支持项目指令时,将 CLAUDE.md 复制到智能体工作区。它告诉智能体从工具获取分子结构、对图像使用 OCSR、保留化学语义,并验证变换而不是编造结构字符串。

运行时的工作方式

重要的运行时属性:

  • 工具调用在子进程工作器中运行,具有可配置的硬超时和结构化错误。

  • ChemDraw、Word 和 PowerPoint 自动化共享序列化的原生资源协调。

  • 产生输出的工具会验证产物,并避免意外替换现有文件。

  • 指标记录计数、持续时间、超时、工作器失败和队列长度,不包含工具参数或分子内容。

  • get_toolkit_capabilities 在智能体选择工作流之前报告可用的本地功能。

工具配置

选择最小的有用配置以减少工具选择噪音:

配置

工具

重点

core

16

兼容的核心工具加上能力发现

office

21

Office 检查、替换、模板和批量嵌入

analysis

20

实验发现、LCMS 系列、实验记录和 SciFinder RDF

chemscript

20

分子比较和受控的 ChemScript SDK 访问

codex

35

完整的本地和远程集合

生成的 MCP 工具参考JSON 模式 包含精确的实时签名。CI 会检查两个文件是否有漂移。

Streamable HTTP

Stdio 仍然是本地默认。激活的 Windows 工作站可以在安装 http 附加组件后为可信的远程计算机提供服务:

$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.example

远程绑定需要 bearer 密钥和明确的主机列表。/health 不包含分子数据;当服务器可远程访问时,/metrics 需要身份验证。

DECIMER 图像上传默认禁用。远程识别需要 confirm_upload=true,验证有效负载可解码为图像,并强制执行请求和响应限制。

命令行

命令

用途

cdxml-mcp

完整的 MCP 运行时;默认使用 35 工具的 codex 配置

cdxml-mcp-core

兼容的 15 工具核心服务器

cdxml-doctor

只读诊断、测试和显式 ChemScript 设置

cdxml-render

将 JSON、YAML 或紧凑文本渲染为 CDXML

cdxml-image

将 CDXML 渲染为 PNG 或 SVG

cdxml-merge / cdxml-layout

合并方案或清理反应布局

cdxml-ole

在 PPTX 或 DOCX 中嵌入可编辑的 ChemDraw 对象

cdxml-lcms / cdxml-nmr

解析仪器报告

cdxml-mcp-docs

重新生成 Markdown 和 JSON 工具参考

方案渲染器接受 YAML、反应 JSON 以及 展示目录 中描述的紧凑文本语法。

开发

python -m pip install -e ".[dev,windows,office,analysis,image]"
python -m pytest -m "not network" -q
python -m build
python -m twine check dist/*

托管 CI 检查 Python 3.10–3.13、MCP SDK 1.x 和 2.x、生成的参考、可移植测试和发行版。原生 ChemDraw、ChemScript、Word 和 PowerPoint 检查在授权的 Windows 工作站上运行。

在提议或发布更改之前,请阅读贡献指南安全策略维护指南

社区维护

此仓库延续了 leehiufung911/cdxml-toolkit。发行版为 cdxml-toolkit-community;兼容的 Python 导入仍为 cdxml_toolkit

原项目由 Hiu Fung Kevin Lee(有机化学博士)指导,并记录为使用 Claude Code (Opus 4.6) 构建和测试。

Install Server
A
license - permissive license
C
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
2Releases (12mo)
Commit activity

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    ChemMCP 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.
    70
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server for chemistry-focused tools, enabling LLM agents to perform molecule parsing, format conversion, property lookup, and other chemistry operations with explainable responses.
    Apache 2.0
  • F
    license
    B
    quality
    D
    maintenance
    Provides computational chemistry tools for LLMs, enabling molecular operations like SMILES processing and geometry manipulation via a modular agent and tool system.
    9
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables generation of chemical structures, reactions, spectra, titration curves, 3D models, and more from natural language or SMILES, using RDKit for offline rendering and supporting formats like PNG, SVG, CDXML, and Anki decks.
    8
    Apache 2.0

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZiChenWang114514/cdxml-toolkit-community'

If you have feedback or need assistance with the MCP directory API, please join our Discord server