@cyanheads/who-gho-mcp-server 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +391 -0
- package/Dockerfile +98 -0
- package/LICENSE +201 -0
- package/README.md +294 -0
- package/changelog/0.1.x/0.1.0.md +20 -0
- package/changelog/0.1.x/0.1.1.md +23 -0
- package/changelog/template.md +119 -0
- package/dist/config/server-config.d.ts +9 -0
- package/dist/config/server-config.d.ts.map +1 -0
- package/dist/config/server-config.js +28 -0
- package/dist/config/server-config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +36 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/resources/definitions/who-dimension-values.resource.d.ts +18 -0
- package/dist/mcp-server/resources/definitions/who-dimension-values.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/who-dimension-values.resource.js +41 -0
- package/dist/mcp-server/resources/definitions/who-dimension-values.resource.js.map +1 -0
- package/dist/mcp-server/resources/definitions/who-indicator-metadata.resource.d.ts +16 -0
- package/dist/mcp-server/resources/definitions/who-indicator-metadata.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/who-indicator-metadata.resource.js +44 -0
- package/dist/mcp-server/resources/definitions/who-indicator-metadata.resource.js.map +1 -0
- package/dist/mcp-server/tools/definitions/who-get-indicator-metadata.tool.d.ts +25 -0
- package/dist/mcp-server/tools/definitions/who-get-indicator-metadata.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/who-get-indicator-metadata.tool.js +112 -0
- package/dist/mcp-server/tools/definitions/who-get-indicator-metadata.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/who-list-dimension-values.tool.d.ts +24 -0
- package/dist/mcp-server/tools/definitions/who-list-dimension-values.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/who-list-dimension-values.tool.js +76 -0
- package/dist/mcp-server/tools/definitions/who-list-dimension-values.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/who-list-dimensions.tool.d.ts +12 -0
- package/dist/mcp-server/tools/definitions/who-list-dimensions.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/who-list-dimensions.tool.js +38 -0
- package/dist/mcp-server/tools/definitions/who-list-dimensions.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/who-list-indicators.tool.d.ts +17 -0
- package/dist/mcp-server/tools/definitions/who-list-indicators.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/who-list-indicators.tool.js +64 -0
- package/dist/mcp-server/tools/definitions/who-list-indicators.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/who-query-indicator-data.tool.d.ts +58 -0
- package/dist/mcp-server/tools/definitions/who-query-indicator-data.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/who-query-indicator-data.tool.js +215 -0
- package/dist/mcp-server/tools/definitions/who-query-indicator-data.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/who-search-indicators.tool.d.ts +23 -0
- package/dist/mcp-server/tools/definitions/who-search-indicators.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/who-search-indicators.tool.js +89 -0
- package/dist/mcp-server/tools/definitions/who-search-indicators.tool.js.map +1 -0
- package/dist/services/gho/gho-service.d.ts +50 -0
- package/dist/services/gho/gho-service.d.ts.map +1 -0
- package/dist/services/gho/gho-service.js +263 -0
- package/dist/services/gho/gho-service.js.map +1 -0
- package/dist/services/gho/types.d.ts +113 -0
- package/dist/services/gho/types.d.ts.map +1 -0
- package/dist/services/gho/types.js +6 -0
- package/dist/services/gho/types.js.map +1 -0
- package/package.json +79 -0
- package/server.json +99 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Casey Hand @cyanheads
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>@cyanheads/who-gho-mcp-server</h1>
|
|
3
|
+
<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>
|
|
4
|
+
<div>6 Tools • 2 Resources</div>
|
|
5
|
+
</p>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div align="center">
|
|
9
|
+
|
|
10
|
+
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/who-gho-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/who-gho-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div align="center">
|
|
15
|
+
|
|
16
|
+
[](https://github.com/cyanheads/who-gho-mcp-server/releases/latest/download/who-gho-mcp-server.mcpb) [](https://cursor.com/en/install-mcp?name=who-gho-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvd2hvLWdoby1tY3Atc2VydmVyIl19) [](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)
|
|
17
|
+
|
|
18
|
+
[](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Tools
|
|
25
|
+
|
|
26
|
+
6 tools for working with WHO Global Health Observatory data:
|
|
27
|
+
|
|
28
|
+
| Tool | Description |
|
|
29
|
+
|:---|:---|
|
|
30
|
+
| `who_search_indicators` | Search the GHO indicator catalog by keyword in indicator names |
|
|
31
|
+
| `who_list_indicators` | Browse the full indicator catalog with pagination |
|
|
32
|
+
| `who_get_indicator_metadata` | Fetch indicator names and supported filter dimensions for up to 10 codes |
|
|
33
|
+
| `who_list_dimensions` | List all dimension type codes available in the GHO API |
|
|
34
|
+
| `who_list_dimension_values` | List valid codes and labels for a dimension type (COUNTRY, REGION, SEX, etc.) |
|
|
35
|
+
| `who_query_indicator_data` | Query data rows for an indicator with spatial, temporal, and dimension filters |
|
|
36
|
+
|
|
37
|
+
### `who_search_indicators`
|
|
38
|
+
|
|
39
|
+
Search the WHO GHO indicator catalog by keyword.
|
|
40
|
+
|
|
41
|
+
- Substring match on indicator names — try terms like `"life expectancy"`, `"immunization"`, `"mortality"`, `"diabetes"`, or `"HIV"`
|
|
42
|
+
- Returns indicator codes and display names for use with `who_query_indicator_data`
|
|
43
|
+
- Reports total matches; suggests narrowing when the limit is reached
|
|
44
|
+
- Default limit 20, max 100
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### `who_list_indicators`
|
|
49
|
+
|
|
50
|
+
Browse the full indicator catalog with offset-based pagination.
|
|
51
|
+
|
|
52
|
+
- No keyword required — lists all 3,059+ indicators
|
|
53
|
+
- Pagination via `limit` (default 50, max 500) and `offset`
|
|
54
|
+
- Returns `total` and `hasMore` for iteration
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### `who_get_indicator_metadata`
|
|
59
|
+
|
|
60
|
+
Fetch metadata for one to ten indicator codes in a single call.
|
|
61
|
+
|
|
62
|
+
- Returns the full indicator name and the dimension types it supports (e.g. `COUNTRY`, `SEX`, `REGION`, `AGEGROUP`)
|
|
63
|
+
- Call before `who_query_indicator_data` to confirm which filter dimensions are valid
|
|
64
|
+
- Unresolved codes are reported in `notFound` rather than raising an error
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### `who_list_dimensions`
|
|
69
|
+
|
|
70
|
+
List all dimension type codes available in the GHO API.
|
|
71
|
+
|
|
72
|
+
- Returns every dimension type with its human-readable title
|
|
73
|
+
- Common types: `COUNTRY`, `REGION`, `SEX`, `WORLDBANKINCOMEGROUP`, `AGEGROUP`
|
|
74
|
+
- Use to discover codes before calling `who_list_dimension_values`
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
### `who_list_dimension_values`
|
|
79
|
+
|
|
80
|
+
List valid filter values for a single dimension type.
|
|
81
|
+
|
|
82
|
+
- Returns codes and labels for every value under the dimension (e.g. all 194 country ISO codes, all WHO region codes)
|
|
83
|
+
- Includes optional parent hierarchy fields (`parentCode`, `parentLabel`, `parentDimension`)
|
|
84
|
+
- Use to confirm exact codes before passing them to `who_query_indicator_data`
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### `who_query_indicator_data`
|
|
89
|
+
|
|
90
|
+
Query data rows for a single WHO GHO indicator.
|
|
91
|
+
|
|
92
|
+
- Spatial filters (mutually exclusive): `country_codes` (ISO 3166-1 alpha-3), `region_codes` (WHO regions), or `income_group_codes` (World Bank groups)
|
|
93
|
+
- Time range filter: `year_from` / `year_to`
|
|
94
|
+
- Sex filter: `SEX_BTSX` (both), `SEX_FMLE`, `SEX_MLE` — only applies when the indicator uses SEX as its first cross-cutting dimension
|
|
95
|
+
- Arbitrary `dim1_value` for indicators using non-SEX cross-cutting dimensions
|
|
96
|
+
- Optional uncertainty interval bounds (`low`/`high`) via `include_uncertainty` (default true)
|
|
97
|
+
- Default limit 200, max 1000; returns `totalRows` and `truncated` for handling large result sets
|
|
98
|
+
- Primary data tool in the find-then-query workflow
|
|
99
|
+
|
|
100
|
+
## Resources
|
|
101
|
+
|
|
102
|
+
| Type | URI | Description |
|
|
103
|
+
|:---|:---|:---|
|
|
104
|
+
| Resource | `who://indicator/{indicatorCode}/metadata` | Indicator name and supported filter dimensions for a single code |
|
|
105
|
+
| Resource | `who://dimension/{dimensionCode}/values` | All valid values for a dimension type |
|
|
106
|
+
|
|
107
|
+
## Recommended workflow
|
|
108
|
+
|
|
109
|
+
1. `who_search_indicators` — find indicator codes by keyword
|
|
110
|
+
2. `who_get_indicator_metadata` — confirm which filter dimensions the indicator supports
|
|
111
|
+
3. `who_query_indicator_data` — fetch data with country/region/year/sex filters
|
|
112
|
+
|
|
113
|
+
To look up filter codes: `who_list_dimensions` → `who_list_dimension_values`.
|
|
114
|
+
|
|
115
|
+
## Features
|
|
116
|
+
|
|
117
|
+
Built on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core):
|
|
118
|
+
|
|
119
|
+
- Declarative tool definitions — single file per tool, framework handles registration and validation
|
|
120
|
+
- Unified error handling across all tools
|
|
121
|
+
- Pluggable auth (`none`, `jwt`, `oauth`)
|
|
122
|
+
- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`
|
|
123
|
+
- Structured logging with optional OpenTelemetry tracing
|
|
124
|
+
- Runs locally (stdio/HTTP) or on Cloudflare Workers from the same codebase
|
|
125
|
+
|
|
126
|
+
WHO GHO-specific:
|
|
127
|
+
|
|
128
|
+
- 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
|
|
129
|
+
- Configurable base URL and request timeout for custom or mirrored deployments
|
|
130
|
+
- Parallel metadata fan-out for multi-code indicator lookups
|
|
131
|
+
|
|
132
|
+
Agent-friendly output:
|
|
133
|
+
|
|
134
|
+
- Tool descriptions encode the cross-tool workflow — agents discover the right call order from descriptions alone
|
|
135
|
+
- Structured truncation signaling (`truncated`, `truncatedNote`, `hasMore`) so agents can decide whether to paginate
|
|
136
|
+
- Discriminated error codes with `recovery` hints on every failure path
|
|
137
|
+
|
|
138
|
+
## Getting started
|
|
139
|
+
|
|
140
|
+
### Self-Hosted / Local
|
|
141
|
+
|
|
142
|
+
Add the following to your MCP client configuration file.
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{
|
|
146
|
+
"mcpServers": {
|
|
147
|
+
"who-gho": {
|
|
148
|
+
"type": "stdio",
|
|
149
|
+
"command": "bunx",
|
|
150
|
+
"args": ["@cyanheads/who-gho-mcp-server@latest"],
|
|
151
|
+
"env": {
|
|
152
|
+
"MCP_TRANSPORT_TYPE": "stdio",
|
|
153
|
+
"MCP_LOG_LEVEL": "info"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Or with npx (no Bun required):
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"mcpServers": {
|
|
165
|
+
"who-gho": {
|
|
166
|
+
"type": "stdio",
|
|
167
|
+
"command": "npx",
|
|
168
|
+
"args": ["-y", "@cyanheads/who-gho-mcp-server@latest"],
|
|
169
|
+
"env": {
|
|
170
|
+
"MCP_TRANSPORT_TYPE": "stdio",
|
|
171
|
+
"MCP_LOG_LEVEL": "info"
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Or with Docker:
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"mcpServers": {
|
|
183
|
+
"who-gho": {
|
|
184
|
+
"type": "stdio",
|
|
185
|
+
"command": "docker",
|
|
186
|
+
"args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/who-gho-mcp-server:latest"]
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
For Streamable HTTP, set the transport and start the server:
|
|
193
|
+
|
|
194
|
+
```sh
|
|
195
|
+
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
|
|
196
|
+
# Server listens at http://localhost:3010/mcp
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Prerequisites
|
|
200
|
+
|
|
201
|
+
- [Bun v1.3.2](https://bun.sh/) or higher (or Node.js ≥24).
|
|
202
|
+
- No API key required — the WHO GHO API is public.
|
|
203
|
+
|
|
204
|
+
### Installation
|
|
205
|
+
|
|
206
|
+
1. **Clone the repository:**
|
|
207
|
+
|
|
208
|
+
```sh
|
|
209
|
+
git clone https://github.com/cyanheads/who-gho-mcp-server.git
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
2. **Navigate into the directory:**
|
|
213
|
+
|
|
214
|
+
```sh
|
|
215
|
+
cd who-gho-mcp-server
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
3. **Install dependencies:**
|
|
219
|
+
|
|
220
|
+
```sh
|
|
221
|
+
bun install
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
## Configuration
|
|
225
|
+
|
|
226
|
+
All configuration is validated at startup via Zod schemas in `src/config/server-config.ts`. Key environment variables:
|
|
227
|
+
|
|
228
|
+
| Variable | Description | Default |
|
|
229
|
+
|:---|:---|:---|
|
|
230
|
+
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http` | `stdio` |
|
|
231
|
+
| `MCP_HTTP_PORT` | HTTP server port | `3010` |
|
|
232
|
+
| `MCP_HTTP_ENDPOINT_PATH` | HTTP endpoint path where the MCP server is mounted | `/mcp` |
|
|
233
|
+
| `MCP_PUBLIC_URL` | Public origin override for TLS-terminating reverse-proxy deployments | none |
|
|
234
|
+
| `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth` | `none` |
|
|
235
|
+
| `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`, etc.) | `info` |
|
|
236
|
+
| `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) |
|
|
237
|
+
| `LOGS_DIR` | Directory for log files (Node.js only) | `<project-root>/logs` |
|
|
238
|
+
| `STORAGE_PROVIDER_TYPE` | Storage backend: `in-memory`, `filesystem`, `supabase`, `cloudflare-kv/r2/d1` | `in-memory` |
|
|
239
|
+
| `GHO_BASE_URL` | WHO GHO OData API base URL (override for custom/mirrored deployments) | `https://ghoapi.azureedge.net/api/` |
|
|
240
|
+
| `GHO_REQUEST_TIMEOUT_MS` | HTTP request timeout in milliseconds | `30000` |
|
|
241
|
+
| `OTEL_ENABLED` | Enable OpenTelemetry | `false` |
|
|
242
|
+
|
|
243
|
+
## Running the server
|
|
244
|
+
|
|
245
|
+
### Local development
|
|
246
|
+
|
|
247
|
+
- **Build and run the production version**:
|
|
248
|
+
|
|
249
|
+
```sh
|
|
250
|
+
# One-time build
|
|
251
|
+
bun run rebuild
|
|
252
|
+
|
|
253
|
+
# Run the built server
|
|
254
|
+
bun run start:http
|
|
255
|
+
# or
|
|
256
|
+
bun run start:stdio
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
- **Run checks and tests**:
|
|
260
|
+
```sh
|
|
261
|
+
bun run devcheck # Lints, formats, type-checks, and more
|
|
262
|
+
bun run test # Runs the test suite
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## Project structure
|
|
266
|
+
|
|
267
|
+
| Directory | Purpose |
|
|
268
|
+
|:---|:---|
|
|
269
|
+
| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Six tools across indicator discovery, dimension lookup, and data queries. |
|
|
270
|
+
| `src/mcp-server/resources` | Resource definitions. Indicator metadata and dimension values resources. |
|
|
271
|
+
| `src/services/gho` | WHO GHO OData API service layer — HTTP client, query builder, types. |
|
|
272
|
+
| `src/config` | Server-specific environment variable parsing and validation with Zod. |
|
|
273
|
+
| `tests/` | Unit and integration tests, mirroring the `src/` structure. |
|
|
274
|
+
|
|
275
|
+
## Development guide
|
|
276
|
+
|
|
277
|
+
See [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:
|
|
278
|
+
|
|
279
|
+
- Handlers throw, framework catches — no `try/catch` in tool logic
|
|
280
|
+
- Use `ctx.log` for logging, `ctx.state` for storage
|
|
281
|
+
- Register new tools and resources in the `createApp()` arrays
|
|
282
|
+
|
|
283
|
+
## Contributing
|
|
284
|
+
|
|
285
|
+
Issues and pull requests are welcome. Run checks and tests before submitting:
|
|
286
|
+
|
|
287
|
+
```sh
|
|
288
|
+
bun run devcheck
|
|
289
|
+
bun run test
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## License
|
|
293
|
+
|
|
294
|
+
This project is licensed under the Apache 2.0 License. See the [LICENSE](./LICENSE) file for details.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Initial release — WHO GHO MCP server with 6 tools and 2 resources for the Global Health Observatory OData API"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.0 — 2026-05-23
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`who_search_indicators`** — keyword search across 3,059 GHO indicators by name substring.
|
|
12
|
+
- **`who_list_indicators`** — paginated browse of the full indicator catalog.
|
|
13
|
+
- **`who_get_indicator_metadata`** — batch dimension lookup for up to 10 indicator codes; strips `PUBLISHSTATE` internal dimension from output.
|
|
14
|
+
- **`who_query_indicator_data`** — primary data tool; queries a single indicator with country/region/income-group/year/sex/dim1 filters via OData; raises `ambiguous_spatial_filter` when more than one spatial type is provided.
|
|
15
|
+
- **`who_list_dimension_values`** — valid values for any GHO dimension type (COUNTRY, SEX, AGEGROUP, WORLDBANKINCOMEGROUP, etc.).
|
|
16
|
+
- **`who_list_dimensions`** — full list of GHO dimension type codes and titles.
|
|
17
|
+
- **`who://indicator/{indicatorCode}/metadata`** resource — indicator metadata by URI.
|
|
18
|
+
- **`who://dimension/{dimensionCode}/values`** resource — dimension values by URI.
|
|
19
|
+
- **`GhoService`** — OData API client with retry, timeout, HTML-error-page detection, and `PUBLISHSTATE` filtering.
|
|
20
|
+
- **`GHO_BASE_URL`** / **`GHO_REQUEST_TIMEOUT_MS`** env vars for API URL override and request timeout.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Initial public release — WHO GHO MCP server, 6 tools and 2 resources for 3,059 Global Health Observatory indicators across 194 member states"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.1 — 2026-05-23
|
|
8
|
+
|
|
9
|
+
First npm-published release. Packages the full WHO Global Health Observatory integration: OData API client, tool and resource surface, install badges, and bundling support.
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
- **`who_search_indicators`** — keyword search across 3,059 GHO indicators by name substring.
|
|
14
|
+
- **`who_list_indicators`** — paginated browse of the full indicator catalog.
|
|
15
|
+
- **`who_get_indicator_metadata`** — batch dimension lookup for up to 10 indicator codes; strips `PUBLISHSTATE` internal dimension from output.
|
|
16
|
+
- **`who_query_indicator_data`** — primary data tool; queries a single indicator with country/region/income-group/year/sex/dim1 filters via OData; raises `ambiguous_spatial_filter` when more than one spatial type is provided.
|
|
17
|
+
- **`who_list_dimension_values`** — valid values for any GHO dimension type (COUNTRY, SEX, AGEGROUP, WORLDBANKINCOMEGROUP, etc.).
|
|
18
|
+
- **`who_list_dimensions`** — full list of GHO dimension type codes and titles.
|
|
19
|
+
- **`who://indicator/{indicatorCode}/metadata`** resource — indicator metadata by URI.
|
|
20
|
+
- **`who://dimension/{dimensionCode}/values`** resource — dimension values by URI.
|
|
21
|
+
- **`GhoService`** — OData API client with retry, timeout, HTML-error-page detection, and `PUBLISHSTATE` filtering.
|
|
22
|
+
- **`GHO_BASE_URL`** / **`GHO_REQUEST_TIMEOUT_MS`** env vars for API URL override and request timeout.
|
|
23
|
+
- `manifest.json` for MCPB bundle support; install badges for Claude Desktop, Cursor, and VS Code.
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
# FORMAT REFERENCE — do not edit. Copy this file to
|
|
3
|
+
# `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.8.x/0.8.6.md`)
|
|
4
|
+
# to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
|
|
5
|
+
# with a concrete date.
|
|
6
|
+
|
|
7
|
+
# Required. One-line GitHub Release-style headline. 350 character cap.
|
|
8
|
+
# Default short and scannable. Don't pad, don't stitch unrelated changes with
|
|
9
|
+
# semicolons — pick the headline. Quotes required: unquoted YAML treats `: `
|
|
10
|
+
# inside the value as a key separator and fails GitHub's strict parser.
|
|
11
|
+
summary: ""
|
|
12
|
+
|
|
13
|
+
# Set `true` when consumers must change code to upgrade: API removals,
|
|
14
|
+
# signature changes, config renames, behavior changes that break existing
|
|
15
|
+
# usage. Flagged as `Breaking` in the rollup.
|
|
16
|
+
breaking: false
|
|
17
|
+
|
|
18
|
+
# Set `true` if this release contains any security fix. Pairs with the
|
|
19
|
+
# `## Security` section below. Flagged as `Security` in the rollup so
|
|
20
|
+
# users can triage upgrade urgency at a glance.
|
|
21
|
+
security: false
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
# <version> — YYYY-MM-DD
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
AUTHORING GUIDE — applies to the new per-version file you create from this
|
|
28
|
+
template.
|
|
29
|
+
|
|
30
|
+
Audience: someone scanning release notes to decide what affects them. Lead
|
|
31
|
+
each bullet with the symbol or concept name in **bold** so they can skip
|
|
32
|
+
what's irrelevant and zoom in on what's not.
|
|
33
|
+
|
|
34
|
+
Tone: terse, fact-dense, not verbose. Default to one sentence per bullet —
|
|
35
|
+
name the symbol, state what changed, stop. Use a second sentence only when
|
|
36
|
+
it carries weight. If a bullet feels long, it is.
|
|
37
|
+
|
|
38
|
+
Cut: mechanism walkthroughs (those belong in JSDoc, AGENTS.md, or the
|
|
39
|
+
relevant skill), ceremonial framings ("This release introduces…",
|
|
40
|
+
backwards-compat paragraphs), file-by-file test enumerations, internal
|
|
41
|
+
implementation notes. Prefer code/symbol names over English re-explanations.
|
|
42
|
+
|
|
43
|
+
Narrative intro: skip by default. Add one short sentence only when the
|
|
44
|
+
release theme genuinely needs framing the bullets can't carry.
|
|
45
|
+
|
|
46
|
+
Sections: Keep a Changelog order — Added, Changed, Deprecated, Removed,
|
|
47
|
+
Fixed, Security. Include only sections with entries; delete the rest
|
|
48
|
+
(including the commented-out scaffolding below). Don't ship empty headers.
|
|
49
|
+
|
|
50
|
+
Include: every distinct fact a reader needs to adopt or audit the release —
|
|
51
|
+
new exports, signatures, lint rule IDs, env vars, breaking changes, version
|
|
52
|
+
bumps on shipped skills. Nothing more.
|
|
53
|
+
|
|
54
|
+
Links: link issues, PRs, docs, or skills where they help a reader jump to
|
|
55
|
+
context. Once per item per entry — don't re-link the same issue in summary,
|
|
56
|
+
narrative, and bullet. Skip links for inline symbol names; code spans speak
|
|
57
|
+
for themselves.
|
|
58
|
+
|
|
59
|
+
Issue/PR URLs: use full URLs. GitHub's bare `#NN` auto-link only resolves
|
|
60
|
+
inside its own UI, not in npm reads or local editors.
|
|
61
|
+
|
|
62
|
+
[#38](https://github.com/cyanheads/mcp-ts-core/issues/38) ← issue
|
|
63
|
+
[#42](https://github.com/cyanheads/mcp-ts-core/pull/42) ← PR
|
|
64
|
+
|
|
65
|
+
Verify numbers exist before linking (`gh issue view NN`, `gh pr view NN`).
|
|
66
|
+
Never speculate on a future number — `#42` for an upcoming PR silently
|
|
67
|
+
resolves to whatever real item already owns 42, and timeline previews pull
|
|
68
|
+
in that unrelated item's metadata.
|
|
69
|
+
|
|
70
|
+
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
71
|
+
via `gh release create --notes-from-tag`. The tag is a derivative of this
|
|
72
|
+
changelog entry — a condensed, scannable version, not a copy. Format:
|
|
73
|
+
|
|
74
|
+
<theme — omit version number, GitHub prepends it>
|
|
75
|
+
← blank line
|
|
76
|
+
<1-2 sentence context: what this release does>
|
|
77
|
+
← blank line
|
|
78
|
+
Dependency bumps: ← section header
|
|
79
|
+
← blank line
|
|
80
|
+
- `@cyanheads/mcp-ts-core` ^0.9.1 → ^0.9.6 ← bullet
|
|
81
|
+
← blank line
|
|
82
|
+
Changed: ← only sections with entries
|
|
83
|
+
← blank line
|
|
84
|
+
- `format()` output includes `query` in text mode
|
|
85
|
+
← blank line
|
|
86
|
+
Added:
|
|
87
|
+
← blank line
|
|
88
|
+
- `manifest.json` scaffolded for MCPB bundle support
|
|
89
|
+
- Install badges (Claude Desktop, Cursor, VS Code)
|
|
90
|
+
← blank line
|
|
91
|
+
<N> tests pass; `bun run devcheck` clean. ← footer
|
|
92
|
+
|
|
93
|
+
Never a flat comma-separated string. Always structured markdown with
|
|
94
|
+
sections. The tag must scan well as a rendered GitHub Release page.
|
|
95
|
+
-->
|
|
96
|
+
|
|
97
|
+
## Added
|
|
98
|
+
|
|
99
|
+
-
|
|
100
|
+
|
|
101
|
+
## Changed
|
|
102
|
+
|
|
103
|
+
-
|
|
104
|
+
|
|
105
|
+
<!-- ## Deprecated
|
|
106
|
+
|
|
107
|
+
- -->
|
|
108
|
+
|
|
109
|
+
<!-- ## Removed
|
|
110
|
+
|
|
111
|
+
- -->
|
|
112
|
+
|
|
113
|
+
## Fixed
|
|
114
|
+
|
|
115
|
+
-
|
|
116
|
+
|
|
117
|
+
<!-- ## Security
|
|
118
|
+
|
|
119
|
+
- -->
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Server-specific environment configuration for the WHO GHO MCP server.
|
|
3
|
+
* @module config/server-config
|
|
4
|
+
*/
|
|
5
|
+
export declare function getServerConfig(): {
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
requestTimeoutMs: number;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=server-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,wBAAgB,eAAe;;;EAM9B"}
|