Pharmacy Server
Enables medication reference workflows including drug search, dosing calculations, Taiwan regulatory lookups, hospital prescription helpers, and educational PK/

Установка Pharmacy Server
У сервера нет опубликованного npm/PyPI-пакета — склонируй репозиторий и собери по его README, затем добавь получившуюся команду в свой клиент.
Открыть репозиторийОписание
Enables medication reference workflows including drug search, dosing calculations, Taiwan regulatory lookups, hospital prescription helpers, and educational PK/DDI simulation.
README
Python 3.11+ MCP License Documentation
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.
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-mcp
Streamable 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 8000
MCP 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_compact
The 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 · meta
Unknown 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.py
The 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.
FAQ
Pharmacy Server MCP бесплатный?
Да, Pharmacy Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Pharmacy Server?
Нет, Pharmacy Server работает без API-ключей и переменных окружения.
Pharmacy Server — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Pharmacy Server в Claude Desktop, Claude Code или Cursor?
Открой Pharmacy Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
GitHubPRs, issues, code search, CI status
Filesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Unyly Deploy
UnylyDeploy sites and MCP servers to Unyly straight from your AI agent
Template MCP Server
mcpdotdirectA CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
Server Sequential Thinking
GitHub ActionsMCP server for sequential thinking and problem solving
gnomancer
com.gnomancerLocal raw DNA analysis: haplogroups, traits, ClinVar, pharmacogenomics. Nothing is uploaded.
Amap Maps Mcp Server
duxiaohuiMCP server for using the AMap Maps API
PayMCP
blustAILightweight payments layer for MCP servers: turn tools into paid endpoints with a two-line decorator. [PyPI](https://pypi.org/project/paymcp/) · [npm](https://w
demo
yoojoohans-jpgdemo — MCP server via Smithery
Сравнить Pharmacy Server с
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
