Open Drug Data MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DSLD_API_KEY | No | Optional NIH DSLD key from data.gov. Raises the limit from 1,000 to 10,000 requests per hour. Keyless requests work. | |
| UMLS_API_KEY | No | Required for the UMLS reference source only. A free UTS account API key under the UMLS Metathesaurus license. Without it, other sources work and the UMLS reference source returns a configuration error naming this variable. | |
| NLM_PUBMED_TOOL | No | Optional tool name NCBI asks distributed software to send with PubMed requests. | |
| OPENFDA_API_KEY | No | Optional openFDA key. Raises the upstream rate limit; keyless requests work. | |
| NLM_PUBMED_EMAIL | No | Optional contact address NCBI asks distributed software to send with PubMed requests. | |
| NLM_PUBMED_API_KEY | No | Optional NCBI E-utilities key for PubMed. Raises the rate limit. | |
| DRUGDATA_TIMEOUT_MS | No | Per-request upstream timeout in milliseconds. Must be a positive integer when set; a blank value counts as unset. | 30000 |
| DRUGDATA_DISABLED_SOURCES | No | Comma-separated adapter ids to switch off: openfda, cosing, nlm, drugcentral, dsld, inkeedecoder. nlm covers every NLM namespace and the PubChem adapter. Unknown ids are a configuration error. | |
| DRUGDATA_SEARCH_TIMEOUT_MS | No | Shared wall-clock deadline for search fan-out and enrichment. Returns completed results with source statuses and coverage.positive integer or positive integer; blank means default. Does not change by-source lookup timeouts. | 45000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Open Drug Data is one research interface over openFDA, CosIng, RxNorm/DailyMed, DrugCentral, NIH DSLD, INKEEDecoder, and the NLM reference sources (Prescribable RxNorm, RxClass, MeSH, PubMed, MedlinePlus, UMLS, ClinicalTrials.gov, PubChem). Every record is credited to the upstream database that supplied it and carries a deep link.
The loop is search → resolve → get. Every search and resolve result ends with nextSteps; follow them instead of inventing an identifier.
For free text, start with type 'name'. Use product type 'brand' deliberately for a brand-only search; it reaches fewer sources than 'name'. If a full product name has no matches, retry type 'name' with only the brand (Natrol) or only the ingredient (melatonin); compare brand, variant, strength, and dosage form before selecting a record. Pass product category when known: medication, supplement, or cosmetic. Ingredient search has no category filter. Search returns entities with original records, confirmed links, candidates, conflicts, per-entity nextSteps, source statuses, and coverage; identical names alone never establish identity. For an existing source+id, use drugdata_get_product or drugdata_get_ingredient instead of searching again; pass the returned id unchanged. Open only records needed for the question, with costly flags off unless needed. If tools omit needed page or article content, selectively fetch the supplied URLs with the host's web tools; do not bulk crawl. PubChem CID is supported by ingredient search, get_ingredient(source: pubchem), and resolve_identifiers(cid). Read partial, coverage, and each source's error/timeout status before claiming completeness. Default searches return lightweight evidence without identity resolution; resolve_identities: true opts in to enrichment of at most five entities with concurrency three. Search has a shared 45-second default deadline and retains completed results when that deadline expires. Unresolved candidates and source-attributed conflicts stay explicit; do not choose or conceal them.
Search by what you have. drugdata_search_products accepts a product name, brand, ingredient, barcode, or NDC. drugdata_search_ingredients accepts a name, INCI name, UNII, CAS number, EC number, RxCUI, or PubChem CID. Choose the type that matches the value in hand.
Resolve cross-source identity when the search entity has not already supplied the needed links. Call drugdata_resolve_identifiers with exactly one of unii, ndc, rxcui, cid, cas, inci_name, substance_name, spl_setid, or dsld_id. That runs the identity chain across sources and returns what it could link plus what remains ambiguous.
get the full record from the database that owns it. drugdata_get_product takes source openfda, dsld, dailymed, or inkeedecoder; drugdata_get_ingredient takes source openfda, cosing, drugcentral, nlm, inkeedecoder, or pubchem. Pass the database's own id from the result unchanged. Costly sections are opt-in; turn them on only when the question needs them.
For everything written about a substance, drugdata_search_references searches one NLM reference source at a time — PubMed literature, ClinicalTrials.gov studies, MedlinePlus consumer pages, RxClass drug classes, MeSH descriptors, UMLS terminology, and the prescribable drug dataset. Results are link-first: titles, identifiers, and deep links, not article text. Continue with the returned cursor when hasMore is true.
Identifier vocabulary: NDC is a US drug product or package code; UNII is an FDA ingredient identifier; RxCUI is an RxNorm concept; CAS and EC are chemical registry numbers; INCI is a cosmetic ingredient name; an SPL setid identifies a DailyMed label document; a structId identifies a DrugCentral structure; a CID identifies a PubChem compound; a PMID identifies a PubMed article and an NCT number a ClinicalTrials.gov study. DSLD label ids and source slugs appear alongside them. An identifier one source knows often unlocks records in another, and resolve_identifiers is the bridge.
Confidence: in resolve results, links are trusted matches — direct means the same identifier, derived means a documented crosswalk. candidates are possible matches that need judgment: never silently treat one as confirmed or choose one for the user. When identity matters, prefer a direct link or ask which record is meant.
Pagination: a search takes one page number, applies it to every source in the fan-out, and re-queries all of them; read each source's hasMore rather than assuming a shared page count. Lookups page their own ingredient and label-section collections. Reference searches continue with an opaque cursor instead of a page number. Never walk every page by default — request the next page only when the answer needs it. Responses are character-bounded; when text or whole entities are omitted, the result says so. Coverage counts describe the pre-bound result.
Sourcing etiquette: cite the upstream database and its deep link in your answer, and do not present this server as the source. Regulatory text — annex notices, label sections, indication wording — is verbatim: summarize or quote briefly with attribution rather than republishing it. Zero matches are a normal result, not an error; use drugdata_ping when a source looks unavailable.
Informational/research use only — not medical advice; see docs/SOURCES.md for source terms.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| drugdata_pingA | Check that the server is running and see which data sources this process will use. Reports the server name and version, each source's adapter id and whether it is enabled, and whether its API key is configured (never the key itself). Needs no credentials and no network — use it to verify connectivity before searching. |
| drugdata_search_productsA | Search products across openFDA, DSLD, INKEEDecoder, RxNorm, and DailyMed. Start free text with type 'name'; use 'brand' deliberately for brand-only search, which covers fewer sources. If a full product name has no matches, retry type 'name' with only the brand (Natrol) or only the ingredient (melatonin); compare brand, variant, strength, and dosage form before selecting a record. Use ingredient, barcode, or ndc when appropriate, and pass category medication/supplement/cosmetic when known. Returns evidence-grouped entities with original records, confirmed links, source-attributed conflicts, unconfirmed candidates, and per-entity nextSteps. A product RxCUI or shared name alone does not merge products. For source+id use drugdata_get_product instead. Default searches return lightweight evidence without identity resolution; resolve_identities: true opts in to enrichment of at most five entities, concurrency three, within the shared 45-second default deadline. Read partial, coverage, and sources (status ok/error/timeout); completed results survive a timeout. One page applies to every source and re-queries all of them; each source's hasMore is independent. Selectively fetch supplied URLs only when more page content is needed. No matches is normal, not an error. |
| drugdata_search_ingredientsA | Search ingredients across openFDA, CosIng, DrugCentral, RxNorm, PubChem, and INKEEDecoder. Start free text with type 'name'; use inci, unii, cas, ec, rxcui, or cid when that is the value you have. There is no ingredient category filter. Returns evidence-grouped entities with original records, confirmed links, source-attributed conflicts, unconfirmed candidates, and per-entity nextSteps. For source+id use drugdata_get_ingredient instead. Default searches return lightweight evidence without identity resolution; resolve_identities: true opts in to enrichment of at most five entities, concurrency three, within the shared 45-second default deadline. Read partial, coverage, and sources (status ok/error/timeout); completed results survive a timeout. One page applies to every source and re-queries all of them; each source's hasMore is independent. Selectively fetch supplied URLs only when more page content is needed. No matches is normal, not an error. |
| drugdata_get_productA | Use this for an existing source+id, including an entity record or confirmed link; do not repeat a broad search. Fetch only needed records; selectively fetch supplied URLs with host web tools if more page content is needed. Fetch one product record from openFDA, DSLD, DailyMed, or INKEEDecoder. The |
| drugdata_get_ingredientA | Use this for an existing source+id, including an entity record or confirmed link; do not repeat a broad search. Fetch only needed records; selectively fetch supplied URLs with host web tools if more page content is needed. Fetch one ingredient profile from openFDA, CosIng, DrugCentral, RxNorm, INKEEDecoder, or PubChem. The |
| drugdata_resolve_identifiersA | Resolve one identifier across openFDA, CosIng, RxNorm, DrugCentral, DailyMed, DSLD, INKEEDecoder, and PubChem. Pass exactly one of unii, ndc, rxcui, cid (PubChem compound id), cas, inci_name, substance_name, spl_setid, or dsld_id. Ingredient identifiers return an identity graph of confident cross-source links with labeled candidate sets for ambiguity; product identifiers (ndc, spl_setid, dsld_id) return the product's cross-source links plus its ingredient rows. |
| drugdata_search_referencesA | Search NLM reference sources beyond product and ingredient records: Prescribable RxNorm (the currently prescribable drug dataset), RxClass (drug classes by name or member RxCUI), MeSH (medical subject descriptors), PubMed (biomedical literature), MedlinePlus (consumer-health topic pages), MedlinePlus Genetics (condition and gene pages), MedlinePlus Connect (drug pages by name, RxCUI, or NDC), UMLS (unified medical terminology; needs UMLS_API_KEY), and ClinicalTrials.gov (study registry). One call searches exactly one source — pass |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| research_drug | Research a product or ingredient across openFDA, CosIng, RxNorm/DailyMed, DrugCentral, NIH DSLD, INKEEDecoder, and PubChem: search by name or identifier, resolve identity across sources, and fetch selected records with citations. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| server-info | Server name, version, transport, the enabled upstream databases, and the research-use disclaimer. |
TDQS
Scored across 7 tools
The product vs ingredient tools are clearly separated, and search/get/resolve roles are mostly distinct. There is some overlap around identifiers: an NDC can be used in search_products, get_product, and resolve_identifiers, though the descriptions explain the different purposes. Overall the boundaries are understandable but not perfectly crisp.
All tools share a consistent `drugdata_` prefix and follow a predictable verb-plus-resource pattern such as search_products, get_product, and resolve_identifiers. `ping` is the only non-resource verb, but it is conventional and does not disrupt the pattern.
Seven tools is a well-scoped set for a multi-source drug data server, with separate operations for products, ingredients, identifier resolution, references, and health checking. Each tool has a clear place and no bulk of redundant endpoints.
The surface covers searching and fetching products and ingredients, cross-source identifier resolution, reference search, and server health. Minor gaps exist in that reference results are link-first rather than retrievable records, and some specialized lookups depend on optional parameters, but core workflows are covered.