medical-terminologies-mcp 2.1.2 → 2.2.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.
Files changed (2) hide show
  1. package/dist/index.js +34 -16
  2. package/package.json +3 -3
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.1.2",
33
+ version: "2.2.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",
@@ -88,9 +88,9 @@ var package_default = {
88
88
  },
89
89
  dependencies: {
90
90
  "@modelcontextprotocol/server": "^2.0.0",
91
- "@sbissoli/mcp-provenance": "^0.3.0",
91
+ "@sbissoli/mcp-provenance": "^0.4.0",
92
92
  "@sbissoli/mcp-search": "^0.9.0",
93
- "@sbissoli/mcp-upstream": "^0.4.0",
93
+ "@sbissoli/mcp-upstream": "^0.4.2",
94
94
  pino: "^10.2.1",
95
95
  zod: "^4.5.4"
96
96
  },
@@ -2020,7 +2020,12 @@ var provenanceContext = createProvenanceContext({
2020
2020
  metaNamespace: "com.sidneybissoli.medical",
2021
2021
  locale: "en",
2022
2022
  timezone: "utc",
2023
- defaultMode: "concise"
2023
+ 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"
2024
2029
  });
2025
2030
  var PROVENANCE_META_KEY = provenanceContext.metaKeys.provenance;
2026
2031
  var ATTRIBUTION_META_KEY = provenanceContext.metaKeys.attribution;
@@ -2048,7 +2053,8 @@ var MEDICAL_SOURCES = {
2048
2053
  "ICD-11 content is served verbatim with code, title, and URI preserved (license \xA71.2.2\u20131.2.3)."
2049
2054
  ],
2050
2055
  cachePrefixes: ["icd11"],
2051
- defaultVintage: () => getEnv("WHO_ICD11_RELEASE_ID") ?? WHO_ICD11_DEFAULT_RELEASE
2056
+ defaultVintage: () => getEnv("WHO_ICD11_RELEASE_ID") ?? WHO_ICD11_DEFAULT_RELEASE,
2057
+ revision: { status: "current", note: "WHO publishes a new ICD-11 release annually (usually Jan-Feb); this server queries one pinned release." }
2052
2058
  },
2053
2059
  WHO_TRANSITION_TABLES: {
2054
2060
  name: "WHO ICD-10 \u2192 ICD-11 transition tables (bundled)",
@@ -2068,8 +2074,9 @@ var MEDICAL_SOURCES = {
2068
2074
  'WHO: "Mapping tables show the correspondence between ICD-10 and ICD-11 codes. They are not intended for directly converting data from one revision to the other."'
2069
2075
  ],
2070
2076
  cachePrefixes: [],
2071
- defaultVintage: () => null
2077
+ defaultVintage: () => null,
2072
2078
  // caller passes the live dataset version
2079
+ revision: { status: "current", note: "Bundled from one WHO release of the transition tables; ICD-10 itself is frozen (superseded by ICD-11)." }
2073
2080
  },
