chembl-mcp-server

v0.3.2 pre-1.0

Link compounds to protein targets, rank bioactivity (IC50/Ki/EC50), and look up drug mechanisms and indications over ChEMBL via MCP. STDIO or Streamable HTTP.

chembl.caseyjhand.com/mcp
claude mcp add --transport http chembl-mcp-server https://chembl.caseyjhand.com/mcp
codex mcp add chembl-mcp-server --url https://chembl.caseyjhand.com/mcp
{
  "mcpServers": {
    "chembl-mcp-server": {
      "url": "https://chembl.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http chembl-mcp-server https://chembl.caseyjhand.com/mcp
{
  "mcpServers": {
    "chembl-mcp-server": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://chembl.caseyjhand.com/mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "chembl-mcp-server": {
      "type": "http",
      "url": "https://chembl.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://chembl.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

8

read 7

chembl_search_molecules

open-world

Discovery entry point for compounds. Find by name / ChEMBL ID / InChIKey with the default search_type=name (supply query), or run a structure search with search_type exact | similarity | substructure (supply structure as a SMILES). At least one of query or structure is required, and structure is required for the three structure modes. Returns ChEMBL ID, preferred name, canonical SMILES, formula, MW, AlogP, Lipinski violations, QED, and max clinical phase on every row; only search_type=similarity adds a Tanimoto similarity percent. Chain molecule_chembl_id into chembl_get_bioactivities or chembl_get_drug_info. A capped result carries nextCursor — pass it back as cursor with the same filters to read the next page.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chembl_search_molecules",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "description": "Search text for search_type=name — a drug name, ChEMBL ID, or InChIKey, e.g. \"imatinib\" or \"CHEMBL25\".",
      "type": "string"
    },
    "structure": {
      "description": "SMILES string for structure search, e.g. \"CC(=O)Oc1ccccc1C(=O)O\". Required when search_type is exact/similarity/substructure.",
      "type": "string"
    },
    "search_type": {
      "default": "name",
      "description": "name = text lookup (query); exact = exact structure match; similarity = Tanimoto ≥ threshold; substructure = contains the structure. All structure modes need `structure`.",
      "type": "string",
      "enum": [
        "name",
        "exact",
        "similarity",
        "substructure"
      ]
    },
    "similarity_threshold": {
      "default": 70,
      "description": "Minimum Tanimoto similarity percent for search_type=similarity (40–100; ChEMBL rejects below 40). Ignored for other modes.",
      "type": "integer",
      "minimum": 40,
      "maximum": 100
    },
    "max_phase_min": {
      "description": "For search_type=name, restrict to compounds at or above this max clinical phase (e.g. 4 for marketed drugs only).",
      "type": "integer",
      "minimum": 0,
      "maximum": 4
    },
    "limit": {
      "description": "Maximum molecules to return. Defaults to the server default (25) when omitted.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "cursor": {
      "description": "Opaque continuation token from a previous call's nextCursor — resumes where that page ended. Omit for the first page. Re-send the same query/structure/filters that minted it (only limit may change; it sets this page's size); redeeming it against different filters walks a different result set.",
      "type": "string"
    }
  },
  "required": [
    "search_type",
    "similarity_threshold"
  ],
  "additionalProperties": false
}
view source ↗

chembl_get_bioactivities

open-world

The flagship compound↔target bioactivity bridge: measurements for a molecule (target deconvolution / selectivity), a target (lead finding), or both together (how potently one compound hits one target). Supply at least one of molecule_chembl_id (from chembl_search_molecules) or target_chembl_id (from chembl_search_targets) — supplying both narrows to that compound–target pair, supplying neither is an error. Filter by standard_type (IC50/Ki/EC50/…), minimum potency pchembl_value_min, assay_type, and organism. Not every measurement has a derivable pchembl_value, so potency_view picks which side of that split you get: the default "potency_ranked" returns the measurements that have one, most potent first (ChEMBL sorts the rest first otherwise, which is why they are not merged), and "null_potency" returns exactly the measurements that have none. totalCount is the honest full match count across both views either way. Mixing measurement types (IC50 vs Ki) is a scientific error — set standard_type to compare like with like. A popular target carries tens of thousands of rows: results spill to a DataCanvas table (call chembl_dataframe_describe for its columns, then chembl_dataframe_query for honest aggregates across the staged set), while an inline preview answers the immediate question. Each view stages its own table (bioactivities / bioactivities_null_potency), so running both against one canvas_id lets a UNION ALL rebuild the full set. The staged table is capped at CHEMBL_MAX_SPILL_ROWS; when the cap is hit, truncated is true and the table is a bounded slice, not the complete view. The inline rows are always capped at limit, so compare that against totalCount before treating them as the whole answer. Spilling the rest requires CANVAS_PROVIDER_TYPE=duckdb; without it the inline preview is all there is.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chembl_get_bioactivities",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "molecule_chembl_id": {
      "description": "ChEMBL molecule ID (from chembl_search_molecules), e.g. \"CHEMBL941\". Supply this, target_chembl_id, or both — both narrows to that compound–target pair.",
      "type": "string"
    },
    "target_chembl_id": {
      "description": "ChEMBL target ID (from chembl_search_targets), e.g. \"CHEMBL203\". Supply this, molecule_chembl_id, or both — both narrows to that compound–target pair.",
      "type": "string"
    },
    "standard_type": {
      "description": "Restrict to one measurement type, e.g. \"IC50\", \"Ki\", \"EC50\". Set this to compare potencies validly.",
      "type": "string"
    },
    "pchembl_value_min": {
      "description": "Minimum pchembl_value (−log10 molar potency), e.g. 7 keeps sub-100 nM activities. Only valid on the potency_ranked view — the null_potency rows have no pchembl_value to compare against.",
      "type": "number"
    },
    "potency_view": {
      "default": "potency_ranked",
      "description": "Which side of the pchembl_value presence split to retrieve. \"potency_ranked\" (default) returns the measurements that have a derivable pchembl_value, most potent first. \"null_potency\" returns exactly the measurements that have none — the rows the ranked view excludes, otherwise unreachable. The two partition the match set and stage to separate canvas tables.",
      "type": "string",
      "enum": [
        "potency_ranked",
        "null_potency"
      ]
    },
    "assay_type": {
      "description": "Restrict to an assay type code: \"B\" (binding), \"F\" (functional), \"A\" (ADMET), \"T\" (toxicity).",
      "type": "string"
    },
    "organism": {
      "description": "Restrict to a target organism, e.g. \"Homo sapiens\" (case-insensitive exact match).",
      "type": "string"
    },
    "limit": {
      "description": "Maximum rows in the inline preview. Defaults to the server default (25). The full set still spills to the canvas.",
      "type": "integer",
      "minimum": 1,
      "maximum": 1000
    },
    "canvas_id": {
      "description": "Optional canvas ID from a prior call to reuse the same canvas. Each potency_view re-stages its own table, so a second query of the SAME view REPLACES (overwrites) its prior rows — it does not append — while the other view's table is left intact, which is what lets both coexist on one canvas. Omit to mint a fresh canvas.",
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{10}$"
    }
  },
  "required": [
    "potency_view"
  ],
  "additionalProperties": false
}
view source ↗

