gho-mcp

gho-mcp

A Model Context Protocol (MCP) server that gives AI assistants direct access to the World Health Organization's Global Health Observatory (GHO) for comparative health systems research.

Category
访问服务器

README

<p align="center"> <a href="https://decilion.com"> <img src="assets/decilion-banner.png" alt="Decilion" width="100%"> </a> </p>

gho-mcp

A Model Context Protocol (MCP) server that gives AI assistants like Claude direct access to the World Health Organization's Global Health Observatory (GHO) — purpose-built for comparative health systems research.

License: MIT Python 3.11+ MCP


What it does

gho-mcp wraps the WHO GHO OData API (https://ghoapi.azureedge.net/api) in a small set of task-shaped MCP tools so an AI assistant can answer questions like:

  • "Build me a comparative health systems profile for Peru."
  • "Plot maternal mortality across the Andean countries since 2010."
  • "What's the UHC service coverage gradient by World Bank income group?"
  • "Does the tobacco indicator support sex disaggregation?"

Country names, ISO3 codes, WHO region codes (AFR, AMR, etc.), and World Bank income-group codes (WB_HI, WB_UMI, etc.) are all accepted interchangeably. CSV export is built in.

Why this exists

Raw API access for global health data is technically possible from any LLM — but in practice it's painful: indicator codes are cryptic (WHOSIS_000001 is "life expectancy at birth"), countries must be ISO3 codes, OData filter syntax is unforgiving, and every cross-country comparison becomes a loop. gho-mcp collapses the friction so an LLM can stay focused on the analysis.

The tool design reflects how comparative-health-systems researchers actually work: country profiles, regional and income-group benchmarks, sex-disaggregated time series, and metadata for citation.

Install

Requires Python 3.11 or newer. Check yours with python3 --version — on macOS, python3 from system Python is often 3.9, in which case install a current Python via brew install python (or pyenv) before continuing.

git clone https://github.com/Decilion/gho-mcp.git
cd gho-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Then register the server with your MCP client.

Claude Code:

claude mcp add gho /absolute/path/to/.venv/bin/gho-mcp

Claude Desktop: add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "gho": {
      "command": "/absolute/path/to/.venv/bin/gho-mcp"
    }
  }
}

Codex CLI:

codex mcp add gho -- /absolute/path/to/.venv/bin/gho-mcp

This writes an entry to ~/.codex/config.toml. List or remove with codex mcp list / codex mcp remove gho.

Other MCP-compatible clients (Cursor, Cline, Continue, etc.): point them at the gho-mcp console script in your venv. The MCP protocol is the same across clients — only the registration UI differs.

Restart your client. The gho server should appear with all tools, the gho://topics/{topic_id} resource, and the compare_health_systems prompt available.

Tool reference

Tool signatures show the canonical parameter names — the server rejects unknown kwargs (since v0.5.2), so getting the names right matters. In particular: country is singular, countries is the list form, year filters are year_start / year_end (not year_from / year_to).

Discovery

Tool Signature Purpose
list_indicators (skip=0, top=50) Paginated list of all GHO indicators
search_indicators (query, top=50) Case-insensitive substring search on indicator names
topics_index () Curated map of comparative-health-systems topics → indicator codes
list_dimensions () All GHO dimensions (COUNTRY, REGION, SEX, AGEGROUP, etc.)
get_dimension_values (dimension_code) Allowed values for a dimension
find_country_code (country) Resolve country name → ISO3 code
list_income_groups () World Bank income-group spatial codes
list_curated_country_groups () Decilion's curated groupings (LAC, LAC_TERRITORIES, OECD, LDC, SSA, MENA, etc.) — see Regional analysis below
resolve_country_group_membership (group) Return the ISO3 list for one curated group

Indicator detail

Tool Signature Purpose
get_indicator_metadata (indicator_code) Full metadata record for citation
describe_indicator_dimensions (indicator_code, sample_size=200) What disaggregations (sex, age, residence) an indicator uses

Data

Tool Signature Purpose
get_indicator_data (indicator_code, country=None, year_start=None, year_end=None, sex=None, dim_filters=None, top=100) Single indicator with optional spatial/temporal/sex/dim filters
compare_countries (indicator_code, countries=None, country_group=None, year_start=None, year_end=None, sex=None, dim_filters=None, latest_only=False, top=1000, format="rows") One indicator × N spatial units × year range, tidy rows or CSV
country_profile (country, year=None, indicator_codes=None) Parallel-fetched headline indicators for one country
get_indicator_data_raw (indicator_code, filter=None, top=100, orderby=None, select=None) Expert escape-hatch — pass-through OData query for advanced disaggregations (wealth quintile, residence, education, custom Dim2 values)

