{
  "markdown": "<div align=\"center\">\n  <h1>@cyanheads/who-gho-mcp-server</h1>\n  <p><b>Query WHO Global Health Observatory data — 3,059 indicators across 194 member states with country, region, year, and sex filters via MCP. STDIO or Streamable HTTP.</b>\n  <div>6 Tools • 2 Resources</div>\n  </p>\n</div>\n\n<div align=\"center\">\n\n[![Version](https://img.shields.io/badge/Version-0.3.4-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/who-gho-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.30.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/who-gho-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/who-gho-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)\n\n</div>\n\n<div align=\"center\">\n\n[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/who-gho-mcp-server/releases/latest/download/who-gho-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=who-gho-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvd2hvLWdoby1tY3Atc2VydmVyIl19) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22who-gho-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fwho-gho-mcp-server%22%5D%7D)\n\n[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)\n\n**Public Hosted Server:** [https://who-gho.caseyjhand.com/mcp](https://who-gho.caseyjhand.com/mcp)\n\n</div>\n\n---\n\n## Tools\n\n6 tools for working with WHO Global Health Observatory data:\n\n| Tool | Description |\n|:---|:---|\n| `who_search_indicators` | Search the GHO indicator catalog by keyword in indicator names |\n| `who_list_indicators` | Browse the full indicator catalog with pagination |\n| `who_get_indicator_metadata` | Fetch indicator names and supported filter dimensions for up to 10 codes |\n| `who_list_dimensions` | List all dimension type codes available in the GHO API |\n| `who_list_dimension_values` | List valid codes and labels for a dimension type (COUNTRY, REGION, SEX, etc.) |\n| `who_query_indicator_data` | Query data rows for an indicator with spatial, temporal, and dimension filters |\n\n### `who_search_indicators`\n\nSearch the WHO GHO indicator catalog by keyword.\n\n- Substring match on indicator names — try terms like `\"life expectancy\"`, `\"immunization\"`, `\"mortality\"`, `\"diabetes\"`, or `\"HIV\"`\n- Returns indicator codes and display names for use with `who_query_indicator_data`\n- Offset-based pagination (`offset`) over the filtered result set; reports `totalCount`, `hasMore`, `pageInfo`, `nextOffset`\n- Default limit 20, max 100\n\n---\n\n### `who_list_indicators`\n\nBrowse the full indicator catalog with offset-based pagination.\n\n- No keyword required — lists all 3,059+ indicators\n- Pagination via `limit` (default 50, max 500) and `offset`\n- Returns `total` and `hasMore` for iteration\n\n---\n\n### `who_get_indicator_metadata`\n\nFetch metadata for one to ten indicator codes in a single call.\n\n- Returns the full indicator name and the dimension types it supports (e.g. `COUNTRY`, `SEX`, `REGION`, `AGEGROUP`)\n- Call before `who_query_indicator_data` to confirm which filter dimensions are valid\n- Roughly 1,300 catalog indicators have no dimension listing upstream — those return `dimensions: []` plus a `dimensionsNote` pointing at `dim1Type`/`dim2Type` on a sample data row, not a not-found\n- Codes absent from the catalog are reported in `notFound` rather than raising an error\n\n---\n\n### `who_list_dimensions`\n\nList all dimension type codes available in the GHO API.\n\n- Returns every dimension type with its human-readable title\n- Common types: `COUNTRY`, `REGION`, `SEX`, `WORLDBANKINCOMEGROUP`, `AGEGROUP`\n- Use to discover codes before calling `who_list_dimension_values`\n\n---\n\n### `who_list_dimension_values`\n\nList valid filter values for a single dimension type.\n\n- Returns codes and labels for the dimension's values (e.g. the 234 country entries, the 43 WHO region codes)\n- Includes optional parent hierarchy fields (`parentCode`, `parentLabel`, `parentDimension`)\n- `parent_code` narrows hierarchical dimensions — `dimension: \"COUNTRY\"`, `parent_code: \"EUR\"` returns the 58 country entries in the WHO European Region\n- Deterministic ordering by `Code` with offset-based pagination (`offset`); returns `totalCount`, `hasMore`, `pageInfo`, `nextOffset`\n- Default limit 100, max 500 — `GHO` (3,103 values) and `DHSMICSGEOREGION` (4,932) need paging\n- A `parent_code` that matches nothing returns an empty page, not an error; only an unfiltered empty result means the dimension does not exist\n- Use to confirm exact codes before passing them to `who_query_indicator_data`\n\n---\n\n### `who_query_indicator_data`\n\nQuery data rows for a single WHO GHO indicator.\n\n- Spatial filters (mutually exclusive): `country_codes` (ISO 3166-1 alpha-3), `region_codes` (WHO regions), or `income_group_codes` (World Bank groups)\n- Time range filter: `year_from` / `year_to`\n- Sex filter: `SEX_BTSX` (both), `SEX_FMLE`, `SEX_MLE` — only applies when the indicator uses SEX as its first cross-cutting dimension\n- Arbitrary `dim1_value` for indicators using non-SEX cross-cutting dimensions\n- Optional uncertainty interval bounds (`low`/`high`) via `include_uncertainty` (default true)\n- Deterministic row ordering (`sort`: `year_desc` default or `year_asc`) with offset-based pagination (`offset`); returns `totalRows`, `hasMore`, `pageInfo`, `nextOffset`\n- Default limit 200, max 1000\n- Primary data tool in the find-then-query workflow\n\n## Resources\n\n| Type | URI | Description |\n|:---|:---|:---|\n| Resource | `who://indicator/{indicatorCode}/metadata` | Indicator name and supported filter dimensions for a single code |\n| Resource | `who://dimension/{dimensionCode}/values` | First 100 values for a dimension type |\n| Resource | `who://dimension/{dimensionCode}/values{?limit,offset}` | One explicit page of a dimension type's values |\n| Resource | `who://dimension/{dimensionCode}/values{?limit,offset,parentCode}` | One explicit page, narrowed to a parent code |\n\nThe three dimension-value URIs are registered separately because the MCP SDK's RFC 6570 matcher treats every query variable as required — a single template with optional variables would stop matching the bare URI. Supply every variable a template names.\n\n## Recommended workflow\n\n1. `who_search_indicators` — find indicator codes by keyword\n2. `who_get_indicator_metadata` — confirm which filter dimensions the indicator supports\n3. `who_query_indicator_data` — fetch data with country/region/year/sex filters\n\nTo look up filter codes: `who_list_dimensions` → `who_list_dimension_values`.\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core):\n\n- Declarative tool definitions — single file per tool, framework handles registration and validation\n- Unified error handling across all tools\n- Pluggable auth (`none`, `jwt`, `oauth`)\n- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`\n- Structured logging with optional OpenTelemetry tracing\n- Runs locally (stdio/HTTP) or on Cloudflare Workers from the same codebase\n\nWHO GHO-specific:\n\n- Full coverage of the [WHO GHO OData API v2](https://www.who.int/data/gho/info/gho-odata-api) — indicators, dimensions, dimension values, and data queries\n- Configurable base URL and request timeout for custom or mirrored deployments\n- Parallel metadata fan-out for multi-code indicator lookups\n\nAgent-friendly output:\n\n- Tool descriptions encode the cross-tool workflow — agents discover the right call order from descriptions alone\n- Structured truncation signaling (`truncated`, `truncatedNote`, `hasMore`) so agents can decide whether to paginate\n- Discriminated error codes with `recovery` hints on every failure path\n\n## Getting started\n\n### Self-Hosted / Local\n\nAdd the following to your MCP client configuration file.\n\n```json\n{\n  \"mcpServers\": {\n    \"who-gho-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"@cyanheads/who-gho-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"who-gho-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cyanheads/who-gho-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"who-gho-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"-e\", \"MCP_TRANSPORT_TYPE=stdio\", \"ghcr.io/cyanheads/who-gho-mcp-server:latest\"]\n    }\n  }\n}\n```\n\nFor Streamable HTTP, set the transport and start the server:\n\n```sh\nMCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http\n# Server listens at http://localhost:3010/mcp\n```\n\n### Prerequisites\n\n- [Bun v1.3.0](https://bun.sh/) or higher (or Node.js ≥24).\n- No API key required — the WHO GHO API is public.\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/who-gho-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd who-gho-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n## Configuration\n\nAll configuration is validated at startup via Zod schemas in `src/config/server-config.ts`. Key environment variables:\n\n| Variable | Description | Default |\n|:---|:---|:---|\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http` | `stdio` |\n| `MCP_HTTP_PORT` | HTTP server port | `3010` |\n| `MCP_HTTP_ENDPOINT_PATH` | HTTP endpoint path where the MCP server is mounted | `/mcp` |\n| `MCP_PUBLIC_URL` | Public origin override for TLS-terminating reverse-proxy deployments | none |\n| `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth` | `none` |\n| `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`, etc.) | `info` |\n| `MCP_GC_PRESSURE_INTERVAL_MS` | Opt-in Bun-only forced-GC pressure loop (ms). Try `60000` if RSS grows under sustained HTTP load. | `0` (disabled) |\n| `LOGS_DIR` | Directory for log files (Node.js only) | `<project-root>/logs` |\n| `STORAGE_PROVIDER_TYPE` | Storage backend: `in-memory`, `filesystem`, `supabase`, `cloudflare-kv/r2/d1` | `in-memory` |\n| `GHO_BASE_URL` | WHO GHO OData API base URL (override for custom/mirrored deployments) | `https://ghoapi.azureedge.net/api/` |\n| `GHO_REQUEST_TIMEOUT_MS` | HTTP request timeout in milliseconds | `30000` |\n| `OTEL_ENABLED` | Enable OpenTelemetry | `false` |\n\n## Running the server\n\n### Local development\n\n- **Build and run the production version**:\n\n  ```sh\n  # One-time build\n  bun run rebuild\n\n  # Run the built server\n  bun run start:http\n  # or\n  bun run start:stdio\n  ```\n\n- **Run checks and tests**:\n  ```sh\n  bun run devcheck  # Lints, formats, type-checks, and more\n  bun run test      # Runs the test suite\n  ```\n\n## Project structure\n\n| Directory | Purpose |\n|:---|:---|\n| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Six tools across indicator discovery, dimension lookup, and data queries. |\n| `src/mcp-server/resources` | Resource definitions. Indicator metadata and dimension values resources. |\n| `src/services/gho` | WHO GHO OData API service layer — HTTP client, query builder, types. |\n| `src/config` | Server-specific environment variable parsing and validation with Zod. |\n| `tests/` | Unit and integration tests, mirroring the `src/` structure. |\n\n## Development guide\n\nSee [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:\n\n- Handlers throw, framework catches — no `try/catch` in tool logic\n- Use `ctx.log` for logging, `ctx.state` for storage\n- Register new tools and resources in the `createApp()` arrays\n\n## Contributing\n\nIssues and pull requests are welcome. Run checks and tests before submitting:\n\n```sh\nbun run devcheck\nbun run test\n```\n\n## License\n\nThis project is licensed under the Apache 2.0 License. See the [LICENSE](./LICENSE) file for details.\n",
  "bytes": 12888,
  "sha": "d88db161f4b4f32f44ab9415e74fe3b098676b7355efbef0ee51ccb87d31c973",
  "repo_slug": "cyanheads/who-gho-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cyanheads_who_gho_mcp_server_9bca6275/readme"
}