@pipeworx/mcp-medical-codes 0.1.0 → 0.1.2

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Pipeworx
3
+ Copyright (c) 2026 Mojibake Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -2,15 +2,17 @@
2
2
 
3
3
  Medical codes MCP.
4
4
 
5
- Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1176+ live data sources.
5
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1683+ live data sources.
6
6
 
7
7
  ## Tools
8
8
 
9
9
  | Tool | Description |
10
10
  |------|-------------|
11
- | `search_icd10` | Type 2 diabetes mellitus without complications"}]. |
11
+ | `search_icd10` | Search ICD-10-CM diagnosis/billing codes by keyword or code (keyless, offline source: NLM). E.g. "type 2 diabetes" -> [{code:"E11.9", description:"Type 2 diabetes mellitus without complications"}]. |
12
12
  | `search_loinc` | Search LOINC codes (lab tests & clinical observations) by keyword (keyless). E.g. "hemoglobin a1c" -> LOINC number + long common name. |
13
13
  | `search_medical_terms` | Search clinical term lists by keyword (keyless): system = "conditions" (problem/diagnosis names), "procedures" (procedure names), or "drugs" (RxTerms drug display names). |
14
+ | `search_icd10pcs` | Search ICD-10-PCS inpatient procedure codes by keyword or code prefix (keyless, offline: CMS FY${pcsMeta.fiscalYear} order file, ${pcsMeta.count} billable codes). Diagnoses are search_icd10; PCS is what a hospital bills the procedure itself under. E.g. "hip replacement" -> [{code:"0SR9019", description:"Replacement of Right Hip Joint with Metal Synthetic Substitute, Cemented, Open Approach"}]; "0SR9" returns that whole family. |
15
+ | `get_icd10pcs` | Look up one exact 7-character ICD-10-PCS code, plus the sibling codes for the same procedure on the same body part (keyless, offline: CMS FY${pcsMeta.fiscalYear}). E.g. "0SR9019" -> its title plus the other 0SR9* right-hip-replacement codes, which is how you find the uncemented or ceramic alternative to a code you already have. |
14
16
 
15
17
  ## Quick Start
16
18
 
@@ -26,7 +28,25 @@ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
26
28
  }
27
29
  ```
28
30
 
29
- Or connect to the full Pipeworx gateway for access to all 1176+ data sources:
31
+ ### What this endpoint actually serves
32
+
33
+ `tools/list` at `https://gateway.pipeworx.io/medical-codes/mcp` returns the tools in the table
34
+ above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
35
+ `discover_tools`, `search_within`, `remember`/`recall` and the rest of the
36
+ gateway-wide set. So the tool count you see is larger than this table: a
37
+ single-pack endpoint currently lists roughly 30 shared tools alongside the
38
+ pack's own. The connection's `initialize` response states its exact scope, and
39
+ is the authoritative answer for a given day.
40
+
41
+ This is deliberate, not multiplexing by accident. The meta-tools are what let a
42
+ scoped connection answer a question this pack does not cover — via
43
+ `ask_pipeworx`, which routes across the whole catalog — without you adding a
44
+ second MCP server. There is currently no way to mount a pack endpoint without
45
+ them; if the extra schemas cost you more context than the routing is worth,
46
+ connect to the full gateway once rather than to several pack endpoints.
47
+
48
+ Or connect to the full Pipeworx gateway to get every pack's tools listed
49
+ directly, instead of just this one's:
30
50
 
31
51
  ```json
32
52
  {
@@ -38,9 +58,50 @@ Or connect to the full Pipeworx gateway for access to all 1176+ data sources:
38
58
  }
39
59
  ```
40
60
 