Resources and prompts

  • Resource gho://topics/{topic_id} — readable view of a curated topic and its indicator codes
  • Prompt compare_health_systems(countries, topic) — guided template for cross-country comparative analysis

Regional analysis

Both gho-mcp and ghed-mcp expose the same curated country groupings beyond what WHO and the World Bank publish as built-in dimensions. Pass country_group="LAC" (or any of the codes below) on the data tools and the server resolves to the right ISO3 list — without you having to enumerate codes by hand.

Available groups

Code Definition Members
LAC 33 sovereign Latin American & Caribbean states (PAHO/Decilion convention) 33
LAC_TERRITORIES World Bank's 42-economy LAC region — sovereign states plus territories (Aruba, Cayman Islands, Curaçao, Puerto Rico, etc.) 42
EAP World Bank East Asia & Pacific (FY2026) 38
ECA World Bank Europe & Central Asia 58
MENA World Bank "Middle East, North Africa, Afghanistan and Pakistan" (FY2026) 23
MENA_EXCL_ISR_MLT MENA without Israel and Malta 21
NAR World Bank North America (Bermuda, Canada, USA) 3
SAS World Bank South Asia (FY2026 — without AFG and PAK, now in MENA) 6
SSA World Bank Sub-Saharan Africa 48
LDC UN Least Developed Countries 44
OECD OECD member countries 38

Aliases include natural-language ("Latin America and Caribbean", "Sub-Saharan Africa", "Least Developed Countries") and official codes (LCN, SSF, etc.). Two read-only tools — list_curated_country_groups and resolve_country_group_membership — let an assistant inspect or expand the lists at runtime.

Using country_group= on the data tools

country_group= merges (deduplicated) with any explicit countries= list and composes with region / income via AND semantics. Some illustrative calls — the first four work identically on both ghed-mcp and gho-mcp:

compare_countries(indicator_code="oops_che", country_group="LAC",
                  latest_only=True)                               # GHED
compare_countries(indicator_code="WHOSIS_000001", country_group="OECD",
                  year_start=2010, year_end=2023)                 # GHO
list_curated_country_groups()                                     # both
resolve_country_group_membership("LAC")                           # both — returns 33 ISO3 codes

# ghed-mcp also exposes:
build_research_panel(indicator_codes=["che_gdp", "gghed_che"],
                     country_group="OECD", year_start=2000, year_end=2024)
summarize_country_group(indicator_code="ext_che", country_group="LDC",
                        latest_only=True)
list_countries(country_group="LAC", income="High")                # LAC HICs

Curated-group members are soft-resolved: ISO3 codes the underlying source doesn't publish are silently dropped (e.g. LAC_TERRITORIES includes Aruba and Curaçao, which GHED doesn't cover). User-supplied countries= are still strict-resolved, so typos still raise.

Membership cadence

The lists are static Python data baked into each package — no runtime refresh, no separate cache. Users get updates by reinstalling the package.

The LAST_VERIFIED constant in country_groups.py records when each list was last cross-checked against:

Re-check annually. Known upcoming changes at the time of writing: Bangladesh, Lao PDR, and Nepal are scheduled to graduate from LDC status on 2026-11-24; Solomon Islands on 2027-12-13.

The same country_groups.py file lives in both ghed-mcp and gho-mcp (canonical source: ghed-mcp), so a regional analysis behaves identically against either database.

Examples

Each block below shows a natural-language prompt and a sketch of the underlying tool calls.

Country profile

"Give me a Colombia health systems profile."

The assistant calls country_profile(country="Colombia") and returns life expectancy, HALE, IMR, U5MR, MMR, UHC index, DTP3 coverage, skilled birth attendance, doctor and nurse density, premature NCD mortality, and TB incidence — all latest year, both-sexes preferred.

Comparative LAC analysis

"Compare maternal mortality across the Andean countries since 2010."

The assistant calls:

compare_countries(
    indicator_code="MDG_0000000026",
    countries=["Colombia", "Ecuador", "Peru", "Bolivia", "Venezuela"],
    year_start=2010,
    latest_only=False,
    format="csv",
)

and gets a CSV ready to drop into any spreadsheet, statistical package, or charting tool.

Income-group gradient

"What's life expectancy by World Bank income group in 2021?"

The assistant calls compare_countries("WHOSIS_000001", countries=["WB_HI","WB_UMI","WB_LMI","WB_LI"], year_start=2021, year_end=2021, sex="both") and returns the textbook 16-year gap between high and low income groups.

From CSV output to analysis tools

compare_countries(..., format="csv") returns a CSV string under the csv key. Two common downstream paths:

To pandas — for time-series analysis or modelling:

import io, pandas as pd

