Example 9.2 — A reproducible record with every tool call¶
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-256daea9260d404919a183ce02d91bf4b9c49b410bea7eaaeba105c8e0280510381) - 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:56:36Z
- Contents: 1 exchange · 7 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/9.2-reproducible-record-notebook
uv run --no-project --with-requirements requirements.txt --with jupyterlab jupyter lab 9.2-reproducible-record-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 9.2-reproducible-record-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/9.2-reproducible-record-notebook
BINDINGDB_RERUN=1 uv run --no-project --with-requirements requirements.txt --with nbconvert jupyter nbconvert --to notebook --execute --output 9.2-reproducible-record-notebook-rerun.ipynb 9.2-reproducible-record-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.
# 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
How selective are palbociclib, ribociclib and abemaciclib for CDK4/6 over the other CDKs? Make an HTML transcript that includes every query and its results, so a colleague can rerun the analysis.
Call 1 · search_compounds · ran 2026-11-24 04:56:36 UTC (3 lines)
# Call 1 · search_compounds · ran 2026-11-24 04:56:36 UTC
await replay.call(1, 'search_compounds', {'query': 'ribociclib', 'limit': 3},
sha256='4623f04184398135aadb1f1caf41e3526c3e2e6e1ba8f1a56df9ba0dbd974bec')
Call 1 · search_compounds · recorded result · sha256 4623f0418439…
1 row
| monomerid | bdbm_id | name | inchi_key | smiles | mol_weight | n_activities | n_targets | matched_name |
|---|---|---|---|---|---|---|---|---|
| 148264 | BDBM148264 | Kisqali | RHXHGRAEPCAFML-UHFFFAOYSA-N | CN(C)C(=O)c1cc2cnc(nc2n1C3CCCC3)Nc4ccc(cn4)N5CCNCC5 | 434.25 | 59 | 15 | Ribociclib |
Call 2 · search_compounds · ran 2026-11-24 04:56:36 UTC (3 lines)
# Call 2 · search_compounds · ran 2026-11-24 04:56:36 UTC
await replay.call(2, 'search_compounds', {'query': 'abemaciclib', 'limit': 3},
sha256='8437a73c603d83cb1ef536e0ea7932b75a7e2ea94d151396e9e8fbf0a89a5394')
Call 2 · search_compounds · recorded result · sha256 8437a73c603d…
1 row
| monomerid | bdbm_id | name | inchi_key | smiles | mol_weight | n_activities | n_targets | matched_name |
|---|---|---|---|---|---|---|---|---|
| 50110183 | BDBM50110183 | Abemaciclib | UZWDCWONPYILKI-UHFFFAOYSA-N | CCN1CCN(Cc2ccc(Nc3ncc(F)c(n3)-c3cc(F)c4nc(C)n(C(C)C)c4c3)nc2)CC1 | 506.27 | 227 | 63 | Abemaciclib |
Call 3 · search_compounds · ran 2026-11-24 04:56:36 UTC (3 lines)
# Call 3 · search_compounds · ran 2026-11-24 04:56:36 UTC
await replay.call(3, 'search_compounds', {'query': 'palbociclib', 'limit': 3},
sha256='e22ca3add3f0e288080446ed788795ddc1bdf7426d9ff1d18d650105ae24ca8a')
Call 3 · search_compounds · recorded result · sha256 e22ca3add3f0…
1 row
| monomerid | bdbm_id | name | inchi_key | smiles | mol_weight | n_activities | n_targets | matched_name |
|---|---|---|---|---|---|---|---|---|
| 6309 | BDBM6309 | Ibrance | AHJRHEGDXFFMBM-UHFFFAOYSA-N | CC1=C(C(=O)N(c2c1cnc(n2)Nc3ccc(cn3)N4CCNCC4)C5CCCC5)C(=O)C | 447.24 | 154 | 39 | Palbociclib |
Call 4 · run_sql · ran 2026-11-24 04:56:36 UTC (7 lines)
# Call 4 · run_sql · ran 2026-11-24 04:56:36 UTC
sql = """
SELECT target_name, count(*) n, count(DISTINCT monomerid) nd FROM activity WHERE monomerid IN (6309, 148264, 50110183) AND (target_name ILIKE '%cyclin%' OR target_name ILIKE '%CDK%' OR target_name ILIKE '%kinase%') GROUP BY ALL ORDER BY target_name
"""
await replay.call(4, 'run_sql', {'sql': sql},
sha256='87c01be03a34cdca944f707d11e0bd861bf759982632afd81401c0da933495ef')
Call 4 · run_sql · recorded result · sha256 87c01be03a34…
68 rows
| target_name | n | nd |
|---|---|---|
| Aurora kinase A | 2 | 1 |
| Aurora kinase B | 2 | 1 |
| CDK-activating kinase assembly factor MAT1/Cyclin-H/Cyclin-dependent kinase 7 | 6 | 3 |
| CDK1/Cyclin E | 1 | 1 |
| CDK6/cyclin D1 | 24 | 3 |
| Calcium/calmodulin-dependent protein kinase type 1 | 1 | 1 |
| Calcium/calmodulin-dependent protein kinase type II subunit beta | 2 | 2 |
| Calcium/calmodulin-dependent protein kinase type II subunit delta | 2 | 2 |
| Calcium/calmodulin-dependent protein kinase type II subunit gamma | 2 | 2 |
| Casein kinase I isoform epsilon | 1 | 1 |
| Casein kinase II subunit alpha | 1 | 1 |
| Cyclin-A2 [177-432]/Cyclin-dependent kinase 2 | 1 | 1 |
| Cyclin-A2/Cyclin-dependent kinase 1 | 1 | 1 |
| Cyclin-A2/Cyclin-dependent kinase 2 | 19 | 3 |
| Cyclin-H/Cyclin-dependent kinase 7 | 4 | 2 |
| Cyclin-K | 2 | 2 |
| Cyclin-T1/Cyclin-dependent kinase 9 | 17 | 3 |
| Cyclin-dependent kinase 1 | 11 | 3 |
| Cyclin-dependent kinase 1/G1/S-specific cyclin-D3 | 4 | 1 |
| Cyclin-dependent kinase 1/G2/mitotic-specific cyclin-B | 1 | 1 |
| Cyclin-dependent kinase 12 | 1 | 1 |
| Cyclin-dependent kinase 2 | 13 | 3 |
| Cyclin-dependent kinase 2/G1/S-specific cyclin-E1 | 20 | 3 |
| Cyclin-dependent kinase 4 | 41 | 3 |
| Cyclin-dependent kinase 4/6 | 4 | 1 |
| Cyclin-dependent kinase 4/G1/S-specific cyclin-D1 | 47 | 3 |
| Cyclin-dependent kinase 4/G1/S-specific cyclin-D1 [L188C] | 1 | 1 |
| Cyclin-dependent kinase 4/G1/S-specific cyclin-D3 | 18 | 3 |
| Cyclin-dependent kinase 4/G1/S-specific cyclin-E1 | 2 | 1 |
| Cyclin-dependent kinase 5 | 6 | 2 |
| Cyclin-dependent kinase 5 activator 1 | 10 | 3 |
| Cyclin-dependent kinase 6 | 36 | 3 |
| Cyclin-dependent kinase 6/G1/S-specific cyclin-D1/D2/D3 | 3 | 3 |
| Cyclin-dependent kinase 6/G1/S-specific cyclin-D3 | 26 | 3 |
| Cyclin-dependent kinase 7 | 4 | 2 |
| Cyclin-dependent kinase 9 | 7 | 2 |
| Cyclin-dependent kinase/G1/S-specific cyclin- 2 | 4 | 1 |
| Cyclin-dependent kinase/G2/mitotic-specific cyclin- 1 | 17 | 3 |
| Dual specificity protein kinase CLK1 | 3 | 1 |
| Dual specificity protein kinase CLK2 | 1 | 1 |
| Dual specificity protein kinase CLK3 | 1 | 1 |
| Dual specificity protein kinase CLK4 | 1 | 1 |
| Dual specificity tyrosine-phosphorylation-regulated kinase 1A | 4 | 1 |
| Dual specificity tyrosine-phosphorylation-regulated kinase 1B | 2 | 1 |
| Dual specificity tyrosine-phosphorylation-regulated kinase 2 | 3 | 1 |
| Dual specificity tyrosine-phosphorylation-regulated kinase 3 | 1 | 1 |
| Dual specificity tyrosine-phosphorylation-regulated kinase 4 | 1 | 1 |
| G1/S-specific cyclin-D2 | 4 | 1 |
| Glycogen synthase kinase-3 beta | 6 | 2 |
| Homeodomain-interacting protein kinase 1 | 1 | 1 |
| Homeodomain-interacting protein kinase 2 | 2 | 1 |
| Mitogen-activated protein kinase 10 | 2 | 1 |
| Mitogen-activated protein kinase 3 | 2 | 1 |
| NUAK family SNF1-like kinase 1 | 1 | 1 |
| Phosphatidylinositol 4,5-bisphosphate 3-kinase catalytic subunit delta isoform | 1 | 1 |
| Phosphatidylinositol 5-phosphate 4-kinase type-2 alpha | 1 | 1 |
| Proto-oncogene tyrosine-protein kinase ROS | 2 | 1 |
| RAC-alpha serine/threonine-protein kinase | 2 | 1 |
| RAF proto-oncogene serine/threonine-protein kinase | 2 | 1 |
| Receptor-type tyrosine-protein kinase FLT3 | 6 | 2 |
| Serine/threonine-protein kinase 17A | 2 | 1 |
| Serine/threonine-protein kinase B-raf | 2 | 1 |
| Serine/threonine-protein kinase PLK1 | 2 | 1 |
| Serine/threonine-protein kinase PLK3 | 2 | 1 |
| Serine/threonine-protein kinase pim-1 | 5 | 1 |
| Serine/threonine-protein kinase pim-2 | 2 | 1 |
| Tyrosine-protein kinase ABL1 | 1 | 1 |
| Tyrosine-protein kinase JAK3 | 1 | 1 |
Call 5 · run_sql · ran 2026-11-24 04:56:36 UTC (6 lines)
# Call 5 · run_sql · ran 2026-11-24 04:56:36 UTC
arguments = {
'sql': "-- How selective are the three approved CDK4/6 drugs within the CDK family?\n-- BindingDB names CDK records many ways ('Cyclin-dependent kinase 6', 'CDK6/cyclin D1',\n-- 'Cyclin-A2/Cyclin-dependent kinase 2', 'Cyclin-dependent kinase/G2/mitotic-specific cyclin- 1', ...),\n-- so the CDK is taken from the target's protein chains instead of its name: a chain counts as CDK<n>\n-- when one of its BindingDB names is exactly 'CDK<n>'. Plain kinases and CDK/cyclin complexes are pooled;\n-- records with two different CDKs (the mixed 'Cyclin-dependent kinase 4/6') and mutant records ('[...]')\n-- are skipped; exact values only; median pAffinity per drug and CDK.\nWITH chain AS ( -- every protein chain of each target: the polymer itself, or a complex's components\n SELECT polymerid AS chain_id, polymerid, NULL::BIGINT AS complexid FROM polymer\n UNION ALL\n SELECT polymerid, NULL, complexid FROM complex_component WHERE polymerid IS NOT NULL\n),\ncdk_chain AS ( -- chains that are a CDK, with its number\n SELECT DISTINCT polymerid AS chain_id, regexp_extract(name, '^CDK(\\d+)$', 1) AS cdk\n FROM poly_name WHERE regexp_matches(name, '^CDK\\d+$')\n),\ntarget_cdk AS ( -- each target with its single CDK\n SELECT c.polymerid, c.complexid, min(k.cdk) AS cdk\n FROM chain c JOIN cdk_chain k USING (chain_id)\n GROUP BY c.polymerid, c.complexid\n HAVING count(DISTINCT k.cdk) = 1\n),\nm AS (\n SELECT CASE a.monomerid WHEN 6309 THEN 'Palbociclib' WHEN 148264 THEN 'Ribociclib' ELSE 'Abemaciclib' END AS drug,\n t.cdk, a.p_affinity\n FROM activity a\n JOIN target_cdk t ON (a.polymerid = t.polymerid OR a.complexid = t.complexid)\n WHERE a.monomerid IN (6309, 148264, 50110183) -- palbociclib, ribociclib, abemaciclib\n AND a.affinity_type IN ('Ki', 'Kd', 'IC50')\n AND a.relation = '='\n AND a.target_name NOT LIKE '%[%'\n)\nSELECT drug, 'CDK' || cdk AS kinase, count(*) AS n,\n round(median(p_affinity), 2) AS median_p,\n round(1e9 * power(10, -median(p_affinity))) AS median_nM\nFROM m\nGROUP BY ALL\nHAVING count(*) >= 2\nORDER BY drug, median_p DESC, kinase",
}
await replay.call(5, 'run_sql', arguments,
sha256='2b8808041da518007e9bb2124fff08ddfc585e806f9af15b6b634f701c9759e6')
Call 5 · run_sql · recorded result · sha256 2b8808041da5…
15 rows
| drug | kinase | n | median_p | median_nM |
|---|---|---|---|---|
| Abemaciclib | CDK4 | 39 | 8.7 | 2 |
| Abemaciclib | CDK6 | 38 | 8.07 | 9 |
| Abemaciclib | CDK9 | 12 | 7.24 | 58 |
| Abemaciclib | CDK5 | 11 | 6.54 | 288 |
| Abemaciclib | CDK2 | 21 | 6.5 | 316 |
| Abemaciclib | CDK1 | 17 | 6.43 | 372 |
| Abemaciclib | CDK7 | 9 | 5.68 | 2089 |
| Palbociclib | CDK4 | 46 | 7.96 | 11 |
| Palbociclib | CDK6 | 34 | 7.81 | 15 |
| Palbociclib | CDK9 | 6 | 6.07 | 841 |
| Palbociclib | CDK2 | 14 | 5.05 | 8913 |
| Ribociclib | CDK4 | 22 | 8 | 10 |
| Ribociclib | CDK6 | 16 | 7.41 | 39 |
| Ribociclib | CDK9 | 4 | 6.71 | 195 |
| Ribociclib | CDK2 | 2 | 4.12 | 75858 |
Call 6 · run_sql · ran 2026-11-24 04:56:36 UTC (6 lines)
# Call 6 · run_sql · ran 2026-11-24 04:56:36 UTC
arguments = {
'sql': "-- Which target records were counted as each CDK, with exact and censored ('>') values per drug\n-- (same CDK assignment as the selectivity query)\n-- BindingDB names CDK records many ways ('Cyclin-dependent kinase 6', 'CDK6/cyclin D1',\n-- 'Cyclin-A2/Cyclin-dependent kinase 2', 'Cyclin-dependent kinase/G2/mitotic-specific cyclin- 1', ...),\n-- so the CDK is taken from the target's protein chains instead of its name: a chain counts as CDK<n>\n-- when one of its BindingDB names is exactly 'CDK<n>'. Plain kinases and CDK/cyclin complexes are pooled;\n-- records with two different CDKs (the mixed 'Cyclin-dependent kinase 4/6') and mutant records ('[...]')\n-- are skipped; exact values only; median pAffinity per drug and CDK.\nWITH chain AS ( -- every protein chain of each target: the polymer itself, or a complex's components\n SELECT polymerid AS chain_id, polymerid, NULL::BIGINT AS complexid FROM polymer\n UNION ALL\n SELECT polymerid, NULL, complexid FROM complex_component WHERE polymerid IS NOT NULL\n),\ncdk_chain AS ( -- chains that are a CDK, with its number\n SELECT DISTINCT polymerid AS chain_id, regexp_extract(name, '^CDK(\\d+)$', 1) AS cdk\n FROM poly_name WHERE regexp_matches(name, '^CDK\\d+$')\n),\ntarget_cdk AS ( -- each target with its single CDK\n SELECT c.polymerid, c.complexid, min(k.cdk) AS cdk\n FROM chain c JOIN cdk_chain k USING (chain_id)\n GROUP BY c.polymerid, c.complexid\n HAVING count(DISTINCT k.cdk) = 1\n),\nm AS (\n SELECT CASE a.monomerid WHEN 6309 THEN 'Palbociclib' WHEN 148264 THEN 'Ribociclib' ELSE 'Abemaciclib' END AS drug,\n t.cdk, a.target_name, a.relation\n FROM activity a\n JOIN target_cdk t ON (a.polymerid = t.polymerid OR a.complexid = t.complexid)\n WHERE a.monomerid IN (6309, 148264, 50110183)\n AND a.affinity_type IN ('Ki', 'Kd', 'IC50')\n AND a.target_name NOT LIKE '%[%'\n)\nSELECT 'CDK' || cdk AS kinase, target_name,\n count(*) FILTER (WHERE drug = 'Palbociclib' AND relation = '=') AS palbo_exact,\n count(*) FILTER (WHERE drug = 'Palbociclib' AND relation <> '=') AS palbo_censored,\n count(*) FILTER (WHERE drug = 'Ribociclib' AND relation = '=') AS ribo_exact,\n count(*) FILTER (WHERE drug = 'Ribociclib' AND relation <> '=') AS ribo_censored,\n count(*) FILTER (WHERE drug = 'Abemaciclib' AND relation = '=') AS abema_exact,\n count(*) FILTER (WHERE drug = 'Abemaciclib' AND relation <> '=') AS abema_censored\nFROM m\nGROUP BY cdk, target_name\nORDER BY cast(cdk AS INTEGER), target_name",
}
await replay.call(6, 'run_sql', arguments,
sha256='142c2994be0fb3aa6a0d7f0141ec0712e053e65e1571c859901595042739e256')
Call 6 · run_sql · recorded result · sha256 142c2994be0f…
25 rows
| kinase | target_name | palbo_exact | palbo_censored | ribo_exact | ribo_censored | abema_exact | abema_censored |
|---|---|---|---|---|---|---|---|
| CDK1 | CDK1/Cyclin E | 0 | 1 | 0 | 0 | 0 | 0 |
| CDK1 | Cyclin-A2/Cyclin-dependent kinase 1 | 0 | 0 | 0 | 0 | 1 | 0 |
| CDK1 | Cyclin-dependent kinase 1 | 0 | 2 | 1 | 3 | 3 | 2 |
| CDK1 | Cyclin-dependent kinase 1/G1/S-specific cyclin-D3 | 0 | 0 | 0 | 0 | 4 | 0 |
| CDK1 | Cyclin-dependent kinase/G2/mitotic-specific cyclin- 1 | 1 | 5 | 0 | 2 | 9 | 0 |
| CDK2 | Cyclin-A2/Cyclin-dependent kinase 2 | 5 | 6 | 1 | 1 | 6 | 0 |
| CDK2 | Cyclin-dependent kinase 2 | 1 | 2 | 1 | 3 | 4 | 2 |
| CDK2 | Cyclin-dependent kinase 2/G1/S-specific cyclin-E1 | 8 | 2 | 0 | 3 | 7 | 0 |
| CDK2 | Cyclin-dependent kinase/G1/S-specific cyclin- 2 | 0 | 0 | 0 | 0 | 4 | 0 |
| CDK4 | Cyclin-dependent kinase 4 | 15 | 1 | 11 | 0 | 14 | 0 |
| CDK4 | Cyclin-dependent kinase 4/G1/S-specific cyclin-D1 | 25 | 0 | 8 | 0 | 14 | 0 |
| CDK4 | Cyclin-dependent kinase 4/G1/S-specific cyclin-D3 | 6 | 0 | 3 | 0 | 9 | 0 |
| CDK4 | Cyclin-dependent kinase 4/G1/S-specific cyclin-E1 | 0 | 0 | 0 | 0 | 2 | 0 |
| CDK5 | Cyclin-dependent kinase 5 | 0 | 2 | 0 | 0 | 4 | 0 |
| CDK5 | Cyclin-dependent kinase 5 activator 1 | 0 | 2 | 0 | 1 | 7 | 0 |
| CDK6 | CDK6/cyclin D1 | 12 | 0 | 2 | 0 | 10 | 0 |
| CDK6 | Cyclin-dependent kinase 6 | 11 | 1 | 9 | 0 | 15 | 0 |
| CDK6 | Cyclin-dependent kinase 6/G1/S-specific cyclin-D1/D2/D3 | 1 | 0 | 1 | 0 | 1 | 0 |
| CDK6 | Cyclin-dependent kinase 6/G1/S-specific cyclin-D3 | 10 | 0 | 4 | 0 | 12 | 0 |
| CDK7 | CDK-activating kinase assembly factor MAT1/Cyclin-H/Cyclin-dependent kinase 7 | 0 | 1 | 0 | 1 | 4 | 0 |
| CDK7 | Cyclin-H/Cyclin-dependent kinase 7 | 0 | 2 | 0 | 0 | 2 | 0 |
| CDK7 | Cyclin-dependent kinase 7 | 0 | 1 | 0 | 0 | 3 | 0 |
| CDK9 | Cyclin-T1/Cyclin-dependent kinase 9 | 4 | 1 | 4 | 0 | 8 | 0 |
| CDK9 | Cyclin-dependent kinase 9 | 2 | 1 | 0 | 0 | 4 | 0 |
| CDK12 | Cyclin-dependent kinase 12 | 0 | 1 | 0 | 0 | 0 | 0 |
Call 7 · run_sql · ran 2026-11-24 04:56:36 UTC (6 lines)
# Call 7 · run_sql · ran 2026-11-24 04:56:36 UTC
arguments = {
'sql': "WITH m AS (\n SELECT c.name AS drug,\n coalesce(nullif(regexp_extract(a.target_name, '(?i)cyclin-dependent kinase (\\d+)', 1), ''),\n nullif(regexp_extract(a.target_name, '^CDK(\\d+)', 1), '')) AS cdk,\n a.p_affinity\n FROM activity a JOIN compound c USING (monomerid)\n WHERE a.monomerid IN (6309, 148264, 50110183)\n AND a.relation = '='\n AND (a.target_name ILIKE '%cyclin-dependent kinase %' OR a.target_name LIKE 'CDK%')\n AND a.target_name NOT LIKE '%[%'\n)\nSELECT drug, 'CDK' || cdk AS kinase, count(*) AS n,\n round(median(p_affinity), 2) AS median_p,\n round(1e9 * power(10, -median(p_affinity))) AS median_nM\nFROM m\nWHERE cdk IS NOT NULL\nGROUP BY ALL\nHAVING count(*) >= 2\nORDER BY drug, median_p DESC",
}
await replay.call(7, 'run_sql', arguments,
sha256='a4b43e207b85d02870a1f7aed80edea7e50a7af193fa2ae843992952fc1b1ef4')
Call 7 · run_sql · recorded result · sha256 a4b43e207b85…
15 rows
| drug | kinase | n | median_p | median_nM |
|---|---|---|---|---|
| Abemaciclib | CDK4 | 43 | 8.7 | 2 |
| Abemaciclib | CDK6 | 38 | 8.07 | 9 |
| Abemaciclib | CDK1 | 9 | 7.25 | 56 |
| Abemaciclib | CDK9 | 12 | 7.24 | 58 |
| Abemaciclib | CDK5 | 11 | 6.54 | 288 |
| Abemaciclib | CDK2 | 17 | 6.51 | 309 |
| Abemaciclib | CDK7 | 9 | 5.68 | 2089 |
| Ibrance | CDK4 | 46 | 7.96 | 11 |
| Ibrance | CDK6 | 34 | 7.81 | 15 |
| Ibrance | CDK9 | 6 | 6.07 | 841 |
| Ibrance | CDK2 | 14 | 5.05 | 8913 |
| Kisqali | CDK4 | 22 | 8 | 10 |
| Kisqali | CDK6 | 16 | 7.41 | 39 |
| Kisqali | CDK9 | 4 | 6.71 | 195 |
| Kisqali | CDK2 | 2 | 4.12 | 75858 |
🧠 Assistant
All three drugs prefer CDK4 and CDK6, but abemaciclib is clearly the least selective within the CDK family:
| Drug | CDK4 | CDK6 | CDK9 | CDK1 | CDK2 | CDK4 vs CDK2 |
|---|---|---|---|---|---|---|
| Palbociclib | 11 nM (n=46) | 15 nM (n=34) | 841 nM (n=6) | inactive (1 exact, 8 "> value") | 8.9 µM (n=14) | ~800× |
| Ribociclib | 10 nM (n=22) | 39 nM (n=16) | 195 nM (n=4) | inactive (1 exact, 5 "> value") | 76 µM (n=2) | ~7,600× |
| Abemaciclib | 2 nM (n=39) | 9 nM (n=38) | 58 nM (n=12) | 372 nM (n=17) | 316 nM (n=21) | ~160× |
(Medians of exact Ki, Kd and IC50 values; "inactive" means fewer than 2 exact values, with most measurements reported only as "> value". Abemaciclib was also measured on CDK5, 288 nM (n=11), and CDK7, 2.1 µM (n=9); palbociclib and ribociclib have only "> value" results on CDK5 and CDK7.)
Abemaciclib binds CDK9 only about 30-fold more weakly than CDK4, and CDK1 and CDK2 about 160- to 190-fold more weakly. Palbociclib and ribociclib keep a window of roughly three orders of magnitude over CDK2 and CDK9 (palbociclib ~75× over CDK9), and are essentially inactive on CDK1, CDK5 and CDK7. Ribociclib's CDK2 value rests on just two exact measurements (7 more are "> value"), so its 7,600× window is the least certain number in the table. Because "> value" results are left out of the medians, the medians for the weak targets are if anything too potent: palbociclib also has 10 censored results on CDK2 besides its 14 exact ones.
The lesson: a reproducible record shows the choices, not just the answer. The tool calls below contain the exact SQL, so a reader can see every decision behind the table:
- Which records count as "CDK1", "CDK2", ... BindingDB names CDK targets in many ways: "Cyclin-dependent kinase 6/G1/S-specific cyclin-D3", "CDK6/cyclin D1", "Cyclin-A2/Cyclin-dependent kinase 2", and even "Cyclin-dependent kinase/G2/mitotic-specific cyclin- 1", which is the CDK1/cyclin B1 complex. A pattern on the target name misses that last record, which holds 9 of abemaciclib's 17 exact CDK1 values, and would count the mixed record "Cyclin-dependent kinase 4/6" as CDK4. So the query takes the CDK from the target's protein chains instead: a chain counts as CDKn when one of its BindingDB names is exactly "CDKn", and records with two different CDKs are skipped. The second query lists every record assigned to each CDK, with exact and censored counts per drug, so the assignment can be checked line by line.
- Pooling. Plain kinases and CDK/cyclin complexes are pooled, and mutant records (names with "[...]") are excluded.
- Which values. Only exact ('=') Ki, Kd and IC50 values are used; EC50 values (often cell-based) are left out. Censored values such as "> 10 µM" are excluded (see Example 8.4).
A colleague who disagrees with any of these choices can change one line of SQL and rerun it. A results table on its own does not allow that. The choices matter here: the CDK1 column for abemaciclib (372 nM from 17 values) would read 56 nM from 9 values with a name pattern that misses the CDK1/cyclin B1 record.
How this was answered
search_compoundsfor ribociclib, abemaciclib and palbociclib to get their BindingDB ids (BDBM148264, BDBM50110183 and BDBM6309).run_sql: listed the kinase target names measured for the three drugs, to see how BindingDB names the CDK records.run_sql: median pAffinity per drug and CDK, as described above.run_sql: the target records counted as each CDK, with exact and censored counts per drug.run_sql: the same medians with a name pattern on the target name instead (CDK number taken from "cyclin-dependent kinase n" or "CDKn", all exact values), for comparison: it gives abemaciclib 56 nM on CDK1 (n=9) and pools 43 values as CDK4.create_transcriptwithinclude_tool_calls=true, listing only the calls that belong to this analysis. The server logs every BindingDB call it runs, with its arguments and full result.
How to make your own reproducible record. Ask for it in plain words: "include the tool calls", "with the queries and results", or "a reproducible record". It is cleanest to start the analysis with a fresh log ("reset the tool log first"). Otherwise the assistant picks your calls out of the shared log by index. Exploratory calls (here, two lookups of the components of the oddly named complexes) are left out, so the record shows the path to the answer, not every detour.
Try next
- Edit the SQL in the record (for example, include Kd only) and rerun it with
run_sql. - Example 5.2 compares kinase selectivity across the whole kinome as a heat map.
Verification¶
How each rerun call compared with its recorded result.
replay.summary()
Recorded: 7 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 9.2 — A reproducible record with every tool call, 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}
}