61
+ Both URLs reach the same gateway and the same 1683+ data sources. The
62
+ only difference is which pack's tools are listed **directly**; `ask_pipeworx`
63
+ reaches all of them from either one.
64
+
65
+ ## No MCP client? Call it over HTTP
66
+
67
+ ```bash
68
+ curl -X POST https://gateway.pipeworx.io/v1/tools/search_icd10 \
69
+ -H 'Content-Type: application/json' \
70
+ -d '{"query":"type 2 diabetes"}'
71
+ ```
72
+
73
+ No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/search_icd10`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
74
+
75
+ ## Standalone (no gateway account)
76
+
77
+ This package also runs as a local stdio MCP server — no Pipeworx account, no
78
+ gateway round-trip:
79
+
80
+ ```json
81
+ {
82
+ "mcpServers": {
83
+ "medical-codes": {
84
+ "command": "npx",
85
+ "args": ["-y", "@pipeworx/mcp-medical-codes"]
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ Or run it directly to confirm it starts:
92
+
93
+ ```bash
94
+ npx -y @pipeworx/mcp-medical-codes
95
+ ```
96
+
97
+ It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
98
+ for **only** this pack's tools — none of the shared meta-tools the gateway
99
+ connection above adds. Same source, same tools, no ask_pipeworx routing.
100
+
41
101
  ## Using with ask_pipeworx
42
102
 
43
- Instead of calling tools directly, you can ask questions in plain English:
103
+ Instead of calling tools directly, you can ask questions in plain English —
104
+ this works on the pack endpoint above as well as on the full gateway:
44
105
 
45
106
  ```
46
107
  ask_pipeworx({ question: "your question about Medical Codes data" })
@@ -50,7 +111,7 @@ The gateway picks the right tool and fills the arguments automatically.
50
111
 
51
112
  ## More
52
113
 
53
- - [All tools and guides](https://github.com/pipeworx-io/examples)
114
+ - [Docs and guides](https://pipeworx.io/docs)
54
115
  - [pipeworx.io](https://pipeworx.io)
55
116
 
56
117
  ## License
package/bin/cli.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // Entry point for `npx @pipeworx/mcp-<slug>`.
4
+ //
5
+ // Packs ship as raw TypeScript (no build step — see publish-pack.sh for why:
6
+ // tsx sidesteps every extensionless-import / bare-JSON-import edge case a
7
+ // per-pack tsc build would have to solve one pack at a time). This file
8
+ // registers tsx's ESM loader programmatically, then hands off to src/server.ts,
9
+ // which wraps the pack's {tools, callTool} export in a stdio MCP server.
10
+ //
11
+ // Copied verbatim into every published pack repo by scripts/publish-pack.sh —
12
+ // edit this file, not a per-pack copy.
13
+ import { register } from 'tsx/esm/api';
14
+
15
+ register();
16
+
17
+ await import('../src/server.ts');
package/package.json CHANGED
@@ -1,20 +1,32 @@
1
1
  {
2
2
  "name": "@pipeworx/mcp-medical-codes",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Medical codes MCP.",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "types": "src/index.ts",
8
+ "bin": {
9
+ "mcp-medical-codes": "bin/cli.js"
10
+ },
8
11
  "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "medical-codes"],
9
12
  "license": "MIT",
10
13
  "repository": {
11
14
  "type": "git",
12
- "url": "https://github.com/pipeworx-io/mcp-medical-codes"
15
+ "url": "git+https://github.com/pipeworx-io/mcp-medical-codes.git"
13
16
  },
14
17
  "scripts": {
15
18
  "typecheck": "tsc --noEmit"
16
19
  },
20
+ "dependencies": {
21
+ "@modelcontextprotocol/sdk": "^1.30.0",
22
+ "tsx": "^4.19.0"
23
+ },
17
24
  "devDependencies": {
18
- "typescript": "^5.7.0"
25
+ "typescript": "^5.9.3",
26
+ "@cloudflare/workers-types": "^4.20260405.1"
27
+ },
28
+ "pipeworx": {
29
+ "sourceHash": "v1-dd6648d3cae256b65f244a4585e7fa95c6e6df5d6cff3f542782846d6a82db1a",
30
+ "sourceCommit": "6182c4cfebddb94950e060b5d2fca18f18ad1aca"
19
31
  }
20
32
  }
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.pipeworx-io/medical-codes",
4
4
  "title": "Medical Codes",
5
5
  "description": "Medical codes MCP.",
6
- "version": "0.1.0",
6
+ "version": "0.1.2",
7
7
  "websiteUrl": "https://pipeworx.io/packs/medical-codes",
8
8
  "repository": {
9
9
  "url": "https://github.com/pipeworx-io/mcp-medical-codes",
@@ -0,0 +1,8 @@
1
+ {
2
+ "fiscalYear": 2026,
3
+ "effective": "2025-10-01",
4
+ "source": "https://www.cms.gov/files/zip/2026-icd-10-pcs-order-file-long-and-abbreviated-titles.zip",
5
+ "sourceFile": "icd10pcs_order_2026.txt",
6
+ "note": "CMS ICD-10-PCS order file, long titles, billable codes only. Public domain (17 U.S.C. 105).",
7
+ "count": 79115
8
+ }