medical-terminologies-mcp 2.2.0 → 2.3.0

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/NOTICE.md CHANGED
@@ -104,8 +104,8 @@ channel as well.
104
104
 
105
105
  MeSH content is a U.S. government work served under the
106
106
  [NLM Terms and Conditions](https://www.nlm.nih.gov/databases/download/terms_and_conditions.html),
107
- free of charge. Credit: **Courtesy of the U.S. National Library of
108
- Medicine.** No endorsement by NLM is implied.
107
+ free of charge. The NLM statement in section 5 applies to this channel as
108
+ well; no endorsement by NLM is implied.
109
109
 
110
110
  ## 8. SNOMED CT (SNOMED International) — retired in 2.0.0
111
111
 
package/README.md CHANGED
@@ -466,7 +466,7 @@ ATC classification © WHO Collaborating Centre for Drug Statistics Methodology (
466
466
 
467
467
  ### MeSH
468
468
 
469
- MeSH is a U.S. government work served under the [NLM Terms and Conditions](https://www.nlm.nih.gov/databases/download/terms_and_conditions.html). Courtesy of the U.S. National Library of Medicine.
469
+ MeSH is a U.S. government work served free of charge under the [NLM Terms and Conditions](https://www.nlm.nih.gov/databases/download/terms_and_conditions.html). The NLM statement above (RxNorm) applies to this channel as well.
470
470
 
471
471
  ## Surface fingerprint, checkable from the registry
472
472
 
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ function unknownCursorError(message) {
30
30
  var package_default = {
31
31
  name: "medical-terminologies-mcp",
32
32
  mcpName: "io.github.SidneyBissoli/medical-terminologies-mcp",
33
- version: "2.2.0",
33
+ version: "2.3.0",
34
34
  description: "Unified MCP server for six medical terminologies (ICD-11, LOINC, RxNorm, MeSH, ATC, CID-10) with authoritative WHO ICD-10\u2192ICD-11 mapping. 33 tools, hosted endpoint available, MIT.",
35
35
  author: "Sidney da Silva Pereira Bissoli",
36
36
  license: "MIT",
@@ -97,10 +97,10 @@ var package_default = {
97
97
  devDependencies: {
98
98
  "@modelcontextprotocol/client": "^2.0.0",
99
99
  "@sbissoli/mcp-evals": "^0.2.1",
100
- "@sbissoli/mcp-surface": "^0.5.0",
100
+ "@sbissoli/mcp-surface": "^0.6.0",
101
101
  "@types/node": "^26.5.1",
102
102
  esbuild: "^0.28.2",
103
- nock: "^14.0.15",
103
+ nock: "^15.0.1",
104
104
  "pino-pretty": "^13.1.3",
105
105
  tsx: "^4.23.13",
106
106
  typescript: "^7.0.2",
@@ -1339,9 +1339,8 @@ var HttpError = class extends Error {
1339
1339
  this.data = opts.data;
1340
1340
  }
1341
1341
  };
1342
- async function parseBody(response) {
1343
- const text = await response.text();
1344
- if (text.length === 0) {
1342
+ function parseBody(text) {
1343
+ if (text === void 0 || text.length === 0) {
1345
1344
  return void 0;
1346
1345
  }
1347
1346
  try {
@@ -1378,7 +1377,7 @@ async function translateUpstreamError(error, timeoutMs) {
1378
1377
  return new HttpError(`malformed upstream response${after}`, { status: error.status });
1379
1378
  default: {
1380
1379
  const status = error.status ?? error.response?.status;
1381
- const data = error.response ? await parseBody(error.response) : error.body;
1380
+ const data = parseBody(error.body);
1382
1381
  return new HttpError(`Request failed with status code ${status}${after}`, { status, data });
1383
1382
  }
1384
1383
  }
@@ -1409,9 +1408,9 @@ var HttpClient = class {
1409
1408
  const fullUrl = this.buildUrl(url, options.params);
1410
1409
  const timeout = options.timeout ?? this.config.timeout ?? UPSTREAM_POLICY.timeoutMs[this.config.source];
1411
1410
  const headers = { ...this.config.headers, ...options.headers };
1412
- let response;
1411
+ let text;
1413
1412
  try {
1414
- response = await upstreamCallFor(this.config.source).response(fullUrl, {
1413
+ text = await upstreamCallFor(this.config.source).text(fullUrl, {
1415
1414
  method,
1416
1415
  headers,
1417
1416
  body,
@@ -1420,7 +1419,7 @@ var HttpClient = class {
1420
1419
  } catch (error) {
1421
1420
  throw await translateUpstreamError(error, timeout);
1422
1421
  }
1423
- return { data: await parseBody(response), status: response.status };
1422
+ return { data: parseBody(text) };
1424
1423
  }
1425
1424
  };
1426
1425
 
@@ -1735,7 +1734,7 @@ var WHOClient = class {
1735
1734
  }
1736
1735
  });
1737
1736
  const duration = Date.now() - startTime;
1738
- log.debug({ status: response.status, duration }, "HTTP response OK");
1737
+ log.debug({ duration }, "HTTP response OK");
1739
1738
  return response.data;
1740
1739
  } catch (error) {
1741
1740
  if (error instanceof HttpError) {
@@ -2021,11 +2020,14 @@ var provenanceContext = createProvenanceContext({
2021
2020
  locale: "en",
2022
2021
  timezone: "utc",
2023
2022
  defaultMode: "concise",
2024
- // Contract 1.2 (`field_sources` when a response joins sub-sources). This
2025
- // server never passes `field_sources` — multi-source responses carry one
2026
- // block per source — so the concise block, `_meta` and footer stay
2027
- // byte-identical to 1.1; only the canonical `contract_version` moves.
2028
- contractVersion: "1.2"
2023
+ // Contract 1.3 since step two of it (the imported schema accepted 1.3 since
2024
+ // 2.2.0): the concise block carries `revision` always (every preset sets
2025
+ // it), `notices` when the source has a caveat about the DATA, and `derived`
2026
+ // + `derivation_note` when this server computed — absent, not empty, when
2027
+ // there is nothing to say. License statements are NOT notices: they live in
2028
+ // NOTICE.md, the README and `info://licenses`. This server never passes
2029
+ // `field_sources` (1.2) — multi-source responses carry one block per source.
2030
+ contractVersion: "1.3"
2029
2031
  });
2030
2032
  var PROVENANCE_META_KEY = provenanceContext.metaKeys.provenance;
2031
2033
  var ATTRIBUTION_META_KEY = provenanceContext.metaKeys.attribution;
@@ -2049,9 +2051,10 @@ var MEDICAL_SOURCES = {
2049
2051
  // §1.3 of the ICD-11 license fixes this citation; the retrieval clause
2050
2052
  // is additive (marked as ours per §1.2.5).
2051
2053
  citation: (date) => `International Classification of Diseases, Eleventh Revision (ICD-11), World Health Organization (WHO) 2019. https://icd.who.int/browse11. Licensed under the Creative Commons Attribution-NoDerivatives 3.0 IGO licence (CC BY-ND 3.0 IGO). Retrieved via the WHO ICD-API on ${date}.`,
2052
- notices: [
2053
- "ICD-11 content is served verbatim with code, title, and URI preserved (license \xA71.2.2\u20131.2.3)."
2054
- ],
2054
+ // Verbatim service with code, title and URI (license §1.2.2–1.2.3) is how
2055
+ // this server complies with the license — stated in `info://licenses`, not
2056
+ // a caveat about the data.
2057
+ notices: [],
2055
2058
  cachePrefixes: ["icd11"],
2056
2059
  defaultVintage: () => getEnv("WHO_ICD11_RELEASE_ID") ?? WHO_ICD11_DEFAULT_RELEASE,
2057
2060
  revision: { status: "current", note: "WHO publishes a new ICD-11 release annually (usually Jan-Feb); this server queries one pinned release." }
@@ -2111,7 +2114,7 @@ var MEDICAL_SOURCES = {
2111
2114
  verified_at: VERIFIED_AT
2112
2115
  },
2113
2116
  citation: (date) => `RxNorm, U.S. National Library of Medicine. Retrieved via the NLM RxNav API on ${date}.`,
2114
- notices: [NLM_STATEMENT],
2117
+ notices: [],
2115
2118
  cachePrefixes: ["rxnorm"],
2116
2119
  defaultVintage: () => null,
2117
2120
  revision: { status: "current", note: "RxNorm is released monthly (first Monday); concepts update with each release." }
@@ -2130,7 +2133,7 @@ var MEDICAL_SOURCES = {
2130
2133
  verified_at: VERIFIED_AT
2131
2134
  },
2132
2135
  citation: (date) => `ATC classification \xA9 WHO Collaborating Centre for Drug Statistics Methodology, served via NLM RxClass. Retrieved on ${date}.`,
2133
- notices: [NLM_STATEMENT],
2136
+ notices: [],
2134
2137
  // ATC shares the RxNorm client/host, so its accesses land on the same
2135
2138
  // cache prefix; the aggregation is per-host, which is honest here.
2136
2139
  cachePrefixes: ["rxnorm"],
@@ -2145,13 +2148,13 @@ var MEDICAL_SOURCES = {
2145
2148
  sourceUrl: () => "https://id.nlm.nih.gov/mesh",
2146
2149
  license: {
2147
2150
  id: null,
2148
- name: 'NLM Terms and Conditions \u2014 U.S. government work, no charges or royalties; credit "Courtesy of the U.S. National Library of Medicine" required',
2151
+ name: "NLM Terms and Conditions \u2014 MeSH is a U.S. government work, free of charge",
2149
2152
  url: null,
2150
2153
  terms_url: "https://www.nlm.nih.gov/databases/download/terms_and_conditions.html",
2151
2154
  verified_at: VERIFIED_AT
2152
2155
  },
2153
- citation: (date) => `MeSH (Medical Subject Headings). Courtesy of the U.S. National Library of Medicine. Retrieved via the MeSH Linked Data API on ${date}.`,
2154
- notices: [NLM_STATEMENT],
2156
+ citation: (date) => `MeSH (Medical Subject Headings), U.S. National Library of Medicine. Retrieved via the MeSH Linked Data API on ${date}.`,
2157
+ notices: [],
2155
2158
  cachePrefixes: ["mesh"],
2156
2159
  defaultVintage: () => null,
2157
2160
  revision: { status: "current", note: "MeSH is released annually (November)." }
@@ -2170,7 +2173,7 @@ var MEDICAL_SOURCES = {
2170
2173
  verified_at: VERIFIED_AT
2171
2174
  },
2172
2175
  citation: (date) => `LOINC content retrieved via the NLM Clinical Tables API on ${date}. ${LOINC_NOTICE}`,
2173
- notices: [LOINC_NOTICE, NLM_STATEMENT],
2176
+ notices: [],
2174
2177
  cachePrefixes: ["loinc"],
2175
2178
  defaultVintage: () => null,
2176
2179
  revision: { status: "current", note: "LOINC is released bi-annually; the release served varies by NLM update cycle." }
@@ -2256,7 +2259,7 @@ var BLOCK_DESCRIPTIONS = {
2256
2259
  citation: "Ready-to-use citation/attribution string",
2257
2260
  license: "License / legal regime of the data",
2258
2261
  field_sources: "Present only when the response joins parts from different origins or extraction instants: for each group of fields, its URL, extraction instant and whether it came from cache. Absent in single-origin responses",
2259
- notices: "Notices the source publishes alongside the data (license statements, caveats), verbatim. Absent when there is none",
2262
+ notices: "Caveats the source publishes about the data, verbatim (license statements are not repeated here; see the info://licenses resource). Absent when there is none",
2260
2263
  derived: "Present (true) only when this server computed the value (e.g. a ranking or summary statistics) instead of passing on what the source returned",
2261
2264
  derivation_note: "What this server computed; present together with derived",
2262
2265
  revision: "Whether the data can still change at the source: current = the version in force, the source may revise it; provisional = preliminary; final = will not change. Absent when unknown"
@@ -7311,7 +7314,8 @@ with the server** (CID-10 V2008 and the WHO ICD-10 \u2192 ICD-11 transition
7311
7314
  tables), which are NOT covered by the MIT license. Every successful tool
7312
7315
  response carries a provenance block (source, URL, data vintage,
7313
7316
  extraction instant, citation, license); this resource is the
7314
- consolidated notice for the hosted service. The full text ships as
7317
+ consolidated notice for the hosted service \u2014 the license statements below
7318
+ are not repeated in each response's notices. The full text ships as
7315
7319
  NOTICE.md in the npm package.
7316
7320
 
7317
7321
  ## ICD-11 (WHO)
@@ -7369,12 +7373,15 @@ NOTICE.md in the npm package.
7369
7373
  - ATC classification \xA9 WHO Collaborating Centre for Drug Statistics
7370
7374
  Methodology (https://atcddd.fhi.no/); retrieved via NLM RxClass and
7371
7375
  served verbatim. This server never redistributes the WHOCC ATC/DDD
7372
- index itself.
7376
+ index itself. The NLM statement in the RxNorm section applies to the
7377
+ RxClass channel as well.
7373
7378
  - No authentication required to query.
7374
7379
 
7375
7380
  ## MeSH (US National Library of Medicine)
7376
- - U.S. government work under the NLM Terms and Conditions, free of
7377
- charge. Courtesy of the U.S. National Library of Medicine.
7381
+ - U.S. government work under the NLM Terms and Conditions
7382
+ (https://www.nlm.nih.gov/databases/download/terms_and_conditions.html),
7383
+ free of charge. The NLM statement in the RxNorm section applies to this
7384
+ channel as well; no endorsement by NLM is implied.
7378
7385
  - No authentication required.
7379
7386
 
7380
7387
  ## Important caveat for LLM use
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "medical-terminologies-mcp",
3
3
  "mcpName": "io.github.SidneyBissoli/medical-terminologies-mcp",
4
- "version": "2.2.0",
4
+ "version": "2.3.0",
5
5
  "description": "Unified MCP server for six medical terminologies (ICD-11, LOINC, RxNorm, MeSH, ATC, CID-10) with authoritative WHO ICD-10→ICD-11 mapping. 33 tools, hosted endpoint available, MIT.",
6
6
  "author": "Sidney da Silva Pereira Bissoli",
7
7
  "license": "MIT",
@@ -68,10 +68,10 @@
68
68
  "devDependencies": {
69
69
  "@modelcontextprotocol/client": "^2.0.0",
70
70
  "@sbissoli/mcp-evals": "^0.2.1",
71
- "@sbissoli/mcp-surface": "^0.5.0",
71
+ "@sbissoli/mcp-surface": "^0.6.0",
72
72
  "@types/node": "^26.5.1",
73
73
  "esbuild": "^0.28.2",
74
- "nock": "^14.0.15",
74
+ "nock": "^15.0.1",
75
75
  "pino-pretty": "^13.1.3",
76
76
  "tsx": "^4.23.13",
77
77
  "typescript": "^7.0.2",