chembl_search_targets

open-world

Resolve a protein/gene/UniProt accession to the ChEMBL target ID that chembl_get_bioactivities needs for the target→leads workflow. Supply at least one of accession (UniProt, e.g. P00533), gene_symbol (e.g. EGFR), or query (free-text name); filter further by organism and target_type. Returns each target with its type, organism, and component UniProt accessions + gene symbols. A UniProt accession from the uniprot/protein server is the most precise input. A capped result carries nextCursor — pass it back as cursor with the same filters to read the next page.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chembl_search_targets",
    "arguments": {}
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "description": "Free-text name match against the target preferred name, e.g. \"kinase\" or \"growth factor receptor\".",
      "type": "string"
    },
    "accession": {
      "description": "UniProt accession of a target component, e.g. \"P00533\". The most precise resolver — from the uniprot/protein server.",
      "type": "string"
    },
    "gene_symbol": {
      "description": "Gene symbol of a target component, e.g. \"EGFR\" (case-insensitive exact match).",
      "type": "string"
    },
    "organism": {
      "description": "Restrict to a source organism, e.g. \"Homo sapiens\" (case-insensitive exact match).",
      "type": "string"
    },
    "target_type": {
      "description": "Restrict to a target class, e.g. \"SINGLE PROTEIN\" or \"PROTEIN COMPLEX\".",
      "type": "string"
    },
    "limit": {
      "description": "Maximum targets to return. Defaults to the server default (25) when omitted.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "cursor": {
      "description": "Opaque continuation token from a previous call's nextCursor — resumes where that page ended. Omit for the first page. Re-send the same accession/gene_symbol/query/filters that minted it (only limit may change; it sets this page's size); redeeming it against different filters walks a different result set.",
      "type": "string"
    }
  },
  "additionalProperties": false
}
view source ↗

chembl_get_drug_info

open-world

Pharmacology for a drug (molecule): mechanism(s) of action, the molecular target(s) it acts on, action type (inhibitor / agonist / …), first-approval year, and clinical indications with the max phase reached for each. Supply molecule_chembl_id (from chembl_search_molecules). Distinct from the openfda server's label/adverse-event view — this is the curated mechanism-and-indication record. A mechanism's target_chembl_id chains into chembl_get_bioactivities for compounds hitting the same target. Each list carries its own retrieval state: an empty mechanisms or indications array means the molecule has none recorded only when the matching mechanisms_status / indications_status is "complete" — "failed" means the upstream request was rejected and the array says nothing about the molecule, and "truncated" means the page cap bounded the list at fewer rows than the matching *_total_count.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chembl_get_drug_info",
    "arguments": {
      "molecule_chembl_id": "<molecule_chembl_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "molecule_chembl_id": {
      "type": "string",
      "minLength": 1,
      "description": "ChEMBL molecule ID (from chembl_search_molecules), e.g. \"CHEMBL939\" for gefitinib."
    }
  },
  "required": [
    "molecule_chembl_id"
  ],
  "additionalProperties": false
}
view source ↗

