query
Pack: mychem · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/query for the schema, then POST the same URL with its arguments for the data.
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
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Drug name (“aspirin”), an InChIKey, or a fielded query like “chembl.pref_name:aspirin”. |
fields | string | no | Comma-separated return fields (default: all). e.g. “chembl.pref_name,drugbank.name,pubchem”. |
size | number | no | Max 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 — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the mychem pack
{
"mcpServers": {
"mychem": {
"url": "https://gateway.pipeworx.io/mychem/mcp"
}
}
}
See Getting Started for client-specific install steps.