Example 1.1 — Look up a compound by name (imatinib)¶

A reproducible record of an AI-assisted BindingDB analysis: each prompt, the BindingDB tool calls that answered it with their recorded results, the answer, and its figures. Run all cells to show the recorded results, or rerun every call on your own copy of the database and check each result against the recorded one.

  • Date: 2026-11-23
  • Model: claude-opus-5-5
  • Data: BindingDB release 202611 (BDB-mySQL_All_202611_dmp.zip, SHA-256 daea9260d404919a183ce02d91bf4b9c49b410bea7eaaeba105c8e0280510381)
  • Database build: 2026-11-21T01:08:15+00:00, DuckDB 1.5.6
  • Derived data: standard InChIKeys computed from SMILES by RDKit 2026.03.6; compound_property computed from SMILES (largest fragment) by RDKit 2026.03.6
  • Server: mcp-bindingdb v0.1.17, commit 79dae5d22c0f
  • Software: python 3.12.7, duckdb 1.5.6, rdkit 2026.03.6, mcp 2.3.0, gemmi 0.7.5
  • Notebook generated: 2026-11-24T04:55:00Z
  • Contents: 1 exchange · 4 tool calls

How to run¶

Keep the notebook in its folder, which holds everything it needs: requirements.txt (mcp-bindingdb at its commit and the versions of the packages it needs) and the recorded results in data/. With uv, from that folder (replace the path with yours):

cd /path/to/1.1-compound-by-name-notebook
uv run --no-project --with-requirements requirements.txt --with jupyterlab jupyter lab 1.1-compound-by-name-notebook.ipynb

then choose Run → Run All Cells. The first start installs the packages, which takes a minute or two; the cells show the recorded results, so no database is needed. Without uv: pip install -r requirements.txt jupyterlab, then jupyter lab 1.1-compound-by-name-notebook.ipynb in the folder.

How to rerun the calls¶

To rerun every BindingDB call on your own copy of release 202611 and check each result against the recorded one, set RERUN = True in the setup cell and run all cells, or rerun the notebook without opening Jupyter, writing a copy with the new results:

cd /path/to/1.1-compound-by-name-notebook
BINDINGDB_RERUN=1 uv run --no-project --with-requirements requirements.txt --with nbconvert jupyter nbconvert --to notebook --execute --output 1.1-compound-by-name-notebook-rerun.ipynb 1.1-compound-by-name-notebook.ipynb

A rerun needs the database: the one BINDINGDB_DUCKDB=/path/to/bindingdb_202611.duckdb names (put it before uv run), else the newest one mcp-bindingdb built on this computer, for example for Claude Desktop. With neither, the first rerun builds one, which takes about half an hour and 2.4 GB. To build exactly release 202611, with a clone of mcp-bindingdb:

git clone https://github.com/sbl-sdsc/mcp-bindingdb.git
cd mcp-bindingdb
git checkout 79dae5d22c0f15b8ded9b49adc8b105f0463703a
scripts/build_duckdb.sh --release 202611

The setup cell checks the database's release and source checksum against the recorded ones.

Run as it is, each call cell shows its recorded result, read from data/ and checked against the SHA-256 digest recorded in the cell. Rerun, it shows the new result with ✅ when it matches the recorded one (floats to 10 significant digits, ids of viewers and files left out). Calls to PubChem, RCSB or PDBe depend on those services and may differ. The prose answers are the model's and are not recomputed.

In [ ]:
# Shows the results recorded during the session (data/), so the notebook runs without a database. Set
# RERUN = True (or start Jupyter with BINDINGDB_RERUN=1) to rerun every BindingDB call on a local copy of
# the database instead and check it against its recorded result: see 'How to rerun the calls' above.
from mcp_bindingdb.notebook import Replay

RERUN = False
replay = Replay(release='202611', source_zip_sha256='daea9260d404919a183ce02d91bf4b9c49b410bea7eaaeba105c8e0280510381', rerun=RERUN)
Recorded with BindingDB release 202611, mcp-bindingdb v0.1.17 (commit 79dae5d22c0f)
python 3.12.7, duckdb 1.5.6, rdkit 2026.03.6, mcp 2.3.0, gemmi 0.7.5

Exchange 1¶

👤 User

What does BindingDB know about imatinib?

