# NLM RxNorm Drug Database MCP

> NLM RxNorm (Drug Database) gives your AI client access to standardized pharmaceutical nomenclature and relationships. Search for drugs using names, NDC codes, or ATC identifiers; retrieve primary concepts (RxCUIs); map synonyms, classes, and related compounds across multiple data sources. Use it when you need high-fidelity drug identification for medical research or clinical systems.

## Overview
- **Category:** databases
- **Price:** Free
- **Tags:** drug-database, rxnorm, medical-data, pharmacology, healthcare-api

## Description

You're connecting your AI client to the NLM RxNorm Drug Database. This isn't some basic lookup tool; it gives you access to standardized pharma nomenclature, letting you do high-fidelity analysis on drugs and ingredients.

When you use this server, you’ll get the official RxCUI—the unique identifier needed for any serious medical or research work. If you start with a common name, an NDC code, or even just a messy string, your agent can find the standardized concept ID using `find_rxcui_by_string` or use `get_approximate_match` if you misspelled something.

To map out how drugs connect in the real world, you've got several ways to go. You can look up all concepts linked by a specific relationship type, like finding everything that shares a common ingredient or tracing parent-child concept hierarchies using `get_related_by_relationship`. If you need to group drugs by function, your agent identifies therapeutic classes—it will tell you which class a drug belongs to via its RxNorm ID (`get_class_by_rxnorm_drug_id`), and it can even list all other products that fall under that same chemical or therapeutic grouping using `get_class_members`.

When you need the deep dive, this server delivers. Your agent pulls detailed attributes for any concept using `get_all_properties`, giving you a full picture of synonyms, strengths, and source-specific metadata like MTHSPL data. You can also pull out just one specific piece of info—say, the exact 'strength' or 'route'—with `get_rx_property`. For complete due diligence, it tracks the history and status of any drug concept over time using `get_rxcui_history_status`.

Dealing with physical identifiers is no sweat. You can check detailed metadata for a specific National Drug Code (NDC) using `get_ndc_properties`, and you'll even get its current status or historical changes via `get_ndc_status`. If you have an RxCUI, the server pulls every known concept and term type related to it with `get_all_related_info`.

Need to search by ingredient name or brand name? The system handles that. You can find drug products using `get_drugs`, or if you're focused on NDCs, `find_related_ndcs` helps map all associated codes based on concept, drug, or product ID.

For the full picture of a single RxCUI, your agent doesn't just give you one name; it uses `get_all_rxterm_info` to list every common display name, synonym, strength, and administration route. You can also ask for basic core properties with `get_rx_concept_properties`. If you need to narrow down related concepts by type (like IN or SBD), the tool `get_related_by_type` handles that specificity.

Your agent's ability to classify drugs is sharp too. It can pinpoint therapeutic classes containing members similar to a list of RxCUIs using `find_similar_classes_by_drug_list`. You get crystal-clear results whether you’re looking up basic drug products via `get_drugs` or trying to find the closest match for a messy search query.

Basically, if it's standardized pharmaceutical data—names, codes, relationships, history, classes, synonyms—this server handles it. It lets your AI client move past simple lookups and perform complex mapping across multiple data sources.

## Tools

### find_related_ndcs
Finds National Drug Codes (NDCs) that are related by concept, drug, or NDC product identifier.

### find_rxcui_by_id
Searches for a specific identifier and returns all associated RxCUI identifiers.

### find_rxcui_by_string
Finds an RxCUI by searching a drug's name using any vocabulary within the RxNorm standard.

### find_similar_classes_by_drug_list
Identifies therapeutic classes that contain members similar to a list of provided RxCUIs.

### get_all_properties
Returns detailed, comprehensive properties for any specified RxNorm concept.

### get_all_related_info
Retrieves every known concept and term type related to a given RxCUI.

### get_all_rxterm_info
Returns the display names, synonyms, strengths, and routes associated with an RxCUI.

