- Home
- MCP servers
- OpenFDA
OpenFDA
- typescript
3
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"ythalorossy-openfda": {
"command": "npx",
"args": [
"@ythalorossy/openfda"
],
"env": {
"OPENFDA_API_KEY": "************"
}
}
}
}You can query OpenFDA drug information through a focused MCP server that exposes common drug data actions. This server lets you look up drug labels, get information by generic ingredients, retrieve brand versions, view adverse event reports, list drugs by manufacturer, and access comprehensive safety information—all while validating and normalizing NDC formats to keep queries reliable.
How to use
Use an MCP client to connect to the OpenFDA MCP Server and perform the actions you need. You can search drug labels by brand name, fetch data by active ingredient, obtain all brand versions for a generic drug, retrieve adverse event reports, list drugs produced by a specific company, and access safety details such as warnings and contraindications. Ensure your client authenticates with the OpenFDA API key so requests to the OpenFDA API succeed. When your client makes a request, the server will validate inputs and provide helpful error messages if a query cannot be fulfilled.
How to install
Prerequisites: Node.js and npm must be installed on your system.
-
Clone the project repository.
-
Install dependencies.
-
Build the project.
-
Start the server from the build output.
Configuration and usage notes
Set up your OpenFDA API key in a .env file at the root of your project with the following line.
OPENFDA_API_KEY=your_openfda_api_key_here
Do not commit your real API key to version control. Obtain your API key from the OpenFDA API Key Registration portal.
Additional notes
To integrate this server with another MCP framework, you may use the provided configuration example. It shows how to run the server via npx and pass the API key through environment variables.
{
"mcpServers": {
"openfda": {
"command": "npx",
"args": ["@ythalorossy/openfda"],
"env": {
"OPENFDA_API_KEY": "************"
}
}
}
}
Available tools
getDrugLabelByBrand
Retrieve drug label information by brand name from OpenFDA data through the MCP server.
getDrugInfoByGeneric
Retrieve drug information by generic active ingredient name.
getBrandVersionsForGeneric
Get all brand versions associated with a specific generic drug.
getAdverseEventsForDrug
Obtain adverse event (side effect) reports for a drug by brand or generic name.
getDrugsByManufacturer
Retrieve all drugs manufactured by a specific company.
getSafetyInfo
Get comprehensive drug safety information including warnings, contraindications, interactions, and precautions.