In [ ]:
Call 1 · search_compounds · ran 2026-11-24 04:54:59 UTC (3 lines)
# Call 1 · search_compounds · ran 2026-11-24 04:54:59 UTC
await replay.call(1, 'search_compounds', {'query': 'imatinib'},
                  sha256='1f2a50bf819de48009ec8144d0b21eef4aca07d81ee80cd8718d9c5f2d42211d')

Call 1 · search_compounds · recorded result · sha256 1f2a50bf819d…

3 rows

monomerid bdbm_id name inchi_key smiles mol_weight n_activities n_targets matched_name
13530 BDBM13530 Gleevec KTUFNOKKBVMGRW-UHFFFAOYSA-N CN1CCN(Cc2ccc(cc2)C(=O)Nc2ccc(C)c(Nc3nccc(n3)-c3cccnc3)c2)CC1 493.26 1156 459 Imatinib
31341 BDBM31341 IMATINIB KTUFNOKKBVMGRW-UHFFFAOYSA-N Cc1ccc(cc1Nc2nccc(n2)c3cccnc3)NC(=O)c4ccc(cc4)CN5CCN(CC5)C 0 0 IMATINIB
50434581 BDBM50434581 imatinib-CD3 KTUFNOKKBVMGRW-BMSJAHLVSA-N [2H]C([2H])([2H])N5CCN(Cc4ccc(C(=O)Nc3ccc(C)c(Nc2nccc(c1cccnc1)n2)c3)cc4)CC5 496.58 2 2 imatinib-CD3
In [ ]:
Call 2 · get_compound · ran 2026-11-24 04:55:00 UTC (3 lines)
# Call 2 · get_compound · ran 2026-11-24 04:55:00 UTC
await replay.call(2, 'get_compound', {'monomerid': 13530},
                  sha256='1fb7788c17f88a1c747d2878b057fe40de8b095e2bb102bb6f3c6863fc12f468')

Call 2 · get_compound · recorded result · sha256 1fb7788c17f8…

name smiles
Gleevec CN1CCN(Cc2ccc(cc2)C(=O)Nc2ccc(C)c(Nc3nccc(n3)-c3cccnc3)c2)CC1
{
  "compound": {
    "monomerid": 13530,
    "bdbm_id": "BDBM13530",
    "name": "Gleevec",
    "inchi_key": "KTUFNOKKBVMGRW-UHFFFAOYSA-N",
    "smiles": "CN1CCN(Cc2ccc(cc2)C(=O)Nc2ccc(C)c(Nc3nccc(n3)-c3cccnc3)c2)CC1",
    "formula": "C29H31N7O",
    "mol_weight": 493.26,
    "type": "Small organic molecule",
    "het_pdb": "",
    "n_pdb_ids_exact": 0,
    "n_activities": 1156,
    "n_targets": 459,
    "inchi": "InChI=1S/C29H31N7O/c1-21-5-10-25(18-27(21)34-29-31-13-11-26(33-29)24-4-3-12-30-19-24)32-28(37)23-8-6-22(7-9-23)20-36-16-14-35(2)15-17-36/h3-13,18-19H,14-17,20H2,1-2H3,(H,32,37)(H,31,33,34)",
    "pdb_ids_exact": "",
    "pdb_ids_sub": null
  },
  "synonyms": [
    "STI571",
    "Gleevec",
    "STI-571",
    "Imatinib",
    "cid_5291",
    "CHEMBL941",
    "Imatinib, 21",
    "US9255107, Imatinib",
    "med.21724, Compound 6",
    "US10906896, Cpd imatinib",
    "US11649218, Example Imatinib",
    "US11725005, Compound imatinib",
    "US20250129067, Compound Imatinib",
    "4-[(4-methylpiperazin-1-yl)methyl]-N-[4-methyl-3-[(4-pyridin-3-ylpyrimidin-2-yl)amino]phenyl]benzamide",
    "N-(4-methyl-3-{[4-(pyridin-3-yl)pyrimidin-2-yl]amino}phenyl)-4-[(4-methylpiperazin-1-yl)methyl]benzamide"
  ],
  "properties": {
    "heavy_atoms": 37,
    "mw": 493.62,
    "clogp": 4.59,
    "tpsa": 86.28,
    "hbd": 2,
    "hba": 8,
    "rotatable_bonds": 7,
    "rings": 5,
    "aromatic_rings": 4,
    "fsp3": 0.241,
    "qed": 0.389,
    "ro5_violations": 0,
    "scaffold": "O=C(Nc1cccc(Nc2nccc(-c3cccnc3)n2)c1)c1ccc(CN2CCNCC2)cc1",
    "generic_scaffold": "CC(CC1CCCC(CC2CCCC(C3CCCCC3)C2)C1)C1CCC(CC2CCCCC2)CC1",
    "pains": [],
    "brenk": [],
    "nih": []
  }
}

