PharmaMCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π PharmaMCP
The Unified Model Context Protocol (MCP) Server for Pharmaceutical Sciences
An enterprise-grade, all-in-one AI agent toolkit tailored for Pharmacy Students, Clinical Researchers, Formulation Scientists, and Pharmacologists.
Features β’ Architecture β’ Quickstart β’ Client Configuration β’ Tool Catalog β’ Workflows
π Overview
Pharmaceutical education and research demand constant context switching across fragmented platforms: literature databases (PubMed, ClinicalTrials), cheminformatics suites (PubChem, RDKit), PK/PD calculation worksheets, statistical packages (Prism, SPSS), and reference managers.
PharmaMCP unifies these six disjointed ecosystems into a single, high-performance FastMCP server. Connecting PharmaMCP to your LLM (Claude, Antigravity, Cursor, Windsurf, or ChatGPT) equips the AI with direct execution capabilities over:
π Paper Scraping & Literature Search (PubMed, ClinicalTrials.gov, CrossRef DOIs, PDF parsing)
π§ͺ Medicinal & Analytical Chemistry (PubChem, Lipinski Rule of 5, Veber filters, buffer recipes)
π©Ί Pharmacology & Toxicology (Drug-drug interactions, $ke/t_{1/2}/AUC/C_{ss}$ PK math, ADMET evaluation)
π Pharmaceutics & Formulation Science ($f_1/f_2$ dissolution similarity, release kinetics modeling, Henderson-Hasselbalch pH-solubility, pediatric dosing)
π Pharmaceutical Biostatistics (Hypothesis testing, One-Way ANOVA with Tukey HSD, 4PL IC50/EC50 regression, %RSD assay precision)
βοΈ Scientific Manuscript Writing (Vancouver/APA citations, IMRaD section auditing, LaTeX/Markdown tables)
Related MCP server: BioMCP
ποΈ Architecture
flowchart TD
subgraph Client["MCP Host Clients"]
C1["Claude Desktop"]
C2["Antigravity CLI"]
C3["Cursor / Windsurf"]
C4["Custom Python / Agent"]
end
subgraph Protocol["Transport Layer (Stdio / Streamable HTTP)"]
FastMCP["FastMCP Core Server (server.py)"]
end
subgraph Modules["PharmaMCP Specialized Modules"]
M1["π Literature Engine (literature.py)"]
M2["π§ͺ Cheminformatics Engine (chemistry.py)"]
M3["π©Ί Pharmacology & PK (pharmacology.py)"]
M4["π Pharmaceutics Science (pharmaceutics.py)"]
M5["π Biostatistics Engine (statistics.py)"]
M6["βοΈ Scientific Writing Engine (writing.py)"]
end
subgraph Services["External APIs & Scientific Compute"]
API1[("NCBI E-Utilities / PubMed")]
API2[("ClinicalTrials.gov v2")]
API3[("CrossRef DOI API")]
API4[("PubChem PUG REST API")]
COMP1["SciPy & NumPy (4PL / ANOVA / Stats)"]
COMP2["PyPDF Document Engine"]
end
C1 & C2 & C3 & C4 <--> FastMCP
FastMCP --> M1 & M2 & M3 & M4 & M5 & M6
M1 --> API1 & API2 & API3 & COMP2
M2 --> API4
M3 --> COMP1
M4 --> COMP1
M5 --> COMP1
M6 --> API1 & API3β‘ Quickstart & Installation
1. Clone the Repository
git clone https://github.com/contacttamilselvan25-lang/pharma-mcp.git
cd pharma-mcp2. Create and Activate a Virtual Environment
# Windows
python -m venv venv
venv\Scripts\activate
# macOS / Linux
python3 -m venv venv
source venv/bin/activate3. Install Dependencies
pip install -r requirements.txt4. Verify Local Installation
Run the automated test suite to ensure all 18 test cases pass:
pytest tests/test_modules.py -vπ How to Connect
π₯οΈ Claude Desktop
Open your Claude Desktop configuration file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the pharma_mcp server entry:
{
"mcpServers": {
"pharma_mcp": {
"command": "python",
"args": [
"C:\\path\\to\\pharma-mcp\\server.py"
]
}
}
}(Replace C:\\path\\to\\pharma-mcp with your actual directory path).
π Antigravity CLI / Gemini Agents
Add the server entry to your .gemini/antigravity-cli/mcp_servers.json:
{
"pharma_mcp": {
"command": "python",
"args": [
"C:/path/to/pharma-mcp/server.py"
]
}
}π» Cursor / Windsurf
In your workspace .cursor/mcp.json or MCP Settings:
{
"mcpServers": {
"pharma_mcp": {
"command": "python",
"args": [
"server.py"
]
}
}
}π Comprehensive Tool Catalog (28 Tools)
1. π Literature & Paper Scraping
Tool | Arguments | Description |
|
| Searches NCBI PubMed for peer-reviewed studies with MeSH indexing. |
|
| Retrieves complete abstract, authors, affiliations, and MeSH headings. |
|
| Searches ClinicalTrials.gov API v2 for Phase 1β4 study records. |
|
| Queries CrossRef for publisher metadata, authors, volume, and BibTeX. |
|
| Extracts and parses IMRaD sections from local research PDFs. |
2. π§ͺ Medicinal & Analytical Chemistry
Tool | Arguments | Description |
|
| Authoritative PubChem lookups (MW, LogP, TPSA, SMILES, InChIKey). |
|
| Calculates Lipinski (MW, LogP, HBD, HBA) and Veber oral drug-likeness. |
|
| Converts across Name, CID, SMILES, InChI, and InChIKey. |
|
| Generates 2D molecular structure diagram URLs & markdown embeds. |
|
| Computes gram masses & protocols for USP Phosphate, Acetate & Gastric buffers. |
3. π©Ί Pharmacology & Pharmacokinetics
Tool | Arguments | Description |
|
| Identifies clinical CYP450 and pharmacodynamic drug-drug interactions. |
|
| Computes $ke, t_{1/2}, AUC, C_{ss}, C_{max}$, loading and maintenance doses. |
|
| Identifies receptor target, mechanism of action, and metabolic pathways. |
|
| Evaluates BBB penetration, P-gp efflux liability, and estimated BCS class. |
4. π Pharmaceutics & Formulation Science
Tool | Arguments | Description |
|
| FDA/EMA difference factor ($f_1$) and similarity factor ($f_2$) calculation. |
|
| Fits Zero-Order, First-Order, Higuchi, Korsmeyer-Peppas ($n$), and Hixson-Crowell. |
|
| Henderson-Hasselbalch ionization and solubility across stomach & intestinal pH. |
|
| Calculates pediatric doses using Young's, Dilling's, Clark's, and Mosteller BSA. |
|
| Guides binder/disintegrant choices and warns against Maillard/hydrolysis degradation. |
5. π Pharmaceutical Biostatistics
Tool | Arguments | Description |
|
| Shapiro-Wilk normality check + Student's/Welch's/Mann-Whitney test + Cohen's d. |
|
| One-Way ANOVA across formulation batches with Tukey HSD post-hoc testing. |
|
| 4-Parameter Logistic (4PL) regression for $IC_{50} / EC_{50}$ with 95% CI and $R^2$. |
|
| Calculates animal sample size per group with 10% attrition buffer for IACUC/ethics. |
|
| Computes assay precision (%RSD / CV%), Mean, SD, SEM, and USP compliance. |
6. βοΈ Scientific & Manuscript Writing
Tool | Arguments | Description |
|
| Formats citations in Vancouver, APA 7, Elsevier, Nature, Harvard, or BibTeX. |
|
| Audits manuscript sections against ICMJE, ARRIVE, and CONSORT standards. |
|
| Formats lab data into publication-ready Markdown or LaTeX |
|
| Upgrades informal lab notes into professional academic journal prose. |
π‘ Real-World Pharmacy Workflows
π§ͺ Scenario 1: Tablet Formulation & Dissolution Comparison
User: "We formulated a generic sustained-release tablet (F3) and compared its 8-hour dissolution against the innovator brand. Can you check if they are bioequivalent and find the drug release mechanism?"
Agent Action:
Calls
pharma_dissolution_similarity_f1_f2with innovator[20, 42, 65, 82, 95]and test[19, 40, 67, 83, 94].
Result: $f_1 = 3.12$ (Pass $\le 15$), $f_2 = 82.45$ (Pass $\ge 50$) $\rightarrow$ Bioequivalent per FDA/EMA criteria.
Calls
pharma_fit_release_kineticswith times[0.5, 1, 2, 4, 8]and release percentages.
Result: Fits Higuchi ($R^2 = 0.991$) and Korsmeyer-Peppas ($n = 0.48$) $\rightarrow$ Non-Fickian anomalous diffusion.
π©Ί Scenario 2: Preclinical In-Vivo Animal Study Design
User: "We are writing an animal protocol for testing our novel formulation in diabetic rats against Metformin. What sample size do we need, and what are the ethical considerations?"
Agent Action:
Calls
pharma_sample_size_calculatorwith $\alpha = 0.05, \text{Power} = 0.80, d = 0.80$.
Result: Minimum $n = 26$ per group; recommended $n = 29$ with 10% attrition buffer.
Provides ready-to-paste justification snippet for CPCSEA / IACUC ethics approval.
π Scenario 3: Cytotoxicity IC50 & Dose-Response Determination
User: "Here is our MTT assay data for compound X against MCF-7 breast cancer cells at 0.01, 0.1, 1, 10, 100 uM: [98.5, 84.1, 52.3, 16.4, 2.1]. Compute the IC50."
Agent Action:
Calls
pharma_fit_ic50_ec50.
Result: $IC_{50} = 1.05\ \mu\text{M}$ ($pIC_{50} = 5.98$, 95% CI: $0.92\text{--}1.21\ \mu\text{M}$, $R^2 = 0.999$).
π Project Structure
pharma-mcp/
βββ server.py # FastMCP entrypoint & tool registrations
βββ requirements.txt # Python dependencies
βββ LICENSE # MIT License
βββ README.md # Project documentation
βββ claude_desktop_config_snippet.json # Ready-to-copy MCP client configuration
βββ modules/ # Domain engines
β βββ __init__.py
β βββ literature.py # PubMed, ClinicalTrials, DOI, PDF parsing
β βββ chemistry.py # PubChem, Lipinski, buffer formulations
β βββ pharmacology.py # DDI check, PK equations, ADMET rules
β βββ pharmaceutics.py # f1/f2, dissolution models, Henderson-Hasselbalch
β βββ statistics.py # t-test, ANOVA, 4PL IC50, power sample size
β βββ writing.py # Vancouver/APA citations, IMRaD review
βββ tests/ # Automated test suite
βββ __init__.py
βββ test_modules.py # 18 unit and integration testsπ€ Contributing
Contributions are welcomed from pharmacists, chemists, pharmacologists, and developers!
Fork the repository
Create a feature branch (
git checkout -b feature/NewPharmaTool)Commit your changes (
git commit -m 'Add new bioanalytical tool')Push to the branch (
git push origin feature/NewPharmaTool)Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Stateless agentic tools over MCP: concept extraction, long-context, knowledge graph, planning.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
The OpenRouter for tools. One MCP connection gives any AI agent 254 hosted tools, pay per call.
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.
Related MCP Servers
- AlicenseBqualityDmaintenanceThis MCP server provides 16 intelligent tools for searching, retrieving, and linking biomedical literature from PubMed and PMC. It enables LLM applications to perform complex queries, batch processing, and cross-database linking.168MIT
- AlicenseAqualityBmaintenanceA high-performance MCP server that gives LLMs access to 25 biomedical tools federated across 50+ upstream APIs for genes, variants, drugs, diseases, literature, clinical trials, and structural biology.43155 npm12Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables scientific literature research through multi-agent search, analysis, and semantic memory, exposing 9 MCP tools for querying, storing, and retrieving research findings.15 PyPI2MIT
- AlicenseAqualityDmaintenanceAn MCP server that gives LLMs live access to clinical trials, FDA drug recalls, adverse-event reports, drug labels, and drug-name normalization via six validated tools.6MIT