# afya-mcp [Health: Active]

**Category:** 🧬 Biology & Bioinformatics  
**Repository:** https://github.com/gabrielmahia/afya-mcp  
**GitHub Stars:** 0  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/afya-mcp

## Description
MCP server for Kenya health system — NHIF/SHA coverage, facility finder, CHW services, maternal health. 6 tools.

## Tools
Capabilities this server exposes over MCP:

- **nhif_coverage_query** — Find what Kenya's public health insurance covers for a topic such as maternity, surgery or dialysis. Use when someone asks whether a service is covered. The tool name is historical: NHIF was replaced by SHA (SHIF) in October 2024, and the results are a small illustrative table, not current benefit rules. Keywords in query select matching entries; if none match it returns a general SHA note. Returns the source label, the query, member_tier (echoed back), the matching coverage entries and a tip with SHA's contact details. Labelled DEMO and unverified: confirm at sha.go.ke before relying. Read-only; no side effects.
- **health_facility_finder** — Return a TEMPLATE list of facility types for a county (county referral hospital, sub-county hospital, health centre, dispensary). Use when you need to illustrate the referral levels, NOT to find a real facility: the names are generated from the county name and this is not a register (for real facilities use the Kenya Master Health Facility List at kmhfl.health.go.ke). level keeps one facility level; nhif_only (default true) keeps facilities flagged accredited, a sample flag that refers to NHIF, since replaced by SHA. Returns the source label, the county, the matching sample facilities and a pointer to ehealth.go.ke. Labelled DEMO. Read-only; no side effects.
- **chw_service_lookup** — List the services Community Health Workers (CHWs) typically provide and the referral pathway from CHW to health centre, sub-county hospital and county referral hospital. Use when someone asks what a CHW does or where a case is referred. The list is the same for every sub-county: sub_county is only echoed back and no real CHW assignment data is held. Returns the source label, sub_county, chw_services, referral_pathway and a contact note. Labelled DEMO. Read-only; no side effects.
- **maternal_health_guide** — Antenatal care guidance by trimester: suggested antenatal visits, key tests and the danger signs that need urgent care, plus a note on SHA maternity cover. Use when someone asks what to expect or watch for in pregnancy. trimester must be first, second or third (1st, 2nd and 3rd also work); anything else returns an error listing the valid values instead of guessing. Returns the matching trimester's anc_visits, key_tests and danger_signs, the source label and an SHA note. General information labelled DEMO, not medical advice: danger signs mean go to a facility now. Read-only; no side effects.
- **essential_medicines** — Look up where a common medicine sits in Kenya's tiered supply and what it typically costs or whether it is free. Use when someone asks about the availability or price of a medicine such as amoxicillin, metformin, paracetamol, insulin, or malaria or TB drugs. Matches the first sample entry whose name appears in query; if none match it says the medicine is not in the sample dataset and points to the Essential Medicines List at kemsa.go.ke. Returns the source label, the query, the matching information, the KEMSA site and a disclaimer. A small sample labelled DEMO: consult a pharmacist or prescriber. Read-only; no side effects.
- **health_rights_query** — Explain patient rights under Kenya's Health Act 2017: consent, privacy, emergency care, second opinion, complaints and coverage disputes. Use when someone asks what they are entitled to as a patient or where to complain. Keywords in topic select entries; if none match it returns a pointer to the Act at kenyalaw.org. Returns the source label, the topic, the matching rights, all_topics (the topics that exist) and a not-legal-advice disclaimer. Static summary labelled DEMO: verify with KMPDC or the county health department. Read-only; no side effects.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "afya-mcp": {
    "command": "uvx",
    "args": ["afya-mcp"]
  }
}
```

## Documentation

## What afya-mcp does

afya-mcp provides MCP tools for navigating Kenya’s health system. Its coverage lookup addresses SHA/SHIF benefits, while the facility tool illustrates referral-level facility types by county. Other tools cover typical Community Health Worker services and referral pathways, antenatal guidance by trimester, sample essential-medicine information, and patient rights under Kenya’s Health Act 2017.

The server also includes `dhs_health_indicator`, which retrieves official Kenya DHS 2022 indicators such as vaccination, stunting, skilled birth attendance, modern contraception, and under-five mortality. Results can be requested for the national level or for a county.

## How it works

Most health-system tools use keyword matching against small, static example datasets. Coverage and rights queries select entries based on terms in the request; medicine lookup selects the first sample entry whose name appears in the query. The facility finder generates example facility types from a county name rather than searching a facility registry. CHW results echo the requested sub-county, but the service list and referral pathway are not assignment records.

Maternal guidance accepts first, second, or third trimester, including numeric forms such as 1st, 2nd, and 3rd. Invalid trimester values produce an error listing the accepted choices. All listed demo tools are read-only and have no side effects.

The DHS indicator tool uses the DHS Program API. A live response includes its source, attribution, and retrieval time; an unavailable service returns an error instead of substituting a number.

## Setup and configuration

Install the package with:

```bash
pip install afya-mcp
```

The package is intended for use with MCP clients. Configure it in the client of your choice using that client’s normal MCP server setup. No environment variables are required by the documented installation command.

## Tools and capabilities

- `nhif_coverage_query`: Returns sample coverage entries for topics such as maternity, surgery, or dialysis, with an SHA contact note.
- `health_facility_finder`: Illustrates county referral levels, health centres, and dispensaries; it is not a real-facility search.
- `chw_service_lookup`: Describes common CHW services and escalation from CHW to health centre, sub-county hospital, and county referral hospital.
- `maternal_health_guide`: Provides trimester-specific antenatal visits, tests, danger signs, and an SHA maternity note.
- `essential_medicines`: Looks up sample supply tiers and typical cost or availability information for common medicines.
- `health_rights_query`: Summarises consent, privacy, emergency care, second opinions, complaints, and coverage disputes.
- `dhs_health_indicator`: Retrieves Kenya DHS 2022 health indicators nationally or by county.

## Limitations and notes

The six navigation and guidance tools label their content as DEMO. Coverage examples are not current benefit rules, facility names are generated templates, CHW data is generic, medicine information comes from a small sample, and rights content is a static summary. Verify operational details with the relevant Kenyan authority, including SHA, the Kenya Master Health Facility List, KEMSA, or Kenya Law.

Maternal-health output is general information rather than medical advice. Reported pregnancy danger signs require immediate care at a health facility. The server is intended for navigation and grounded retrieval, not diagnosis, prescriptions, or clinical decision-making. The project is MIT licensed.

_Full upstream README: https://allmcps.com/mcp/afya-mcp/readme_