top_targets: 25 rows

polymerid complexid target_name uniprot_raw organism n_measurements best_p_affinity affinity_types best_ligand_efficiency
188 Receptor tyrosine-protein kinase erbB-2 P04626 Homo sapiens 3 10.22 IC50, Kd 0.38
520 Epidermal growth factor receptor P00533 Homo sapiens 25 9.96 IC50, Kd 0.37
3993 Epithelial discoidin domain-containing receptor 1 Q08345 Homo sapiens 9 9.15 IC50, Kd 0.34
5221 Tyrosine-protein kinase ABL1 P00519 Homo sapiens 85 9 EC50, IC50, Kd, Ki 0.33
261 Breakpoint cluster region protein/Tyrosine-protein kinase ABL1 43 8.96 EC50, IC50, Ki 0.33
7838 Tyrosine-protein kinase ABL1 [229-512] P00519[229-512] Homo sapiens 2 8.82 Kd 0.33
5778 Platelet-derived growth factor receptor alpha P16234 Homo sapiens 17 8.7 EC50, IC50, Kd, Ki 0.32
1385 Tyrosine-protein kinase ABL1 [201-500] P00519[201-500] Homo sapiens 1 8.7 Kd 0.32
575 Platelet-derived growth factor receptor beta P09619 Homo sapiens 10 8.52 IC50, Kd, Ki 0.32
1394 Mast/stem cell growth factor receptor Kit [N822K] P10721[N822K] Homo sapiens 1 8.52 Kd 0.32
50001306 Tyrosine-protein kinase ABL2 P42684 Homo sapiens 10 8 IC50, Kd 0.3
879 Macrophage colony-stimulating factor 1 receptor P07333 Homo sapiens 7 8 IC50, Kd 0.3
1389 Tyrosine-protein kinase ABL1 [201-500,M351T] P00519[201-500,M351T] Homo sapiens 1 8 Kd 0.3
50001750 Tyrosine-protein kinase ABL1 P00520 Mus musculus 3 7.97 IC50 0.3
359 Mast/stem cell growth factor receptor Kit P10721 Homo sapiens 52 7.89 EC50, IC50, Kd, Ki 0.29
5709 Discoidin domain-containing receptor 2 Q16832 Homo sapiens 5 7.82 IC50, Kd 0.29
3995 Discoidin domain-containing receptor 2 [A642S] Q16832[A642S] Homo sapiens 1 7.82 Kd 0.29
1386 Tyrosine-protein kinase ABL1 [201-500,Q252H] P00519[201-500,Q252H] Homo sapiens 1 7.7 Kd 0.29
1390 Tyrosine-protein kinase ABL1 [201-500,F359V] P00519[201-500,F359V] Homo sapiens 1 7.7 Kd 0.29
1395 Mast/stem cell growth factor receptor Kit [V559D] P10721[V559D] Homo sapiens 1 7.7 Kd 0.29
4453 Tyrosine-protein kinase ABL1 [1-999,Q252H] P00519[1-999,Q252H] Homo sapiens 3 7.57 IC50, Kd 0.28
1193 Carbonic anhydrase 2 P00918 Homo sapiens 1 7.52 Ki 0.28
1192 Carbonic anhydrase 1 P00915 Homo sapiens 1 7.5 Ki 0.28
50001198 Breakpoint cluster region protein Q6PAJ1 Mus musculus 1 7.42 IC50 0.27
5286 Ribosyldihydronicotinamide dehydrogenase [quinone] P16083 Homo sapiens 4 7.41 IC50, Ki 0.27
In [ ]:
Call 3 · run_sql · ran 2026-11-24 04:55:00 UTC (17 lines)
# Call 3 · run_sql · ran 2026-11-24 04:55:00 UTC
sql = """
    -- Imatinib (BDBM13530): median vs best pAffinity per target, for its clinical targets and the top 'best value' targets
    SELECT target_name, uniprot_raw, count(*) AS n,
           sum(CASE WHEN relation = '>' THEN 1 ELSE 0 END) AS n_censored,
           round(median(p_affinity), 2) AS median_p,
           round(max(p_affinity), 2) AS best_p
    FROM activity
    WHERE monomerid = 13530
      AND uniprot_raw IN ('P00519', 'P10721', 'P16234', 'P04626', 'P00533', 'Q08345')
      AND affinity_type IN ('Ki', 'Kd', 'IC50', 'EC50')
    GROUP BY target_name, uniprot_raw
    ORDER BY median_p DESC, uniprot_raw
    
"""
await replay.call(3, 'run_sql', {'sql': sql},
                  sha256='9753fde3a8de8252c11ebdacfc250518da4d723e757b5c5465ecbf0315d44cdd')