### get_approximate_match
Finds concepts and atom IDs that are close matches to a search query string.

### get_class_by_rxnorm_drug_id
Returns the therapeutic classes containing a specific drug identified by its RxNorm ID.

### get_class_members
Lists all drug products that belong to a specified therapeutic or chemical class.

### get_drugs
Returns drug products related to an ingredient name or brand name.

### get_ndc_properties
Retrieves detailed metadata and information for a specific National Drug Code (NDC).

### get_ndc_status
Returns the current status and history of a given NDC code.

### get_ndcs
Lists all active NDCs that are associated with a specific RxNorm concept.

### get_related_by_relationship
Retrieves concepts directly linked by a specified relationship type (e.g., 'tradename_of').

### get_related_by_type
Retrieves related concepts that belong to specific term types, like IN or SBD.

### get_rx_concept_properties
Returns basic, core properties for a given RxNorm concept.

### get_rx_property
Retrieves one specific property value (e.g., 'strength') for an RxCUI.

### get_rxterm_display_name
Gets the common display name for a specific RxNorm concept.

### get_rxcui_history_status
Returns the status, historical attributes, and change log of a drug concept over time.

### get_spelling_suggestions
Suggests correct drug names when you provide an inaccurate or misspelled string.

## Prompt Examples

**Prompt:** 
```
Search for the drug 'Lisinopril' and provide its RxCUI.
```

**Response:** 
```
I found the RxCUI for Lisinopril using `find_rxcui_by_string`. The primary RxCUI is 29046. Would you like to see its detailed properties?
```

**Prompt:** 
```
I think I misspelled 'Metformmin'. Can you suggest the correct name?
```

**Response:** 
```
Using `get_spelling_suggestions`, the closest match for 'Metformmin' is 'Metformin'. I can now search for its properties if you'd like.
```

**Prompt:** 
```
Get all properties and attributes for RxCUI 860975.
```

**Response:** 
```
I've retrieved the properties for RxCUI 860975 using `get_all_properties`. This concept refers to 'Aspirin 81 MG Oral Tablet'. It includes attributes from sources like MTHSPL and RXNORM.
```

## Capabilities

### Map Drug Relationships
It finds concepts linked to a drug by relationship type or maps out all related ingredients and therapeutic classes.

### Identify Concept IDs (RxCUIs)
It takes any identifier—a common name, an NDC code, or an ATC code—and returns the official, standardized RxCUI required for analysis.

### Retrieve Full Drug Properties
It pulls detailed attributes for a specific drug concept, including all known synonyms and source-specific metadata (e.g., MTHSPL).

### Classify Drugs into Groups
It determines which therapeutic or chemical classes a given drug belongs to, allowing you to group drugs by function.

### Validate Drug Names
If you misspell a name, it provides the closest known matches, ensuring your query hits accurate data.

## Use Cases

### Checking a Compound's Full Scope
A researcher needs to know every related concept for Aspirin. They ask their agent, 'What are all the things linked to Aspirin?' The agent uses `get_all_related_info` and then cross-references results with `get_class_members` to provide a complete, structured view of its connections.

### Validating an Old Drug Code
A developer is processing historical data containing old NDC codes. They use `get_ndc_status` to verify if the code was active during the specified date range, ensuring their system doesn't rely on deprecated identifiers.

### Finding Alternatives by Class
A clinician needs a drug alternative for a patient whose current drug is discontinued. They provide the RxCUI and ask the agent to use `find_similar_classes_by_drug_list` to identify other therapeutic classes they can consider.

### Building a Drug Profile from Scratch
A data scientist receives only a common name. They prompt, 'Give me everything about this drug.' The agent first runs `find_rxcui_by_string` to get the ID, then uses that ID with `get_all_properties`, and finally calls `get_all_related_info` for maximum context.

## Benefits

