Skip to main content
Glama
huangjianhuster

Biomolecule Modeling MCP Server

生体分子モデリング MCP サーバー

AI アシスタント(Claude など)が PDB 構造をクリーンアップし、初期段階のエネルギー緩和を実行できるようにする MCP(Model Context Protocol)サーバーです。これは、本番環境の MD や粗視化(例:Martini)パイプラインの前の準備ステップとなります。


クイックスタート (Claude Code)

このサーバーを使用する最も簡単な方法は uvx を経由する方法です。手動での依存関係管理は不要です:

claude mcp add "biomolecule-modeling" --scope user -- \
  uvx --from git+https://github.com/YOUR_USERNAME/biomolecule-modeling-mcp biomodeling

以上です。uvx はパッケージとそのすべての Python 依存関係を分離された環境に自動的にインストールします。このコマンドを実行した後、Claude Code を再起動すると、アクティブな MCP サーバーのリストにこのサーバーが表示されます。

OpenMM に関する注意: uvx は OpenMM の PyPI ホイール(CPU のみ)をインストールします。GPU アクセラレーションが必要な場合は、先に conda で OpenMM をインストールし(conda install -c conda-forge openmm pdbfixer)、代わりに手動インストールの方法を使用してください。


Related MCP server: PLUMED2 MCP Server

機能

このサーバーは、LLM を構造化されたワークフローに導く一連のツールを公開しています:

query_pdb_structure          # inspect chains, sequences, gaps, structural breaks
  └─ split_pdb               # separate protein / nucleic acid / ligands
       └─ fix_pdb_structure  # clean structure (PDBFixer): residues, hydrogens, heavy atoms
            └─ assemble_pdb_structures  # recombine components after separate fixing
                 └─ relax_pdb_structure # energy minimise ± short restrained MD (OpenMM)

いつでも get_workflow_report を呼び出すことで、LLM が行ったすべての決定とその推論をまとめた Markdown レポートを取得でき、ディスクに保存することも可能です。


ツール

ツール

説明

query_pdb_structure

鎖レベルの検査:タイプ、配列、残基範囲、番号の欠落、バックボーンの断絶

split_pdb

マルチコンポーネント PDB をタイプごとのファイル(タンパク質、核酸、リガンド)に分割

fix_pdb_structure

PDBFixer ラッパー:ヘテロ原子の除去、非標準残基の置換、欠損原子/水素の追加

assemble_pdb_structures

複数の PDB ファイルを競合解決しながら 1 つにマージ

relax_pdb_structure

OpenMM エネルギー最小化 + オプションの短いバックボーン拘束 MD

query_ff_presets

利用可能な力場プリセットとそのパラメータを一覧表示

get_workflow_report

すべてのツール呼び出しと LLM の推論を含む Markdown レポートを返却/保存

reset_workflow_report

新しい構造のためにセッションログをクリア

set_working_directory

相対パス解決のための作業ディレクトリを変更


力場プリセット

プリセット

溶媒

備考

amber14_implicit

GBn2 陰溶媒

デフォルト。 周期境界ボックス不要。高速。

amber14_explicit

TIP3P-FB 陽溶媒

事前に溶媒和された周期境界ボックスが必要

amber99sb_implicit

OBC2 陰溶媒

古い AMBER、陰溶媒

charmm36_explicit

CHARMM TIP3P 陽溶媒

事前に溶媒和された周期境界ボックスが必要


手動インストール

GPU アクセラレーション版の OpenMM を使用したい場合や、ローカルのチェックアウトを好む場合は、この方法を使用してください。

1. OpenMM のインストール (GPU サポートには conda を推奨)

conda install -c conda-forge openmm pdbfixer

2. クローンと依存関係のインストール

git clone https://github.com/YOUR_USERNAME/biomolecule-modeling-mcp
cd biomolecule-modeling-mcp
uv sync

3. Claude Code への登録

claude mcp add "biomolecule-modeling" --scope user -- \
  /path/to/uv run --directory /path/to/biomolecule-modeling-mcp python main.py

/path/to/uvwhich uv の結果に置き換え、クローンしたリポジトリへの絶対パスを使用してください。

重要: --project ではなく --directory を使用してください。--project は仮想環境を設定しますが、cwd を呼び出し元の場所に残すため、相対的な utils/ インポートが壊れます。

スタンドアロンスクリプト (MCP クライアント不要)

uv run utils/pdb_query.py structure.pdb        # inspect structure
uv run utils/pdb_fix.py input.pdb              # fix structure
uv run utils/openmm_relax.py input.pdb         # minimise structure

