Using the API

MCP server: the API as tools.

The same API as 17 tools your agent can call directly — attach the hosted endpoint by URL, or run the MIT-licensed npm package over stdio. No data on disk, no local copy of the catalogue.

Each tools/call runs the matching /v1 endpoint with your key — one metered request.

Install

Add it to your client's MCP config. Claude Desktop uses claude_desktop_config.json; Cursor and Windsurf take the same JSON shape under their own config keys.

claude_desktop_config.json
{
  "mcpServers": {
    "drug-database": {
      "command": "npx",
      "args": ["-y", "@drug-database/mcp-server"],
      "env": {
        "DRUG_DATABASE_API_KEY": "dd_live_YOUR_KEY"
      }
    }
  }
}

Node 20 or newer. The binary is also on your path as drug-database-mcp if you install the package globally.

Hosted endpoint

For agents that attach to a URL instead of launching a process, the same tools are served at https://drug-database.com/v1/mcp over Streamable HTTP, with your key as a Bearer token. The handshake and the tool list are free; each tool call counts as one request against your plan, exactly like the API call behind it, and the list shows only the tools your plan can run.

remote MCP
POST https://drug-database.com/v1/mcp
Authorization: Bearer dd_live_YOUR_KEY
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/list"}

You need a key

Read this before wiring it up

Every tool except schema_docs calls a /v1 endpoint, and every one of those endpoints requires a bearer token. Four tools — search_drug, atc_lookup, browse_therapeutic_classes and compare_market_prices — do not check for the key locally before making the call, so with no key configured they fail with a 401 from the API rather than a clear local message. That is a rough edge, not a free tier: set DRUG_DATABASE_API_KEY.

Tools whose endpoint needs a scope your tier does not carry return the API's 403 with missing_scope — see Authentication for the tier table. check_interactions and validate_prescription need interactions:write (Growth and up); ask needs chat:write.

The tools

All sixteen are namespaced drug-database.<name> — so search_drug is exposed to your agent as drug-database.search_drug.

ToolScopeCallsWhat it does
search_drugdrugs:readGET /v1/drugsTypeahead across the catalogue. Its country parameter accepts only CH and FR — other markets need the HTTP endpoint.
get_drugdrugs:readGET /v1/drugs/{id} · /v1/drugs/lookupOne full record — identifiers, ATC chain, dispensing category.
get_drug_profiledrugs:readGET /v1/drugs/{id}/profileThe everything view: label texts, pricing, interactions, availability.
find_equivalentsdrugs:readGET /v1/drugs/{id}/equivalentsThe same medicine in every other country: same substance, strength and form, grouped by country.
atc_lookupatc:readGET /v1/atc/{code}One ATC node with its parents, children and DDD.
browse_therapeutic_classesatc:readGET /v1/classes and sub-pathsMulti-axis class registry — ATC plus the FDA pharmacologic axes.
check_interactionsdrugs:readPOST /v1/interactions/checkPairwise and N-way screening across a list of drugs.
validate_prescriptioninteractions:writePOST /v1/prescriptions/validateScreening over non-identifying context only. Processes no PHI.
compare_market_pricesdrugs:readGET /v1/markets/overviewOne comparable price per market for the same substance.
check_pharmacogenomicsdrugs:readGET /v1/pgxCPIC pharmacogenomic guidance for a substance.
find_drug_targetsdrugs:readGET /v1/targetsMolecular targets for a substance, from Open Targets.
list_changeschanges:readGET /v1/changesThe diff feed since a timestamp.
assess_feasibilitydrugs:readGET /v1/assessmentThe composed assessment — targets, genetics, concordance, repurposing, guidelines, HTA — in one call.
assess_target_geneticsdrugs:readGET /v1/targets/geneticsHuman-genetics support for a target×disease plus a concordance verdict.
find_repurposing_candidatesdrugs:readGET /v1/signaturesCompounds that most reverse a curated disease signature.
askchat:writePOST /v1/chatA question in plain language, answered with sources. Draws on your plan’s monthly AI answers.
schema_docslocal— local —Field reference for the Drug, Interaction and AtcCode types. Never leaves the process.

Configuration

VariableDefaultEffect
DRUG_DATABASE_API_KEYunsetYour dd_live_ or dd_test_ key. Required in practice.
DRUG_DATABASE_API_BASEhttps://drug-database.comIgnored unless the override flag below is also set.
DRUG_DATABASE_ALLOW_BASE_OVERRIDE0Set to 1 to permit an API base override. Off by default so a hostile MCP config cannot silently redirect your key to somebody else’s server.
DRUG_DATABASE_MCP_TELEMETRY1Set to 0 to stop the client attempting a telemetry post. There is currently no endpoint behind it — see below.
DRUG_DATABASE_MCP_TRANSPORTstdiostdio or sse.

Why the base URL is pinned

An MCP config is a file an agent can be talked into editing. If the API base were freely overridable, a prompt-injected config change could point the server at an attacker's host and your API key would be sent there on the next tool call. The override exists for local development and is opt-in by a second, separate variable.

What the server does not do

  • No data on disk. An in-memory ETag cache scoped to the process lifetime, and nothing else. Drug names, identifiers and ATC codes are never written locally.
  • No catalogue ships with the package. Every answer is a live call. The npm package is the shim; the data stays behind the API.
  • No telemetry reaches us. The client is built to post { tool, ok, http_status, ms } — which tool ran, whether it worked, the status and the latency; never a query, never a result, never patient context. In practice even that goes nowhere: the path it posts to is not a route that exists, so every attempt 404s. Set DRUG_DATABASE_MCP_TELEMETRY=0 if you would rather it did not try at all.

Localisation

Tool descriptions and error strings ship in English, German, French and Italian, selected from LC_ALL / LANG; anything else falls back to English. The data itself comes back in whatever language the source register publishes — Swiss monographs in German, French and Italian, for instance — and is not translated.

Clinical framing

Tell your agent, not just yourself

Interaction and prescription tools return informational data, not clinical decisions. Every response carries the disclaimer verbatim: informational only, not a medical device, not a substitute for professional clinical judgment, verify against primary sources before clinical use. If you are building an agent that surfaces this to a clinician, pass that line through rather than summarising it away.