query

Pack: mychem · Endpoint: https://gateway.pipeworx.io/mychem/mcp

Search MyChem.info for drugs / chemical compounds. Accepts a plain drug name (“aspirin”), an InChIKey, or a fielded query (e.g. “chembl.pref_name:aspirin”, “drugbank.name:Acetylsalicylic acid”). Returns aggregated hits with cross-references to ChEMBL, DrugBank, PubChem, ChEBI, DrugCentral, etc. Use this to resolve a drug name into structured identifiers.

Parameters

NameTypeRequiredDescription
querystringyesDrug name (“aspirin”), an InChIKey, or a fielded query like “chembl.pref_name:aspirin”.
fieldsstringnoComma-separated return fields (default: all). e.g. “chembl.pref_name,drugbank.name,pubchem”.
sizenumbernoMax hits to return, 1-1000 (default 10).

Example call

Arguments

{
  "query": "aspirin"
}

curl

curl -X POST https://gateway.pipeworx.io/mychem/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"query","arguments":{"query":"aspirin"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('query', {
  "query": "aspirin"
});

More examples

{
  "query": "chembl.pref_name:ibuprofen",
  "fields": "chembl.pref_name,drugbank.name,pubchem.cid",
  "size": 5
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "mychem": {
      "url": "https://gateway.pipeworx.io/mychem/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build September 7, 2026