セッション例

以下の例は、Claude に与えることができる実際の自然言語プロンプトと、それに応答してサーバーが実行するツール呼び出しのシーケンスを示しています。


ケース 1 — RCSB から PDB をダウンロード、検査、クリーンアップ、緩和

Claude へのプロンプト:

PDB 1UBQ をダウンロードし、構造情報をクエリし、タンパク質部分をクリーンアップして、構造を緩和してください。

Claude の動作:

ステップ 1 — ファイルのダウンロード

Claude は RCSB (https://files.rcsb.org/download/1UBQ.pdb) から 1UBQ.pdb を取得し、ローカルに保存します。

ステップ 2 — 構造の検査

query_pdb_structure(
    pdb_file="1UBQ.pdb",
    notes="Initial inspection before cleaning. Need to identify chain types, "
          "any non-standard residues, and structural gaps."
)
chains:
  A — protein, 76 residues (MET1–GLY76), no numbering gaps, no structural breaks
heterogens: HOH (58 water molecules)
non_standard_residues: []
missing_residues: []

Claude の推論: 単一のタンパク質鎖、欠落なし、非標準残基なし。水分子が存在するため、これらを除去する。リガンドの懸念はないため、直接 fix_pdb_structure に進む。

ステップ 3 — 構造のクリーンアップ

fix_pdb_structure(
    input_pdb="1UBQ.pdb",
    output_pdb="1UBQ_fixed.pdb",
    remove_heterogens=True,      # removes the 58 water molecules
    add_hydrogens=True,
    ph=7.0,
    fix_missing_residues=False,  # no gaps — nothing to fix
    notes="Removing waters, adding hydrogens at pH 7.0. No non-standard residues "
          "or gaps detected so no other fixing steps needed."
)
output_pdb: 1UBQ_fixed.pdb
n_residues: 76
n_atoms: 1231
heterogens_removed: 58
nonstandard_residues: []
missing_atoms_added: 0
hydrogens_added: true

ステップ 4 — 構造の緩和

relax_pdb_structure(
    input_pdb="1UBQ_fixed.pdb",
    output_pdb="1UBQ_relaxed.pdb",
    preset="amber14_implicit",
    run_md=False,
    notes="Minimisation-only run. Structure is clean and small (76 residues); "
          "a full MD run is not needed for clash removal."
)
output_pdb: 1UBQ_relaxed.pdb
preset_used: amber14_implicit
n_atoms: 1231
energy_initial_kJ_mol: -18423.4
energy_final_kJ_mol:   -24817.9

Claude のまとめ: 最小化中にエネルギーが約 6400 kJ/mol 低下しました。これは水素追加後の結晶構造としては典型的です。出力 1UBQ_relaxed.pdb は、後続の MD や粗視化の準備が整いました。


ケース 2 — ローカルのマルチチェーン構造をクリーンアップし、選択した鎖のみを保持

Claude へのプロンプト:

./structures/complex.pdb の PDB 構造をクエリし、鎖 A と鎖 B のみを保持するようにクリーンアップして、構造を緩和してください。

Claude の動作:

ステップ 1 — 構造の検査

query_pdb_structure(
    pdb_file="./structures/complex.pdb",
    notes="Inspecting the multi-chain complex before chain selection and cleaning."
)
chains:
  A — protein, 312 residues (SER5–LEU316), 2 numbering gaps (at 47–51, 203–208)
  B — protein, 289 residues (MET1–LYS289), no gaps
  C — protein, 145 residues (ALA1–GLU145), no gaps
  D — nucleic (DNA), 24 residues
heterogens: MG (3 ions), HOH (412 waters), ATP (1 molecule)
non_standard_residues: [MSE → MET in chain A (4 occurrences)]

Claude の推論: ユーザーは鎖 A と B のみを希望。鎖 A には 2 つの番号の欠落がある。これらは結晶構造における短い無秩序なループである可能性が高いため、ループモデリングは試みない。鎖 A の MSE(セレノメチオニン)は MET に変換される。OpenMM 緩和の前に ATP とイオンを除去する必要がある。

ステップ 2 — 鎖 A と B のみを保持してクリーンアップ

fix_pdb_structure(
    input_pdb="./structures/complex.pdb",
    output_pdb="./structures/complex_AB_fixed.pdb",
    chains_to_keep=["A", "B"],
    replace_nonstandard_residues=True,   # converts MSE → MET
    remove_heterogens=True,              # removes ATP, Mg²⁺, waters
    add_missing_heavy_atoms=True,
    add_hydrogens=True,
    ph=7.0,
    fix_missing_residues=False,          # gaps are 4–5 residues; skipping loop modelling
    notes="Keeping chains A and B only per user request. Converting 4 × MSE → MET "
          "in chain A. Removing ATP, Mg ions, and waters — these cannot be "
          "parameterised with standard AMBER presets. Not fixing the two loops "
          "in chain A (gaps of 4–5 residues) to avoid poor loop geometry."
)
output_pdb: complex_AB_fixed.pdb
n_residues: 601   (312 + 289)
n_atoms: 9847
chains_kept: [A, B]
nonstandard_residues: [MSE→MET ×4 in chain A]
heterogens_removed: 416   (ATP ×1, MG ×3, HOH ×412)
missing_atoms_added: 12
hydrogens_added: true

Claude からユーザーへの警告: 「鎖 A には依然として残基 47–51 および 203–208 に 2 つの短い欠落があります(結晶構造で欠損)。これらの領域は緩和された出力には存在しません。後続のシミュレーションで完全なループが必要な場合はお知らせください。ループモデリングを試みることは可能ですが、このサイズの欠落に対する形状は粗くなる可能性があります。」

ステップ 3 — 2 鎖複合体の緩和

relax_pdb_structure(
    input_pdb="./structures/complex_AB_fixed.pdb",
    output_pdb="./structures/complex_AB_relaxed.pdb",
    preset="amber14_implicit",
    run_md=True,
    restrain_backbone=True,
    restraint_k=1000.0,
    production_steps=25000,
    notes="Running short restrained MD (25 000 steps ≈ 100 ps) to relax side chains "
          "around the 12 newly added heavy atoms and the two gap termini in chain A. "
          "Backbone restrained at 1000 kJ/mol/nm² to preserve experimental fold."
)
output_pdb: complex_AB_relaxed.pdb
preset_used: amber14_implicit
n_atoms: 9847
energy_initial_kJ_mol: -71203.1
energy_post_min_kJ_mol: -89441.6
energy_post_md_kJ_mol:  -94308.2
energy_final_kJ_mol:    -95112.4

Claude のまとめ: エネルギーは最小化 → MD → 最終最小化を通じて着実に減少しました。構造は収束しており、準備完了です。出力: complex_AB_relaxed.pdb


プロジェクト構造

biomolecule-modeling-mcp/
├── main.py                  # MCP server entry point; all @mcp.tool() definitions
├── pyproject.toml           # dependencies + CLI entry point (biomodeling)
├── utils/
│   ├── pdb_query.py         # Structure inspection (BioPython)
│   ├── pdb_fix.py           # PDBFixer wrapper
│   ├── pdb_splitter.py      # Split multi-component PDB by chain type
│   ├── pdb_assemble.py      # Merge PDB files
│   └── openmm_relax.py      # OpenMM energy minimisation + restrained MD
└── data/                    # Example / test PDB files

注意点

  • デフォルトで大きなループを修正しないでください。 fix_missing_residues=False が安全なデフォルトです。5~10 残基を超えるループは、PDBFixer では不適切な形状を生成します。

  • リガンドは標準的な緩和を妨げます。 非標準の HETATM 残基は、AMBER/CHARMM プリセットで OpenMM を実行する前に除去(または個別にパラメータ化)する必要があります。

  • OpenMM >= 8.x の陰溶媒。 陰溶媒 XML(例: implicit/gbn2.xml)は createSystem() ではなく ForceField() に渡します。


ライセンス

MIT

Install Server
F
license - not found
A
quality
D
maintenance

Maintenance

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

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to generate, validate, and optimize PLUMED input files for molecular dynamics simulations, with templates and performance suggestions.
    12
    GPL 3.0
  • A
    license
    Not graded
    quality
    F
    maintenance
    Integrates GROMACS molecular dynamics simulations with VMD visualization, enabling setup, execution, analysis, and 3D visualization of molecular dynamics workflows through natural language.
    21
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI assistants to execute computational chemistry and drug discovery workflows using Schrödinger Suites 2026, including protein preparation, docking, ADMET, QM/MM calculations, and job management.
    28
    MIT

View all related MCP servers

Related MCP Connectors

  • AI-powered bioprotocol optimization — generate, search, and manage lab protocols via MCP

  • Build, validate, and deploy multi-agent AI solutions from any AI environment.

  • Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.

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/huangjianhuster/biomolecule-modeling-mcp'

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