drugbank-mcp-server
Model Context Protocol server providing access to the comprehensive DB pharmaceutical database with 17,430+ drugs, supporting search, drug details, interactions, and more.
README
Unofficial DB MCP Server
Model Context Protocol (MCP) server providing access to the comprehensive DB pharmaceutical database (17,430+ drugs).
Features
- Single unified tool with 16 methods
- High-performance SQLite backend: <10ms queries, ~50-100MB memory usage
- Access to 17,430 drug records (13,166 small molecules + 4,264 biotech)
- Comprehensive pharmaceutical data including:
- Drug names, descriptions, classifications
- Clinical indications and mechanisms of action
- Chemical structures (SMILES, InChI)
- Drug interactions and contraindications
- Target proteins, enzymes, carriers, transporters
- Metabolic pathways
- Market products and regulatory information
- Pharmacokinetics (half-life search) and toxicity data
- Salt forms and external database identifiers
- Drug similarity search
Installation
# Clone and install dependencies
cd drugbank-mcp-server
npm install
Obtain the DB database:
- Download the full database ZIP from your DB account
- Extract the XML and place it at
data/full database.xml
# Build the SQLite database and copy source files
npm run build
Usage
{
"mcpServers": {
"db-mcp-server": {
"command": "node",
"args": ["/path/to/db-mcp-server/build/index.js"]
}
}
}
Tool
Single unified tool with multiple methods accessed via the method parameter.
Methods
1. search_by_name
Search drugs by name (supports partial matching).
Note: DB uses chemical names as primary identifiers. Search for "Acetylsalicylic" to find aspirin, "Ibuprofen" not "Advil", etc.
{
"method": "search_by_name",
"query": "Acetylsalicylic",
"limit": 20
}
2. get_drug_details
Get complete drug information by DB ID.
{
"method": "get_drug_details",
"drugbank_id": "EXPT00475"
}
Returns full drug record including:
- All identifiers (DB ID, CAS, UNII)
- Clinical information (indication, mechanism, toxicity)
- Pharmacokinetics (absorption, metabolism, half-life)
- Chemical properties
- Interactions (drug-drug, food)
- Targets and enzymes
3. search_by_indication
Find drugs by medical indication.
{
"method": "search_by_indication",
"query": "pain",
"limit": 20
}
4. search_by_target
Find drugs by target protein/enzyme.
{
"method": "search_by_target",
"target": "COX-2",
"limit": 20
}
5. get_drug_interactions
Get all drug-drug interactions for a specific drug.
{
"method": "get_drug_interactions",
"drugbank_id": "DB00945"
}
6. search_by_atc_code
Search by ATC (Anatomical Therapeutic Chemical) classification code.
{
"method": "search_by_atc_code",
"code": "N02BA",
"limit": 20
}
7. get_pathways
Get metabolic pathways for a drug.
{
"method": "get_pathways",
"drugbank_id": "DB00945"
}
8. search_by_structure
Search by chemical structure (SMILES or InChI).
{
"method": "search_by_structure",
"smiles": "CC(=O)Oc1ccccc1C(=O)O",
"limit": 20
}
9. get_products
Get market products for a drug (brand names, manufacturers).
{
"method": "get_products",
"drugbank_id": "DB00945",
"country": "US"
}
10. search_by_category
Search drugs by therapeutic category.
{
"method": "search_by_category",
"category": "Anti-inflammatory",
"limit": 20
}
11. get_external_identifiers
Get cross-database identifiers (PubChem, ChEMBL, KEGG, RxCUI, etc.) and structure identifiers.
{
"method": "get_external_identifiers",
"drugbank_id": "DB02351"
}
12. search_by_halflife
Find drugs by elimination half-life range (in hours). Useful for dosing considerations.
{
"method": "search_by_halflife",
"min_hours": 12,
"max_hours": 48,
"limit": 20
}
13. get_similar_drugs
Find drugs similar to a reference drug based on shared targets, categories, and ATC codes. Uses Jaccard similarity scoring.
{
"method": "get_similar_drugs",
"drugbank_id": "APRD00003",
"limit": 20
}
Returns similarity scores with breakdown by:
- target_similarity: Shared protein/enzyme targets (50% weight)
- category_similarity: Shared therapeutic categories (30% weight)
- atc_similarity: Shared ATC classification codes (20% weight)
14. search_by_carrier
Find drugs by carrier protein (proteins that transport drugs in the body, like albumin).
{
"method": "search_by_carrier",
"carrier": "Albumin",
"limit": 20
}
15. search_by_transporter
Find drugs by transporter protein (membrane proteins that move drugs across cell membranes).
{
"method": "search_by_transporter",
"transporter": "P-glycoprotein",
"limit": 20
}
16. get_salts
Get salt forms for a drug (different chemical forms like hydrochloride, sulfate).
{
"method": "get_salts",
"drugbank_id": "DB00007"
}
Example Queries with Claude
Once configured, you can ask Claude:
- "Find information about acetylsalicylic acid using DB" (aspirin's chemical name)
- "Search DB for drugs containing ibuprofen"
- "What drugs interact with warfarin?"
- "Show me all drugs that target COX-2"
- "Find drugs used for treating hypertension"
- "What are the metabolic pathways for acetylsalicylic acid?"
- "Find drugs similar to Nelfinavir" (HIV protease inhibitor)
- "What are the external identifiers for Bivalirudin?"
- "Find drugs with a half-life between 12 and 24 hours"
- "What drugs are carried by albumin?"
- "Find drugs transported by P-glycoprotein"
- "What salt forms are available for leuprolide?"
Note: Use chemical/generic names (acetylsalicylic acid, ibuprofen, acetaminophen) rather than brand names (Aspirin, Advil, Tylenol) for best results.
Performance
SQLite Mode (Default)
- All queries: <10ms
- Memory usage: ~50-100MB
- Database size: 31.1MB (98% reduction from 1.5GB XML)
- FTS5 full-text search: Fast name/indication lookups
XML Fallback Mode
- First query: ~30-60 seconds (loads entire 1.5GB XML into memory)
- Subsequent queries: <500ms (cached in memory)
- Memory usage: ~2-3GB when database is loaded
Data Source
- Database: DB (Full Database)
- Records: 17,430 drugs (13,166 small molecules + 4,264 biotech)
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.