Pharmacy MCP Server
Provides access to PubMed biomedical literature for pharmaceutical research and drug information.
Click on "Install 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., "@Pharmacy MCP Serverlist side effects of metformin"
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.
Pharmacy MCP Gateway
An MCP server and agent harness that makes pharmaceutical knowledge available through one traceable query contract. It combines public drug APIs, Taiwan TFDA/NHI data, hospital FHIR and inventory, organization databases, vector search, files, fixed web documents, and a trusted PK/DDI simulation catalog.
繁體中文 · Documentation · Architecture
Version 1.0 prerelease. Reference data only; not medical advice or a replacement for a pharmacist, physician, or validated clinical decision-support system.
Why this gateway
One agent entry point:
query_pharmacyroutes by capability or explicit source and isolates provider timeouts and failures.Stable output: every MCP tool returns
QueryResponsev1.0 through a shared JSON Schema. Text is a deterministicjson,json_compact, ormarkdownrendering; MCPstructuredContentremains authoritative.Agent constraint: every tool carries forwarding rules and clients can load the
pharmacy-query-contractMCP prompt.Traceable compound results: provider payloads, provenance, warnings, and errors remain distinct. Successful data survives as
partialif another source fails.Hospital-ready boundaries: FHIR is read-only; file, SQL, vector, and web connectors are configured by operators instead of accepting arbitrary agent paths, SQL, endpoints, or URLs.
Drift detection: a scheduled health workflow probes 18 official API and dataset surfaces every week without downloading the large Taiwan datasets.
Deployable FastMCP: use stdio locally or mount the same tool catalog over SSE/Streamable HTTP; service creation and the ASGI export remain lazy.
Auditable simulation: trusted formulas include units, assumptions, limitations, provenance, fixtures, and fail-closed numerical validation.
Related MCP server: Taiwan Health MCP Server
Quick start
Requires Python 3.11+ and uv.
git clone https://github.com/u9401066/pharmacy-mcp.git
cd pharmacy-mcp
uv sync --all-extras
uv run pharmacy-mcpStreamable HTTP and ASGI deployments use the same tools and output contract:
uv run pharmacy-mcp --transport streamable-http --host 127.0.0.1 --port 8000
uvicorn pharmacy_mcp.presentation.server:app --host 127.0.0.1 --port 8000MCP client configuration:
{
"mcpServers": {
"pharmacy": {
"command": "uv",
"args": ["run", "pharmacy-mcp"],
"cwd": "/absolute/path/to/pharmacy-mcp"
}
}
}Recommended tool call:
{
"query": "warfarin",
"capabilities": ["identity", "label", "reimbursement", "formulary"],
"sources": ["rxnorm", "dailymed", "tw-tfda", "tw-nhi", "local-formulary"],
"limit": 10,
"output_format": "json_compact",
"locale": "zh-TW"
}For a shell or non-MCP workflow:
uv run pharmacy-query warfarin \
--source local-formulary \
--capability formulary \
--format json_compactThe Python API exposes the same contract through
pharmacy_mcp.application.harness.PharmacyHarness.
Integrated knowledge
Area | Shipped adapters |
Public drug knowledge | RxNorm/RxClass; all seven openFDA drug endpoints; DailyMed; PubChem; MedlinePlus Connect; PubMed; ClinicalTrials.gov; ChEMBL; Open Targets |
Taiwan | TFDA permits, official NHI monthly drug items, coverage rules and terminology |
Hospital | FHIR R4/R5 medication, order, dispense, inventory and supply; bundled formulary |
Organization data | PDF, DOC/DOCX, CSV, XLS/XLSX, Markdown, text, read-only SQLite, vector gateway, fixed HTTPS pages |
PK/DDI simulation | Trusted formula catalog, concentration-time estimates, mechanistic CYP inhibition screening, formula resources and validation fixtures |
Licensed catalog | DrugBank, FDB and Micromedex are discoverable but never scraped or presented as enabled without a license |
Call list_knowledge_sources for the runtime source of truth: capabilities,
implementation state, credential needs, and whether an adapter is registered.
See the complete data-source catalog.
Taiwan NHI and hospital setup
The NHI provider downloads the official monthly CSV on demand and atomically builds a versioned SQLite index. It can combine reimbursement code, price, ATC, effective dates, TFDA results, and coverage-rule metadata in one query. See Taiwan NHI compound queries.
Set PHARMACY_MCP_FHIR_BASE_URL to register the hospital adapter. Bearer tokens
are read from SecretStr settings, and patient resources are queried only when
an authorized caller explicitly supplies context.patient_id. Organization
connectors use similarly explicit allowlists. Start with .env.example,
FHIR and inventory, and organization connectors.
Output and agent rules
The canonical top-level fields are:
schema_version · status · data · sources · warnings · errors · metaUnknown top-level fields are rejected. All 33 current tools, including calculation and simulation tools, use this envelope. Agents must preserve all seven fields, must not infer absent clinical facts, and must not flatten multiple providers into one implied authority. See the agent harness guide and response contract.
Development
uv sync --all-extras
uv run pytest
uv run ruff check src tests examples scripts
uv run mypy src
uv run mkdocs build --strict
uv run python scripts/check_source_health.pyThe repository uses segmented Conventional Commits, an updated Memory Bank, CI across supported Python versions, weekly public-source health checks, and a GitHub Pages documentation workflow. See CONTRIBUTING.md and SECURITY.md.
License
Apache License 2.0. Upstream datasets and commercial knowledge bases retain their own terms, attribution requirements, and clinical-use restrictions.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-quality-maintenanceEnables querying of Chinese-Western medicine interactions with comprehensive drug information, risk assessment, and clinical recommendations. Supports searching medicines, checking interactions individually or in batches, and provides safety guidance with severity classifications.
- Alicense-qualityDmaintenanceIntegrates Taiwan-specific medical data including ICD-10 codes, FDA drug databases, and nutrition information into the Model Context Protocol. It enables AI models to query clinical guidelines, verify medical codes, and convert health data into FHIR R4 standardized formats.MIT
- Alicense-qualityDmaintenanceEnables real-time pharmacogenomics analysis, including variant clinical significance, drug-gene interactions, and dosing guidelines, by connecting to ClinVar, PharmGKB, gnomAD, and other databases.1MIT
- Alicense-qualityAmaintenanceIntegrates Taiwan health data and international medical standards, providing 28 MCP tools for diagnostics, drugs, lab tests, and clinical guidelines via FHIR R4.159MIT
Related MCP Connectors
Drug-drug interaction checker for clinical LLMs using RxNorm and DailyMed.
Diagnoses, drugs & lab codes: ICD-11, SNOMED, LOINC, RxNorm, MeSH, ATC, CID-10. 37 tools, MIT.
Offline US medical code lookup and crosswalk — ICD-10-CM/PCS, HCPCS Level II, RxNorm. Keyless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/u9401066/pharmacy-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server