@cyanheads/chembl-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@cyanheads/chembl-mcp-serverShow me bioactivities for molecule CHEMBL25"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Public Hosted Server: https://chembl.caseyjhand.com/mcp
Tools
Eight tools — five for the ChEMBL compound/target/bioactivity surface, plus three for SQL analytics over the DuckDB-backed canvas that chembl_get_bioactivities spills to (the third is opt-in):
Tool | Description |
| Find compounds by name / ChEMBL ID / InChIKey, or run a structure search (exact | similarity | substructure) from a SMILES. |
| The flagship compound↔target bridge: bioactivity measurements for a molecule, a target, or both (the compound×target pair), ranked on |
| Resolve a protein / gene symbol / UniProt accession to the ChEMBL target ID |
| Drug pharmacology — mechanism(s) of action, molecular target(s), action type, first-approval year, and clinical indications. |
| Assay provenance behind a bioactivity row — type, target, organism, and ChEMBL's 1–9 confidence score. |
| Run a read-only SQL |
| List the tables and columns staged on a canvas, so you can write correct SQL before querying. |
| Drop a named staged table from a canvas. Opt-in via |
chembl_search_molecules
The discovery entry point for compounds.
Default
search_type=namematches drug names, synonyms, ChEMBL IDs, and InChIKeys in one queryA
querythat is exactly a ChEMBL ID or an InChIKey is routed to ChEMBL's single-record lookup rather than the fuzzy text index, so it returnstotalCount: 1instead of a full-text relevance count. Addingmax_phase_minreturns the query to the text index, since that filter belongs to the search endpointStructure search via
search_type:exact(exact match),similarity(Tanimoto ≥ threshold), orsubstructure(contains the query structure) — supplystructureas a SMILESsimilarity_thresholdis an integer 40–100 (default 70; ChEMBL rejects values below 40)max_phase_minrestricts name searches to compounds at or above a max clinical phase (e.g.4for marketed drugs only)Every row carries
max_phase— the cheap druggability signal (4 = marketed, 0 = research) — plus MW, AlogP, Lipinski rule-of-five violations, and QED. Onlysearch_type=similaritycarries a Tanimotosimilaritypercent;exactandsubstructureresults omit the field entirely, because ChEMBL supplies a score for similarity search aloneResults past
limitare reachable: when more remain, the response carries anextCursor, and passing it back ascursorreturns the following page. It is omitted — not null — on the last page. Redeem a cursor with the same filters that minted itChain
molecule_chembl_idintochembl_get_bioactivitiesorchembl_get_drug_info
chembl_get_bioactivities
The flagship tool and the reason the server exists — the curated compound↔target↔assay link.
Supply at least one of
molecule_chembl_id(target deconvolution / selectivity) ortarget_chembl_id(lead finding); supplying both narrows to that compound–target pair — "how potently does this compound hit this target, and in which assays?" — while neither is amissing_filtererrorFilter by
standard_type(IC50 / Ki / EC50 / …), minimum potencypchembl_value_min,assay_type, andorganism; rows are ranked onpchembl_value(−log10 molar potency)Ranking trap:
pchembl_valueis comparable only within onestandard_type— set the filter, because mixing IC50 and Ki is a scientific errorCoverage trap: many measurements have no derivable
pchembl_value(non-standard types, censored relations) and are absent from the ranked view — aspirinCHEMBL25has 4,087 measurements but only 158 with apchembl_value.potency_viewpicks the side you get:potency_ranked(default) ornull_potencyfor exactly the excluded rows.totalCountspans both either way. The two are separate calls, not one merged stream, because ChEMBL sorts null-potency rows first under a descending potency sortNumerics are coerced from upstream JSON strings to
number | nullat the service boundary — a missing potency reads asnull, never0A popular target carries tens of thousands of measurements: when the set exceeds the inline preview it spills to a DataCanvas table — call
chembl_dataframe_describefor its columns, thenchembl_dataframe_queryfor honest aggregates across the staged set — while the inline preview answers the immediate question. Each view stages its own table (bioactivities/bioactivities_null_potency), so running both against onecanvas_idlets aUNION ALLrebuild the full setThe staged table is capped at
CHEMBL_MAX_SPILL_ROWS(default 50,000), which also bounds the upstream page walk behind it. When the cap is hit,truncated: trueandstaged_row_countsay so on both response surfaces — the table is a bounded slice, not the complete view; narrow withstandard_type/pchembl_value_minto fitThe inline rows are always capped at
limit(default 25) — spilled, fit inline, or canvas off — so compare that count againsttotalCountbefore treating them as the whole answer. Spilling the rest requiresCANVAS_PROVIDER_TYPE=duckdb; without it the inline preview is all there isThe optional
canvas_idreuses an existing canvas, but a view's table is always re-registered — a second query of the same view replaces its prior rows rather than appending; omitcanvas_idto mint a fresh one
chembl_search_targets
Resolve a protein into the ChEMBL target ID downstream tools need.
Supply at least one of
accession(UniProt, e.g.P00533),gene_symbol(e.g.EGFR), orquery(free-text name); narrow further withorganismandtarget_typeA UniProt accession is the most precise input — chain it from a
uniprot/proteinserverEach row carries the target type, organism, and component UniProt accessions + gene symbols (flattened from ChEMBL's nested component synonyms)
Results past
limitare reachable the same waychembl_search_moleculesdoes it — anextCursorwhen more remain, passed back ascursor, omitted on the last pageChain
target_chembl_idintochembl_get_bioactivities
chembl_get_drug_info
Drug pharmacology for a molecule — distinct from the openfda server's label / adverse-event view.
Supply
molecule_chembl_id(fromchembl_search_molecules)Returns mechanism(s) of action, the molecular target(s), action type (inhibitor / agonist / …), first-approval year, and clinical indications with the max phase reached for each
Composed from molecule + mechanisms + indications with
Promise.allSettled, so a rejected mechanism or indication list degrades to a disclosed partial result rather than failing the callEach list carries its own retrieval state —
mechanisms_status/indications_status(complete/truncated/failed) next tomechanisms_total_count/indications_total_count, so an empty array is authoritative only when the status iscompleteA mechanism's
target_chembl_idchains intochembl_get_bioactivitiesfor compounds hitting the same target
chembl_get_assay
Assay provenance behind a bioactivity row — call it to judge whether two measurements are comparable before ranking them together.
Supply
assay_chembl_idfrom achembl_get_bioactivitiesrowReturns the description, assay 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)
chembl_dataframe_query / chembl_dataframe_describe / chembl_dataframe_drop
In-conversation SQL analytics over the bioactivity tables that chembl_get_bioactivities spills to a DuckDB-backed canvas. When a query spills, the tool returns a canvas_id and the table_name it staged; pass the canvas ID to chembl_dataframe_query for ranking, grouping, deduplication, and aggregation across the full set — standard DuckDB SQL.
Read-only.
chembl_dataframe_queryaccepts a singleSELECT; writes, DDL, and non-SELECT statements are rejected by the framework SQL gate. Reference each staged table by the namechembl_get_bioactivitiesreturned (bioactivitiesfor thepotency_rankedview,bioactivities_null_potencyfornull_potency), and discover its columns withchembl_dataframe_describefirst.Each spilled table holds the full
Activityrow — the same 18 columns including the normalizedstandard_*/pchembl_valuefields (rank on these) and the raw upstreamtype/value/units/relation(audit only). Compute aggregates here, never over the inline preview.Two independent bounds, both disclosed.
truncatedmeans the canvas engine's own query-result cap was hit.rendered_rowsreports how many rows the markdown table incontent[]actually carried — that table is bounded by a character budget rather than a row count, so wide and narrow rows differ several-fold at the same byte cost. Either bound can trip without the other.structuredContent.rowsalways carries the full materialized result; to reach rows past either bound, page with SQLLIMIT/OFFSET.chembl_dataframe_dropis the only destructive tool and is opt-in (CHEMBL_DATAFRAME_DROP_ENABLED=true) — absent fromtools/listwhen off, because per-table and per-canvas TTL already reclaim staged tables. It still appears in the server manifest and landing page while off, carrying the flag needed to enable it. Reach for it only to free a large table early in a long session.All three require
CANVAS_PROVIDER_TYPE=duckdb; without it they return acanvas_disablederror andchembl_get_bioactivitiesdegrades to a preview-only response.
Related MCP server: mcp-chembl
Resources and prompts
Type | Name | Description |
Resource |
| A molecule record by ChEMBL ID — the same shape a |
Resource |
| A target record by ChEMBL target ID — preferred name, type, organism, and component UniProt accessions + gene symbols. |
All resource data is also reachable via the tools, so tool-only MCP clients lose nothing — the resources are convenience injectable-context mirrors of the per-record fetch. {chemblId} is validated against the CHEMBL\d+ pattern. There are no prompts; the canonical workflows are short tool chains an agent composes directly, and the cross-server chain guidance ships as server-level instructions instead.
Features
Built on @cyanheads/mcp-ts-core:
Declarative tool and resource definitions — single file per primitive, framework handles registration and validation
Unified error handling — handlers throw, framework catches, classifies, and formats
Typed error contracts with recovery hints (
missing_filter,missing_input,canvas_disabled)Pluggable auth (
none,jwt,oauth) and swappable storage backendsStructured logging with optional OpenTelemetry tracing
STDIO and Streamable HTTP transports
ChEMBL-specific:
Single keyless upstream client for the ChEMBL REST data API — Django-style filtered URL builder,
page_metapagination,withRetry-wrapped fetch + parseString →
number | nullnumeric coercion at the service boundary (a missing potency becomesnull, never0— the scientific-data fidelity rule)Bidirectional bioactivity: one tool serves both compound→target and target→compound, ranked on
pchembl_valueStructure search (exact / similarity / substructure) consolidated under one discovery tool via a
search_typeenumDataCanvas spill on the flagship: tens-of-thousands-of-row activity sets stream to a DuckDB table you inspect with
chembl_dataframe_describeand query viachembl_dataframe_queryServer-level
instructionscarry the cross-server chain guidance and the ChEMBL CC BY-SA 3.0 attribution
Agent-friendly output:
Provenance on every response — total-found counts, applied-filter echo, and a spill notice so agents know whether the preview is the full set or a slice of a canvas table
Truncation disclosure — capped search results report
shown/cap/totalCountso a page is never mistaken for the complete setTyped, recoverable errors —
missing_filter/missing_input/canvas_disabledcarry recovery hints, so callers correct the call without parsing proseNever fabricates — normalization and
format()preservenullpotency / units; a missing measurement renders as "not reported", never0
Getting started
Public Hosted Instance
A public instance is available at https://chembl.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"chembl-mcp-server": {
"type": "streamable-http",
"url": "https://chembl.caseyjhand.com/mcp"
}
}
}Self-Hosted / Local
ChEMBL is keyless — no API key or account is required.
Add the following to your MCP client configuration file:
{
"mcpServers": {
"chembl-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/chembl-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"chembl-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/chembl-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"chembl-mcp-server": {
"type": "stdio",
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/chembl-mcp-server:latest"]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpTo unlock the analytical SQL path (the bioactivities spill and the chembl_dataframe_* tools), add "CANVAS_PROVIDER_TYPE": "duckdb" to the env.
Prerequisites
Bun v1.3.0 or higher (or Node.js v24+).
Optional: set
CANVAS_PROVIDER_TYPE=duckdbto enable the DataCanvas SQL path for large bioactivity sets.
Installation
Clone the repository:
git clone https://github.com/cyanheads/chembl-mcp-server.gitNavigate into the directory:
cd chembl-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# edit .env to override any defaults (all optional)Configuration
All configuration is validated at startup via Zod schemas in src/config/server-config.ts. ChEMBL is keyless, so every variable is optional.
Variable | Description | Default |
| Set to |
|
| Base URL for the ChEMBL REST data API. Override for a private mirror or pinned host. |
|
| Per-request timeout in milliseconds for upstream ChEMBL fetches. |
|
| ChEMBL per-page cap when streaming activity pages for the spill (max 1000). |
|
| Default result limit applied when callers omit it. |
|
| Ceiling on rows |
|
| Register the opt-in |
|
| Transport: |
|
| Port for the HTTP server. |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Enable OpenTelemetry instrumentation. |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security, changelog sync bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t chembl-mcp-server .
docker run --rm -e MCP_TRANSPORT_TYPE=stdio chembl-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/chembl-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them. The fully-resolved @duckdb native binary is copied from the build stage so CANVAS_PROVIDER_TYPE=duckdb works at runtime.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions ( |
| The single ChEMBL upstream client — URL builder, pagination, numeric coercion, nested-structure flattening, activity page stream. |
| Module-level holder for the optional |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools and resources in the
createApp()arraysWrap the ChEMBL API: validate raw → normalize to the flat domain type → return the output schema; never fabricate missing fields (absent numerics become
null, never0)
Contributing
Issues and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be installed
Maintenance
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
- FlicenseBqualityDmaintenanceA comprehensive Model Context Protocol (MCP) server providing advanced access to the ChEMBL chemical database.2789
- AlicenseNot gradedqualityCmaintenanceEnables querying ChEMBL drug discovery database for molecules, targets, activities, and drug indications. Part of Pipeworx MCP gateway.15MIT
- FlicenseNot gradedqualityDmaintenanceA FastMCP wrapper server that provides API access to the ChEMBL database, enabling users to query drug discovery data such as activities, assays, targets, and molecules.2
- AlicenseNot gradedqualityDmaintenanceProvides chemical informatics endpoints for converting between chemical names and SMILES, processing molecule structures, and comparing molecules, with MCP compatibility.4MIT
Related MCP Connectors
ChEMBL MCP — drug discovery database (EBI).
Open Targets MCP — disease/target/drug knowledge graph.
PubChem MCP — NIH chemistry compound database (no auth)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/cyanheads/chembl-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server