2074
2081
  DATASUS_CID10: {
2075
2082
  name: "CID-10 V2008 (DataSUS, bundled)",
@@ -2087,7 +2094,8 @@ var MEDICAL_SOURCES = {
2087
2094
  citation: (date) => `CID-10 V2008 \u2014 Classifica\xE7\xE3o Estat\xEDstica Internacional de Doen\xE7as, 10\xAA Revis\xE3o. DataSUS / Minist\xE9rio da Sa\xFAde do Brasil; Brazilian Portuguese translation by CBCD/USP; \xA9 World Health Organization. http://www2.datasus.gov.br/cid10/V2008/. Queried in-process on ${date}.`,
2088
2095
  notices: [],
2089
2096
  cachePrefixes: [],
2090
- defaultVintage: () => "V2008"
2097
+ defaultVintage: () => "V2008",
2098
+ revision: { status: "current", note: "Frozen since 2008: DataSUS has not published a successor to V2008." }
2091
2099
  },
2092
2100
  NLM_RXNAV: {
2093
2101
  name: "RxNorm (NLM RxNav API)",
@@ -2105,7 +2113,8 @@ var MEDICAL_SOURCES = {
2105
2113
  citation: (date) => `RxNorm, U.S. National Library of Medicine. Retrieved via the NLM RxNav API on ${date}.`,
2106
2114
  notices: [NLM_STATEMENT],
2107
2115
  cachePrefixes: ["rxnorm"],
2108
- defaultVintage: () => null
2116
+ defaultVintage: () => null,
2117
+ revision: { status: "current", note: "RxNorm is released monthly (first Monday); concepts update with each release." }
2109
2118
  },
2110
2119
  NLM_RXCLASS_ATC: {
2111
2120
  name: "ATC via NLM RxClass",
@@ -2125,7 +2134,8 @@ var MEDICAL_SOURCES = {
2125
2134
  // ATC shares the RxNorm client/host, so its accesses land on the same
2126
2135
  // cache prefix; the aggregation is per-host, which is honest here.
2127
2136
  cachePrefixes: ["rxnorm"],
2128
- defaultVintage: () => null
2137
+ defaultVintage: () => null,
2138
+ revision: { status: "current", note: "The WHO ATC classification is updated annually." }
2129
2139
  },
2130
2140
  NLM_MESH: {
2131
2141
  name: "MeSH (NLM Linked Data API)",
@@ -2143,7 +2153,8 @@ var MEDICAL_SOURCES = {
2143
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}.`,
2144
2154
  notices: [NLM_STATEMENT],
2145
2155
  cachePrefixes: ["mesh"],
2146
- defaultVintage: () => null
2156
+ defaultVintage: () => null,
2157
+ revision: { status: "current", note: "MeSH is released annually (November)." }
2147
2158
  },
2148
2159
  CLINICALTABLES_LOINC: {
2149
2160
  name: "LOINC via NLM Clinical Tables",
@@ -2161,7 +2172,8 @@ var MEDICAL_SOURCES = {
2161
2172
  citation: (date) => `LOINC content retrieved via the NLM Clinical Tables API on ${date}. ${LOINC_NOTICE}`,
2162
2173
  notices: [LOINC_NOTICE, NLM_STATEMENT],
2163
2174
  cachePrefixes: ["loinc"],
2164
- defaultVintage: () => null
2175
+ defaultVintage: () => null,
2176
+ revision: { status: "current", note: "LOINC is released bi-annually; the release served varies by NLM update cycle." }
2165
2177
  },
2166
2178
  SERVER_METADATA: {
2167
2179
  name: "medical-terminologies-mcp (server-maintained metadata)",
@@ -2179,7 +2191,8 @@ var MEDICAL_SOURCES = {
2179
2191
  citation: (date) => `medical-terminologies-mcp \u2014 server-maintained metadata (not terminology content). https://github.com/SidneyBissoli/medical-terminologies-mcp. Generated on ${date}.`,
2180
2192
  notices: [],
2181
2193
  cachePrefixes: [],
2182
- defaultVintage: () => null
2194
+ defaultVintage: () => null,
2195
+ revision: { status: "current", note: null }
2183
2196
  }
2184
2197
  };
2185
2198
  function medicalProvenance(key, opts = {}) {
@@ -2209,6 +2222,7 @@ function medicalProvenance(key, opts = {}) {
2209
2222
  citation: src.citation(date, opts.citationDetail),
2210
2223
  license: src.license,
2211
2224
  notices: src.notices,
2225
+ revision: src.revision,
2212
2226
  derived: opts.derived !== void 0,
2213
2227
  ...opts.derived !== void 0 ? { derivation_note: opts.derived.note } : {},
2214
2228
  served_from_cache: src.cachePrefixes.length === 0 ? null : meta.servedFromCache
@@ -2238,10 +2252,14 @@ var BLOCK_DESCRIPTIONS = {
2238
2252
  source_url: "Canonical URL of the source (API base or dataset release)",
2239
2253
  data_vintage: "Version/release of the data as exposed by the source; null when not exposed",
2240
2254
  retrieved_at: "Real instant of the upstream extraction (ISO-8601, UTC). Responses served from cache keep the ORIGINAL fetch instant.",
2241
- retrieval: "Origin diagnostics of THIS source in this call (contract v1.1): requests made to the upstream, attempts summed across retries, anomalies worked around (kind + count); unstable=true when any anomaly happened. null when nothing was measured (bundled dataset, or response served entirely from cache)",
2255
+ retrieval: "Origin diagnostics of THIS source in this call: requests made to the upstream, attempts summed across retries, anomalies worked around (kind + count); unstable=true when any anomaly happened. null when nothing was measured (bundled dataset, or response served entirely from cache)",
2242
2256
  citation: "Ready-to-use citation/attribution string",
2243
2257
  license: "License / legal regime of the data",
2244
- field_sources: "Present only when the response joins parts from different origins or extraction instants (contract v1.2): for each group of fields, its URL, extraction instant and whether it came from cache. Absent in single-origin responses"
2258
+ 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",
2260
+ 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
+ derivation_note: "What this server computed; present together with derived",
2262
+ 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"
2245
2263
  };
2246
2264
  function describeFromJsonSchema(schema, node, overrides = {}, text = node?.description) {
2247
2265
  let out;
@@ -2282,7 +2300,7 @@ var provenanceBlockSchema = describeFromJsonSchema(
2282
2300
  function withProvenance(schema) {
2283
2301
  return schema.extend({
2284
2302
  provenance: provenanceBlockSchema.describe(
2285
- "Provenance block (contract v1.1): source, URL, data vintage, extraction instant, origin diagnostics, citation, license"
2303
+ "Provenance block: source, URL, data vintage, extraction instant, origin diagnostics, citation, license"
2286
2304
  ),
2287
2305
  attribution: z3.array(z3.string()).describe("Canonical source URLs of this response (attribution list)")
2288
2306
  });
@@ -2290,7 +2308,7 @@ function withProvenance(schema) {
2290
2308
  function withProvenanceMulti(schema) {
2291
2309
  return schema.extend({
2292
2310
  provenance: z3.array(provenanceBlockSchema).describe(
2293
- "One provenance block per upstream source that contributed to this response (contract v1.1; licenses are never merged; each block carries the origin diagnostics of ITS source)"
2311
+ "One provenance block per upstream source that contributed to this response (licenses are never merged; each block carries the origin diagnostics of ITS source)"
2294
2312
  ),
2295
2313
  attribution: z3.array(z3.string()).describe("Canonical source URLs of this response (attribution list)")
2296
2314
  });
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.1.2",
4
+ "version": "2.2.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",
@@ -59,9 +59,9 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@modelcontextprotocol/server": "^2.0.0",
62
- "@sbissoli/mcp-provenance": "^0.3.0",
62
+ "@sbissoli/mcp-provenance": "^0.4.0",
63
63
  "@sbissoli/mcp-search": "^0.9.0",
64
- "@sbissoli/mcp-upstream": "^0.4.0",
64
+ "@sbissoli/mcp-upstream": "^0.4.2",
65
65
  "pino": "^10.2.1",
66
66
  "zod": "^4.5.4"
67
67
  },