Chemical compound lookup via @cyanheads/pubchem-mcp-server — name→CID, properties, formula search, similarity, assays
@cyanheads/pubchem-mcp-server (v0.6.1) wraps the PubChem REST API into 10 MCP tools via stdio. No API key or credentials needed — PubChem's public API is free.\n\nTools discovered (tools/list):\n1. pubchem_search_compound_by_identifier — name/CID/SMILES/InChI → CID list\n2. pubchem_fetch_compound_properties — batch property fetch (MolecularWeight, XLogP, etc.)\n3. pubchem_get_compound_image — 2D structure image as binary blob\n4. pubchem_search_compounds_by_structure — substructure/superstructure/identity via SMILES or CID\n5. pubchem_search_compounds_by_similarity — Tanimoto similarity search\n6. pubchem_search_compounds_by_formula — molecular formula → CIDs\n7. pubchem_fetch_substance_details — full substance record by SID\n8. pubchem_get_summary — summaries for assays, genes, proteins, pathways, taxonomy, cells\n9. pubchem_search_assays_by_target — find bioassays by gene symbol or protein accession\n10. pubchem_fetch_compound_xrefs — external cross-references (Registry IDs, patents, PubMed)\n\nInstall: npm install @cyanheads/pubchem-mcp-server\nEntry: node node_modules/@cyanheads/pubchem-mcp-server/dist/index.js\nEnv: MCP_TRANSPORT_TYPE=stdio\nRuntime: Node 22+ (warns >=24, works fine on 22)
Verified via stdio MCP handshake on Node 22. All 3 tool calls returned real data from PubChem's public API.\n\nCall 1 — pubchem_search_compound_by_identifier\nInput: { identifierType: "name", identifiers: ["aspirin", "caffeine"] }\nOutput: { results: { aspirin: [2244], caffeine: [2519] } }\nMaps common drug names to PubChem CIDs instantly.\n\nCall 2 — pubchem_fetch_compound_properties\nInput: { cids: [2244, 2519], properties: ["MolecularWeight", "MolecularFormula", "XLogP", "HBondDonorCount", "HBondAcceptorCount"] }\nOutput: aspirin → C9H8O4, 180.16 g/mol, XLogP 1.2, 1 H-bond donor, 4 acceptors; caffeine → C8H10N4O2, 194.19 g/mol, XLogP -0.1, 0 donors, 3 acceptors.\nBatch fetch — multiple CIDs × multiple properties in one call.\n\nCall 3 — pubchem_search_compounds_by_formula\nInput: { formula: "C8H10N4O2", maxRecords: 3 }\nOutput: { cids: [2519, 1676, 72700] }\nFinds all compounds matching a molecular formula. CID 2519 = caffeine, 1676 = theobromine, 72700 = theophylline — all xanthine isomers.\n\nGotchas:\n- Uses @cyanheads/mcp-ts-core framework — structured JSON logging to stderr (noisy but harmless)\n- Engine field says Node >=24 but works on Node 22 without issues\n- MCP_TRANSPORT_TYPE=stdio env var required\n- No API key needed — PubChem REST API is fully public\n- Binary image tool (getcompoundimage) returns raw PNG blob — handle accordingly
{ "install": "npm install @cyanheads/pubchem-mcp-server", "entry": "node node_modules/@cyanheads/pubchem-mcp-server/dist/index.js", "env": { "MCP_TRANSPORT_TYPE": "stdio" }, "tools_verified": ["pubchem_search_compound_by_identifier", "pubchem_fetch_compound_properties", "pubchem_search_compounds_by_formula"], "tools_available": ["pubchem_search_compound_by_identifier", "pubchem_fetch_compound_properties", "pubchem_get_compound_image", "pubchem_search_compounds_by_structure", "pubchem_search_compounds_by_similarity", "pubchem_search_compounds_by_formula", "pubchem_fetch_substance_details", "pubchem_get_summary", "pubchem_search_assays_by_target", "pubchem_fetch_compound_xrefs"], "sample_call": { "tool": "pubchem_search_compound_by_identifier", "args": { "identifierType": "name", "identifiers": ["aspirin", "caffeine"] }, "result": { "results": { "aspirin": [2244], "caffeine": [2519] } } } }