Skip to main content
Glama
Organic Chemistry Structure MCP Server

Organic Chemistry Structure MCP Server

Organic Chemistry Structure MCP Server 🧪

AIアシスタント(ChatGPT、Gemini、Claude、Cursor、MCP Inspector)が、ネイティブなMCP画像コンテンツを使用して、正確な2D有機化学構造、反応、機構、共鳴構造、立体化学をAI会話内で直接、決定的にレンダリング、解決、表示できるように設計された、本番品質の**Model Context Protocol(MCP)**サーバーです。


主な機能

  • チャット内直接2D描画: ネイティブなMCP画像コンテンツアイテム(image/png base64)を返すため、互換性のあるAIクライアントは外部の画像ホストや拡散モデルを必要とせずに構造を直接レンダリングできます。

  • 決定的化学レンダリング: RDKitとCairoを搭載し、CPK標準色と明瞭な骨格結合による出版物品質の教科書的描画を実現。

  • 多層解決:

    1. 厳選されたJEEプリセット: クラス11/12のJEE MainおよびAdvancedの200以上の化合物と試薬をローカルに読み込み、瞬時(<10ms)の応答を実現。

    2. SQLite永続キャッシュ: 解決済みの化合物と事前レンダリングされた描画を自動キャッシュ。

    3. PubChem PUG REST API: 数千の既知の有機分子のフォールバック検索。

    4. 曖昧性エンジン: 異性体を推測しません。曖昧な名前(例: cresol、butanol、xylene)をフラグ付けし、曖昧性の解消を促します。

  • 7つのMCPツール:

    • show_structure: 分子式、分子量、SMILES、ソースメタデータを含む視覚的な2D描画。

    • resolve_compound: 構造化JSONでの完全な分子メタデータ。

    • show_reaction: 条件と矢印を備えた出版物品質の整列反応式。

    • show_mechanism: 中間体パネル、形式電荷、曲線矢印を備えた多段階機構(SN1、SN2、EAS、アルケンの水和、アルドール)。

    • compare_structures: 分子の並列比較グリッド。

    • show_resonance: 括弧で囲まれ、$\leftrightarrow$矢印で結ばれた共鳴の正準寄与構造。

    • show_stereochemistry: R/SおよびE/Z注釈付きの明示的な3Dくさび・破線投影。

  • デュアルトランスポート:

    • Streamable HTTP: リモートAI接続用の最新の/mcpエンドポイント。

    • Stdio: ローカルAIツールおよびMCP Inspector CLI用の標準入出力トランスポート。

  • テスト&管理Webスタジオ: React + Vite + Tailwind CSSで構築され、ライブテスト、MCP呼び出しの検査、プリセットの閲覧、サーバーヘルスの監視を実現。


Related MCP server: chemdraw-mcp

クイックスタート

1. 前提条件

  • Node.js: v18以上(Node.js v24でテスト済み)

  • Python: v3.10以上(.venvを使用してPython 3.12でテスト済み)

2. インストール

# Clone or open the repository directory
cd chem

# Install Node.js dependencies
npm install

# Setup Python virtual environment and chemistry dependencies
py -3.12 -m venv .venv
.\.venv\Scripts\python -m pip install rdkit pillow fastapi uvicorn pydantic requests pytest

3. ビルド&実行

# Build the TypeScript backend & React frontend
npm run build
cd web && npm run build && cd ..

# Start the unified MCP server & Web Studio (starts Node and Python engine automatically)
npm run dev
# Or for production:
npm start
  • MCP Streamable HTTPエンドポイント: http://localhost:3000/mcp

  • Webテスト&管理スタジオ: http://localhost:3000/

  • ヘルスチェック: http://localhost:3000/health


AIクライアントへの接続

1. Claude Desktop(stdio)

次の内容をclaude_desktop_config.jsonに追加してください:

{
  "mcpServers": {
    "organic-chemistry": {
      "command": "npx",
      "args": ["-y", "tsx", "C:/Users/TANMAY GARG/Desktop/chem/src/mcp/transports/stdioTransport.ts"]
    }
  }
}

2. MCP Inspector

7つのツールすべてを対話的に検査およびテストするには:

npx @modelcontextprotocol/inspector npx tsx src/mcp/transports/stdioTransport.ts

または、Streamable HTTP経由でhttp://localhost:3000/mcpに接続します。

3. ChatGPTおよびリモートAIクライアント

サーバーをHTTPS対応ドメイン(例: https://your-mcp-domain.com/mcp)にデプロイし、カスタムアクションまたはMCPコネクタとして設定します。


テストの実行

# Run Node.js unit and integration tests (Vitest)
npm test

# Run Python RDKit engine tests (pytest)
npm run test:python

ライセンス

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Renders interactive 2D molecular structure diagrams from SMILES notation and computes molecular properties like molecular weight, LogP, and TPSA, directly in the chat.
    1
    60 npm
    2
    ISC
  • A
    license
    C
    quality
    F
    maintenance
    Enables LLM agents to draw and edit ChemDraw reaction schemes, parse ELN exports and LCMS/NMR data, and generate publication-ready CDXML files through grounded chemistry tools.
    35
    3
    MIT