Call 3 · run_sql · recorded result · sha256 9753fde3a8de…

6 rows

target_name uniprot_raw n n_censored median_p best_p
Platelet-derived growth factor receptor alpha P16234 17 0 7.51 8.7
Epithelial discoidin domain-containing receptor 1 Q08345 9 0 7.37 9.15
Mast/stem cell growth factor receptor Kit P10721 52 0 7 7.89
Tyrosine-protein kinase ABL1 P00519 85 7 6.77 9
Epidermal growth factor receptor P00533 25 21 5 9.96
Receptor tyrosine-protein kinase erbB-2 P04626 3 2 5 10.22
In [ ]:
Call 4 · run_sql · ran 2026-11-24 04:55:00 UTC (12 lines)
# Call 4 · run_sql · ran 2026-11-24 04:55:00 UTC
sql = """
    -- Imatinib's EGFR and ERBB2 measurements by relation and value
    SELECT uniprot_raw, affinity_type, relation, value, count(*) AS n
    FROM activity
    WHERE monomerid = 13530 AND uniprot_raw IN ('P00533', 'P04626')
    GROUP BY ALL
    ORDER BY uniprot_raw, affinity_type, relation, value
    
"""
await replay.call(4, 'run_sql', {'sql': sql},
                  sha256='f937fa6e020a4d16abaf771decf19caa9ac43a894dbf846298041ade901d0a75')

Call 4 · run_sql · recorded result · sha256 f937fa6e020a…

6 rows

uniprot_raw affinity_type relation value n
P00533 IC50 = 0.11 1
P00533 IC50 > 100000 1
P00533 Kd = 7600 3
P00533 Kd > 10000 20
P04626 IC50 = 0.06 1
P04626 Kd > 10000 2

🧠 Assistant

Imatinib (Gleevec, STI-571) is in BindingDB as BDBM13530, with 1,156 measurements against 459 targets. It is one of the most heavily profiled drugs in the database.

Field Value
BindingDB id BDBM13530
Other names Gleevec, STI571, STI-571, CHEMBL941, PubChem cid_5291
Formula / MW C29H31N7O / 493.26
InChIKey KTUFNOKKBVMGRW-UHFFFAOYSA-N
SMILES CN1CCN(Cc2ccc(cc2)C(=O)Nc2ccc(C)c(Nc3nccc(n3)-c3cccnc3)c2)CC1

The name search also returned two other records built on the same skeleton: BDBM31341 (an "IMATINIB" entry with no measurements attached) and BDBM50434581 (imatinib-CD3, a deuterated version with 2 measurements). A single drug can appear under several BindingDB ids, so check the measurement counts and use the id that carries the data (Example 1.2 shows a fourth record that the name search misses).

Main targets. These are the known clinical targets of imatinib. The table shows the median across all measurements for each human target, next to the single best value:

Target UniProt Measurements Median pAffinity Best pAffinity
PDGFR-alpha P16234 17 7.5 (~30 nM) 8.7
KIT P10721 52 7.0 (~100 nM) 7.9
ABL1 P00519 85 (7 censored) 6.8 (~170 nM) 9.0

DDR1 (Q08345), a known secondary target of imatinib, is also well supported: 9 measurements, median 7.4 (~40 nM), best 9.2.

