Biomedical APIs MCP Server
Provides tools for querying Crunchbase company and funding data (free tier limited; stub implementation requires real API key).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Biomedical APIs MCP Server Search ClinicalTrials.gov for epilepsy trials starting in 2023"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Biomedical APIs MCP Server
This Model Context Protocol (MCP) server exposes 14 tools to query free biomedical and pharmaceutical APIsβplus stubs for restricted/paid sourcesβenabling AI agents to access clinical trial data, drug information, molecular structures, adverse events, and research literature.
π― Available APIs
Free & Open APIs (fully functional)
ClinicalTrials.gov β Search registered clinical trials worldwide
ChEMBL β Small molecules, bioactivity data, drug-like compounds
PubChem β Chemical compounds, molecular properties
OpenFDA β FDA adverse event reports (drug, device, food)
Europe PMC β Biomedical research articles and preprints
Restricted/Paid APIs (stubs only)
dbGaP β NIH genomic & clinical datasets (requires NIH credentials)
PhysioNet β Physiological signals (requires credentialed access)
MIMIC-IV β ICU records (PhysioNet credential + CITI training)
UK Biobank β Large-scale biomedical data (application required)
DrugBank β Structured drug data (academic/commercial license)
BindingDB β Protein-ligand binding affinities (bulk download)
OpenTrials β Merged trial data & sponsors (open access)
Crunchbase β Company & funding data (free tier limited)
Related MCP server: OpenFDA FastMCP Server
π Quick Start
1. Install Dependencies
npm install2. Configure Environment (optional)
Copy .env.example to .env and add optional API keys:
cp .env.example .envEdit .env:
OPENFDA_API_KEY=your_key_here # Optional: increases OpenFDA rate limits
CRUNCHBASE_API_KEY=your_key_here # Optional: enables Crunchbase free tier3. Build the Server
npm run build4. Run in Development Mode
npm run dev5. Use in Production
npm startπ§ͺ Testing with MCP Inspector
MCP Inspector lets you test your server interactively:
npx @modelcontextprotocol/inspector node dist/server.jsOnce connected, you can:
List all 14 available tools
Test tool calls with custom inputs
View structured JSON responses
Debug errors and API rate limits
π Connecting to Clients
VS Code (Copilot Agent Mode)
The server is pre-configured in .vscode/mcp.json:
{
"servers": {
"biomed-apis": {
"type": "stdio",
"command": "node",
"args": ["dist/server.js"]
}
}
}To connect:
Open this workspace in VS Code
Restart VS Code (if needed)
Open Copilot Chat and confirm the MCP server is listed
Ask: "Search ClinicalTrials.gov for epilepsy trials started in 2023"
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"biomed-apis": {
"command": "node",
"args": ["C:\\For Me\\Projects\\mcp with DBs\\dist\\server.js"]
}
}
}Restart Claude Desktop. The tools will appear in the MCP panel.
Claude Code CLI
claude mcp add --transport stdio biomed-apis node "C:\\For Me\\Projects\\mcp with DBs\\dist\\server.js"π Example Tool Calls
1. Search Clinical Trials
{
"tool": "search_clinical_trials",
"input": {
"query": "epilepsy",
"filter": "AREA[StartDate]2020-01-01+TO+2023-12-31",
"pageSize": 5
}
}Returns: NCT IDs, titles, status, phases, conditions, interventions
2. Search ChEMBL Compounds
{
"tool": "search_chembl_compounds",
"input": {
"query": "aspirin",
"limit": 5
}
}Returns: ChEMBL IDs, molecular formulas, weights, max clinical phase
3. Get ChEMBL Bioactivity Data
{
"tool": "get_chembl_activities",
"input": {
"targetChemblId": "CHEMBL2",
"limit": 10
}
}Returns: Activity IDs, assay IDs, molecules, types (IC50, Ki, etc.), values, units
4. Get PubChem Compound by Name
{
"tool": "get_pubchem_compound",
"input": {
"name": "glucose"
}
}Returns: CID, molecular formula, weight, IUPAC name, SMILES
5. Search OpenFDA Drug Adverse Events
{
"tool": "search_openfda_drug_events",
"input": {
"search": "patient.drug.medicinalproduct:\"metformin\"",
"limit": 10
}
}Returns: Receive dates, patient ages, reactions, drug names
6. Search Europe PMC Articles
{
"tool": "search_europepmc_articles",
"input": {
"query": "CRISPR gene editing",
"pageSize": 10
}
}Returns: Article IDs, sources, titles, authors, journals, publication years
7. Query Restricted APIs (Stubs)
{
"tool": "query_dbgap",
"input": {
"query": "GWAS cardiovascular disease"
}
}Returns: [dbGaP stub] Querying: "GWAS cardiovascular disease". Access requires NIH credentials & dbGaP approval.
Note: Stubs for dbGaP, PhysioNet, MIMIC-IV, UK Biobank, DrugBank, BindingDB, OpenTrials, and Crunchbase return informational messages. Replace the stub functions in
src/clients/restrictedStubs.tswith real implementations once you have credentials.
π οΈ Project Structure
mcp-biomed-server/
βββ src/
β βββ server.ts # Main MCP server with all 14 tools
β βββ clients/
β βββ clinicalTrialsClient.ts # ClinicalTrials.gov
β βββ chemblClient.ts # ChEMBL
β βββ pubchemClient.ts # PubChem
β βββ openfdaClient.ts # OpenFDA
β βββ europePmcClient.ts # Europe PMC
β βββ restrictedStubs.ts # Stubs for restricted APIs
βββ dist/ # Compiled JavaScript (after build)
βββ .vscode/
β βββ mcp.json # VS Code MCP config
βββ .env.example # Environment variable template
βββ package.json
βββ tsconfig.json
βββ README.mdπ§ Development
Adding a New Tool
Create a client function in
src/clients/(or add to existing file)Register the tool in
src/server.ts:server.registerTool( 'my_tool_name', { title: 'My Tool', description: 'What it does', inputSchema: { param: z.string().describe('Parameter description') }, outputSchema: { result: z.string() } }, async ({ param }) => { const result = await myClientFunction(param); return { content: [{ type: 'text', text: JSON.stringify({ result }) }], structuredContent: { result } }; } );Rebuild:
npm run build
Debugging
Use
npm run devfor live TypeScript execution viatsxServer logs errors to
stderr(visible in MCP Inspector or client logs)Check rate limits if APIs return HTTP 429
βοΈ Rate Limits & Best Practices
API | Rate Limit | Notes |
ClinicalTrials.gov | ~1000 req/day | No key required; public access |
ChEMBL | Unknown (generous) | No key; community-supported |
PubChem | ~5 req/sec | No key; use delays for bulk requests |
OpenFDA | 240 req/min (1000/day without key) | API key increases to 240 req/min |
Europe PMC | Unknown (generous) | No key; rate-limited |
Tips:
Use
pageSize/limitparameters to control result countsAdd exponential backoff for HTTP 429 errors
Consider caching responses for repeated queries
π References
π License
MIT (adjust as needed for your project)
π€ Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/new-api)Add your client in
src/clients/Register tools in
src/server.tsTest with MCP Inspector
Submit a pull request
π Troubleshooting
"Cannot find module" errors
npm install # Reinstall dependencies
npm run build # Rebuild after changesVS Code doesn't recognize the MCP server
Ensure
.vscode/mcp.jsonexistsRebuild:
npm run buildRestart VS Code
Check VS Code's MCP output panel for errors
API returns 429 (Too Many Requests)
Add delays between requests
Use optional API keys (OpenFDA, Crunchbase)
Reduce
pageSize/limitparameters
Stub tools return placeholder messages
This is expected! Restricted APIs require credentials
Replace functions in
src/clients/restrictedStubs.tswith real implementations
π Next Steps
Test all 14 tools with MCP Inspector
Connect to VS Code Copilot and try example queries
Replace stubs with real API implementations (if you have access)
Add rate limiting and caching for production use
Extend with more APIs: BindingDB real download, OpenTrials integration, etc.
Built with π using Model Context Protocol
Available Tools
14 toolsget_chembl_activitiesGet ChEMBL ActivitiesC
Retrieve bioactivity data from ChEMBL by target or assay ID
Inputs: limit, assayChemblId, targetChemblId. Returns: activities
get_pubchem_compoundGet PubChem CompoundC
Retrieve compound properties from PubChem by name
Inputs: name (required). Returns: compounds
query_bindingdbQuery BindingDB (Stub)C
BindingDB measured binding affinities (bulk download available)
Inputs: query (required). Returns: message
query_crunchbaseQuery Crunchbase (Stub)B
Crunchbase company & funding data (free tier limited)
Inputs: query (required). Returns: message
query_dbgapQuery dbGaP (Stub)C
NIH dbGaP genomic/clinical datasets (requires credentials)
Inputs: query (required). Returns: message
query_drugbankQuery DrugBank (Stub)C
DrugBank structured drug data (requires license)
Inputs: query (required). Returns: message
query_mimicQuery MIMIC-IV (Stub)C
MIMIC-IV ICU records (requires PhysioNet credential)
Inputs: query (required). Returns: message
query_opentrialsQuery OpenTrials (Stub)D
OpenTrials merged trial data & sponsors (open access)
Inputs: query (required). Returns: message
query_physionetQuery PhysioNet (Stub)B
PhysioNet physiological signal datasets (requires credentials)
Inputs: query (required). Returns: message
query_ukbiobankQuery UK Biobank (Stub)C
UK Biobank large-scale biomedical data (requires application)
Inputs: query (required). Returns: message
search_chembl_compoundsSearch ChEMBL CompoundsB
Search ChEMBL for small molecules by name or SMILES
Inputs: query (required), limit. Returns: compounds
search_clinical_trialsSearch Clinical TrialsB
Search ClinicalTrials.gov for registered trials by keyword or advanced filter
Inputs: query, filter, pageSize. Returns: trials
search_europepmc_articlesSearch Europe PMC ArticlesC
Search Europe PMC for biomedical literature by keyword
Inputs: query (required), pageSize. Returns: articles
search_openfda_drug_eventsSearch OpenFDA Drug EventsB
Search FDA adverse event reports by drug name or other criteria
Inputs: limit, search. Returns: events
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 14 tools
Each tool targets a distinct biomedical database or data type, with descriptions clearly differentiating their sources and functions. There is no overlapping purpose among the 14 tools.
Tool names follow a consistent verb_noun pattern: 'get_' for direct retrieval, 'query_' for credentialed databases, and 'search_' for keyword queries. The prefixes are used consistently across the set.
With 14 tools covering diverse biomedical data sources (compounds, activities, trials, literature, adverse events, clinical datasets), the count is well-scoped for the server's purpose without being excessive or thin.
The tool set covers major biomedical data domains, including compounds, bioactivities, trials, literature, and clinical datasets. Minor gaps exist (e.g., protein data, gene expression), but core workflows are well-supported.
Maintenance
Related MCP Connectors
Connect AI clients to biomedical data and tools.
Agent research API for 15 disease areas, plus a T1D cure lab, sourced evidence ledger and models.
271 x402 agent APIs: research, law, medicine, science, finance, public data, security and crypto.
Pharmacogenomics for AI agents: cited drugβgene, gene and rsID lookups plus a medication screen.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides real-time access to medical data including drug interactions, ICD-10 codes, FDA adverse event reports, and clinical guidelines. It enables LLMs to query databases like openFDA, PubMed, and CMS for pharmaceutical and clinical information.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to query and analyze FDA adverse events, drug labels, medical device clearances, and other public health datasets through natural language commands.14-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to access FDA and ClinicalTrials.gov data for medical device compliance, adverse event monitoring, and regulatory due diligence.-
- AlicenseNot gradedqualityAmaintenanceEnables AI clients to query authoritative medical APIs for drug information, health statistics, clinical guidelines, trials, and literature from sources such as FDA, WHO, PubMed, RxNorm, and Google Scholar, running locally without API keys.94 npmISC