chembl_get_assay

open-world

Assay provenance behind a bioactivity row: description, type (binding / functional / ADMET / toxicity), the target it measures, organism, and ChEMBL's 1–9 confidence score (9 = direct assay on the protein target, lower = homologous or indirect). Supply assay_chembl_id from a chembl_get_bioactivities row. Call this to judge whether two measurements are comparable before ranking them together.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chembl_get_assay",
    "arguments": {
      "assay_chembl_id": "<assay_chembl_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "assay_chembl_id": {
      "type": "string",
      "minLength": 1,
      "description": "ChEMBL assay ID from a bioactivity row's assay_chembl_id, e.g. \"CHEMBL674637\"."
    }
  },
  "required": [
    "assay_chembl_id"
  ],
  "additionalProperties": false
}
view source ↗

chembl_dataframe_query

Run a read-only SQL SELECT over the bioactivity rows chembl_get_bioactivities spilled to a canvas — rank, group, dedupe, and aggregate across the FULL set, not the inline preview. Reference each staged table by the name chembl_get_bioactivities returned — bioactivities for its potency_ranked view, bioactivities_null_potency for null_potency; discover the staged tables and their columns with chembl_dataframe_describe. Compute honest aggregates here (e.g. SELECT molecule_chembl_id, MEDIAN(pchembl_value) AS med FROM bioactivities WHERE standard_type = 'IC50' GROUP BY 1 ORDER BY 2 DESC). Two independent bounds apply, each reported on its own field: truncated is true when the SQL result exceeded the canvas row cap, and rendered_rows says how many of the returned rows the markdown table holds once its character budget is reached (below row_count on a wide or long result). Page past either bound with SQL LIMIT/OFFSET — append e.g. LIMIT 500 OFFSET 500 and re-call; offsets reach rows beyond the canvas row cap. Requires CANVAS_PROVIDER_TYPE=duckdb.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chembl_dataframe_query",
    "arguments": {
      "canvas_id": "<canvas_id>",
      "sql": "<sql>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{10}$",
      "description": "Canvas ID returned by chembl_get_bioactivities (spilled: true)."
    },
    "sql": {
      "type": "string",
      "description": "A read-only SELECT against the staged tables. Reference tables by the names chembl_get_bioactivities returned."
    }
  },
  "required": [
    "canvas_id",
    "sql"
  ],
  "additionalProperties": false
}
view source ↗

chembl_dataframe_describe

List the tables and columns staged on a canvas by chembl_get_bioactivities — inspect before calling chembl_dataframe_query to write correct SQL. Returns each table with its row count, kind (table | view), and column names + types. Requires CANVAS_PROVIDER_TYPE=duckdb.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "chembl_dataframe_describe",
    "arguments": {
      "canvas_id": "<canvas_id>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{10}$",
      "description": "Canvas ID returned by chembl_get_bioactivities (spilled: true)."
    }
  },
  "required": [
    "canvas_id"
  ],
  "additionalProperties": false
}
view source ↗

disabled 1

chembl_dataframe_drop

Drop a named staged table from a canvas to free its memory early. Returns dropped: true if the table existed and was removed, false if it was already gone (TTL or a prior drop). Rarely needed — per-table and per-canvas TTL reclaim staged tables automatically; reach for this only to free a large table early in a long session. Requires CANVAS_PROVIDER_TYPE=duckdb.

disabledwould be destructive

Disabled. Dropping staged canvas tables is turned off in this deployment.

CHEMBL_DATAFRAME_DROP_ENABLED=true
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "canvas_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{10}$",
      "description": "Canvas ID returned by chembl_get_bioactivities."
    },
    "table_name": {
      "type": "string",
      "description": "Name of the staged table to drop, e.g. \"bioactivities\"."
    }
  },
  "required": [
    "canvas_id",
    "table_name"
  ],
  "additionalProperties": false
}
view source ↗

Resources

2

A molecule record by ChEMBL ID — the same shape a chembl_search_molecules row carries (ID, names, structures, properties, max clinical phase). Convenience injectable-context mirror of the per-molecule fetch.

uri chembl://molecule/{chemblId} mime application/json

A target record by ChEMBL target ID — pref_name, type, organism, and component UniProt accessions + gene symbols. Convenience injectable-context mirror of the per-target fetch.

uri chembl://target/{chemblId} mime application/json