(pAffinity = -log10 of the affinity in molar units, so 9 = 1 nM, 7 = 100 nM, 5 = 10 µM.)

A lesson about "best" values. The compound summary ranks targets by their single most potent measurement. On that ranking imatinib's top two targets are ERBB2 (best pAffinity 10.2) and EGFR (9.96), which is misleading:

Target Measurements Censored ("> value") Median pAffinity Best value
EGFR (P00533) 25 21 (20 Kd > 10 µM, 1 IC50 > 100 µM) 5.0 one IC50 of 0.11 nM
ERBB2 (P04626) 3 2 (Kd > 10 µM) 5.0 one IC50 of 0.06 nM

For EGFR the three exact Kd values are all 7.6 µM; the sub-nanomolar IC50 is a single outlier against 24 measurements that say imatinib barely binds. When you judge how strongly a compound binds a target, look at the median and the number of measurements, not only the best value.

How this was answered

  • search_compounds with the query "imatinib": finds compounds by name, synonym or identifier. Exact name matches rank first.
  • get_compound with id 13530: returns identifiers, synonyms and a per-target summary of the most potent measurements.
  • run_sql: computes the median affinity per target from the activity table, which holds one row per measurement, and lists the EGFR and ERBB2 values by relation:
SELECT target_name, uniprot_raw, count(*) AS n,
       sum(CASE WHEN relation = '>' THEN 1 ELSE 0 END) AS n_censored,
       round(median(p_affinity), 2) AS median_p,
       round(max(p_affinity), 2) AS best_p
FROM activity
WHERE monomerid = 13530
  AND uniprot_raw IN ('P00519', 'P10721', 'P16234', 'P04626', 'P00533', 'Q08345')
  AND affinity_type IN ('Ki', 'Kd', 'IC50', 'EC50')
GROUP BY target_name, uniprot_raw
ORDER BY median_p DESC, uniprot_raw

Try next

  • "Which targets does imatinib bind below 100 nM?" (Example 3.2)
  • "Look up CHEMBL941" — the same compound found by an identifier instead of a name (Example 1.2)

Verification¶

How each rerun call compared with its recorded result.

In [ ]:
replay.summary()

Recorded: 4 tool calls. Run all cells to compare.

How to cite¶

Cite this notebook (for example deposited with a DOI) together with the data and software it ran on:

  • Data: BindingDB release 202611, https://www.bindingdb.org/rwd/bind/BDB-mySQL_All_202611_dmp.zip (SHA-256 daea9260d404919a183ce02d91bf4b9c49b410bea7eaaeba105c8e0280510381)
  • Software: mcp-bindingdb v0.1.17, commit 79dae5d22c0f15b8ded9b49adc8b105f0463703a, https://github.com/sbl-sdsc/mcp-bindingdb
  • Analysis: Example 1.1 — Look up a compound by name (imatinib), 2026-11-23, with claude-opus-5-5
  • BindingDB: Liu T, Hwang L, Burley SK, Nitsche CI, Southan C, Walters WP, Gilson MK. BindingDB in 2024: a FAIR knowledgebase of protein-small molecule binding data. Nucleic Acids Research 53(D1):D1633-D1644, 2025. https://doi.org/10.1093/nar/gkae1075

As BibTeX, for this server, BindingDB and RDKit (used for structure search, properties and drawings):

@software{rose2026mcp-bindingdb,
  title={MCP BindingDB Server},
  author={Rose, P.W.},
  year={2026},
  url={https://github.com/sbl-sdsc/mcp-bindingdb}
}

@article{liu2025bindingdb,
  title={BindingDB in 2024: a FAIR knowledgebase of protein-small molecule binding data},
  author={Liu, T. and Hwang, L. and Burley, S.K. and Nitsche, C.I. and Southan, C. and Walters, W.P. and Gilson, M.K.},
  journal={Nucleic Acids Research},
  volume={53},
  number={D1},
  pages={D1633--D1644},
  year={2025},
  doi={10.1093/nar/gkae1075}
}

@software{rdkit,
  title={RDKit: Open-source cheminformatics},
  author={Landrum, G. and others},
  version={2026.03.6},
  url={https://www.rdkit.org},
  doi={10.5281/zenodo.591637}
}