- Stop cross-referencing codes manually. Using `find_rxcui_by_id` lets your agent take an NDC or ATC code, look up the RxCUI, and use that ID for every subsequent query—all in one flow.
- See the full picture of a drug's life cycle. The `get_rxcui_history_status` tool tracks changes over time, showing when a concept was added or modified, which is critical for regulatory reporting.
- Avoid scope creep with specific tools. Instead of getting a massive dump of data, use `get_rx_property` to pull only the exact piece of information you need (like 'dosage form') for cleaner code and faster responses.
- Map complex connections efficiently. If you know a drug's class but not its members, `get_class_members` lists all compounds in that group. Conversely, if you list drugs, `find_similar_classes_by_drug_list` tells you the common functional area.
- Handle bad input gracefully. If your user types 'Metformmin,' the agent runs `get_spelling_suggestions`, corrects it to 'Metformin,' and then proceeds with the correct data lookup using `find_rxcui_by_string`.

## How It Works

The bottom line is that it translates messy medical terminology and codes into one consistent set of structured data points for your client to read.

1. First, ask your agent to find the primary identifier (RxCUI) using an external code or drug name via tools like `find_rxcui_by_id`.
2. Next, tell the agent what context you need—for example, 'Show me all related concepts' or 'List its attributes.' The agent then calls specialized tools like `get_all_related_info`.
3. Finally, your agent compiles the structured data into a readable format, giving you the complete picture of the drug's properties and connections.

## Frequently Asked Questions

**How do I find a drug's official ID? (Using find_rxcui_by_string)**
You use `find_rxcui_by_string`. You just provide the common name, and it returns the unique RxCUI. It’s the first step you need before doing any deep analysis.

**Does get_ndc_properties tell me if a drug is discontinued?**
Yes, `get_ndc_properties` provides detailed metadata. You should pair this with `get_ndc_status` to confirm the current market status and history of that specific NDC code.

**What if I misspell a drug name? (Using get_spelling_suggestions)**
Run `get_spelling_suggestions`. This tool checks your input against known vocabularies and returns the most likely correct spelling, letting you fix the query before it fails.

**How do I find all drugs in a certain class? (Using get_class_members)**
Call `get_class_members` and provide the specific class ID. It returns a list of every drug product that belongs to that therapeutic group, making classification simple.

**What is the difference between find_rxcui_by_string and get_all_related_info?**
`find_rxcui_by_string` finds the core ID (the RxCUI). `get_all_related_info` takes that already-found ID and expands it, showing everything connected to that drug concept.

**How do I use `get_rxcui_history_status` to track a drug’s status changes over time?**
The `get_rxcui_history_status` tool provides the full lifecycle data for an RxCUI. You get reports on when attributes or statuses changed, letting you build audit trails. This is crucial for understanding how and why a drug's classification evolved.

**When should I use `get_related_by_relationship` instead of checking all related concepts?**
Use `get_related_by_relationship` when you need to filter connections by a specific link type, like 'ingredient' or 'trade_name'. This is much cleaner than wading through hundreds of general relationships. It narrows down your search immediately.

**If I only need one specific piece of data (like the primary strength), how does `get_rx_property` help?**
`get_rx_property` lets you pull a single, targeted value for any concept. Instead of downloading massive property sheets and writing parsing logic, you specify the exact attribute name you need. It's perfect for quick data checks.

**How can I find the RxCUI for a specific drug name?**
You can use the `find_rxcui_by_string` tool. Simply provide the drug name, and the agent will return the associated RxNorm Concept Unique Identifiers.

**What should I do if I am unsure of the correct spelling of a drug?**
Use the `get_spelling_suggestions` tool. It provides strings similar to your input to help you find the correct standardized drug name.

**Can I retrieve all properties, such as synonyms and attributes, for a drug?**
Yes, the `get_all_properties` tool allows you to fetch detailed attributes, codes, and names associated with a specific RxCUI.