# csv_text is the value of result["csv"] from compare_countries
df = pd.read_csv(io.StringIO(csv_text))
df["year"] = df["year"].astype(int)
df = df.dropna(subset=["value"]).pivot_table(
    index="year", columns="country_name", values="value"
)
df.plot(title="Life expectancy at birth, LAC")

To any external tool (Excel, Google Sheets, R, Stata, Tableau, charting platforms, etc.):

with open("data.csv", "w") as f:
    f.write(csv_text)

The columns country_code, country_name, year, sex, value, value_display, low, high, indicator_name are tidy-format-friendly and map cleanly into most analysis or visualization workflows. For wide-format / per-country columns, pivot first (pandas snippet above).

Advanced queries

The friendly tools cover sex disaggregation, country/region/income-group filtering, and year ranges. For everything else — wealth quintile, residence area, education level, indicator-specific Dim2 values — use get_indicator_data_raw:

get_indicator_data_raw(
    indicator_code="MDG_0000000026",
    filter="SpatialDim eq 'BRA' and Dim2 eq 'WEALTHQUINTILE_QUINTILE5'",
    select="SpatialDim,TimeDim,Dim2,NumericValue",
    top=20,
)

Inspect what disaggregations an indicator supports with describe_indicator_dimensions(indicator_code) first — it samples observations and lists every Dim1/Dim2 type and value seen in the data.

Topics covered by topics_index

  • health_outcomes — life expectancy, HALE, IMR, U5MR, MMR, adult mortality
  • service_coverage — UHC index, DTP3, measles, ANC, skilled birth attendance
  • health_workforce — doctors, nurses & midwives, dentists, pharmacists per 10k
  • health_financing — health spending as % GDP, OOP share, per-capita CHE
  • ncd_burden — premature NCD mortality, hypertension, obesity, smoking
  • infectious_diseases — TB, HIV, malaria, hepatitis, water access
  • child_health — stunting, wasting, exclusive breastfeeding, immunization
  • risk_factors — tobacco, alcohol, obesity, physical inactivity
  • mental_health — suicide, mental health workforce
  • environment_climate — PM2.5, WASH (water/sanitation/hygiene)
  • medicines_access — essential medicines availability
  • quality_safety — antimicrobial resistance, hospital safety proxies
  • equity_sdg — SDG-aligned indicators for equity framing

Development

pip install -e ".[dev]"
pytest

Tests mock the WHO API; no network access required for the standard suite. A weekly GitHub Actions workflow validates that the curated indicator codes still resolve against the live API and opens an issue if anything rots.

Limitations

  • The GHO OData feed is read-only and unauthenticated. Aggregate values (regional, income-group, global) are computed by WHO; this server does not recompute them.
  • Detailed health expenditure data lives in the separate GHED database — a few GHED indicators are mirrored in GHO but not the full set.
  • Some indicators are sparse for recent years; use describe_indicator_dimensions to inspect coverage before pulling.
  • The OData v3 endpoint is stable but ageing; if WHO migrates, this server will need a release.

About the WHO Global Health Observatory

The WHO Global Health Observatory (GHO) is the World Health Organization's central platform for global health statistics — what WHO describes as "a world of health data." It is the authoritative source of internationally comparable indicators on:

  • Sustainable Development Goals health monitoring (SDG 3 and related targets)
  • Universal Health Coverage — service coverage index, financial protection, essential medicines availability
  • Major disease burden — HIV, tuberculosis, malaria, hepatitis, NCDs, mental health
  • Health system inputs — workforce density, immunization coverage, health expenditure
  • Risk factors — tobacco, alcohol, obesity, air pollution, WASH
  • Equity dimensions — disaggregations by sex, age, residence, wealth quintile, and education where source data permits

The GHO underpins WHO's annual World Health Statistics report, regional health reviews, and country-level briefings used by ministries of health, multilateral institutions, and global health researchers worldwide. The data is free and openly published — through the OData API this server wraps, and through the official portal with its own visualizations, dashboards, and downloads.

This MCP server is plumbing. The data, the indicator definitions, the methodological work, and the country-level data validation are all WHO's. If you use values retrieved through this server, please:

  • Cite WHO as the source. The source block on every data response includes the exact endpoint, parameters, and retrieval timestamp to make this straightforward.
  • Visit the GHO portal for indicator metadata, methodology notes, and the official visualizations. The MCP exposes the data; the portal provides the canonical context.
  • Read the World Health Statistics annual report for WHO's curated narrative analysis of what the data shows.

The GHO is a public good. The most valuable contribution any user can make is to support and reference WHO's underlying data work.

Built by

Decilion — global health consulting across Latin America and the Caribbean, with an applied AI lens.

This server is one of Decilion's open-source contributions to the global health data community. If you use it in research, a brief acknowledgment is appreciated but not required.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选