@chrischall/myatriumhealth-mcp 1.2.2 → 1.3.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.
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "MCP server for Angi — find home-service pros by trade and city, read ratings, reviews and pro profiles. Angi serves its pages only to a real browser, so requests route through the user's own angi.com tab via the fetchproxy browser extension, reusing their existing session. The trade/city taxonomy is read from Angi's public sitemaps directly.",
10
- "version": "1.2.2"
10
+ "version": "1.3.1"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -15,7 +15,7 @@
15
15
  "displayName": "MyAtriumHealth",
16
16
  "source": "./",
17
17
  "description": "Read MyAtriumHealth (Epic MyChart) records — test results, medications, allergies, immunizations, health issues, visits — by relaying requests through the user's signed-in browser tab via the fetchproxy bridge.",
18
- "version": "1.2.2",
18
+ "version": "1.3.1",
19
19
  "author": {
20
20
  "name": "Chris Hall"
21
21
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "myatriumhealth-mcp",
3
3
  "displayName": "MyAtriumHealth",
4
- "version": "1.2.2",
4
+ "version": "1.3.1",
5
5
  "description": "MyAtriumHealth (Epic MyChart) access for Claude — test results, medications, allergies, immunizations, visits",
6
6
  "author": {
7
7
  "name": "Chris Hall",
package/README.md CHANGED
@@ -112,6 +112,9 @@ call prints a pair code — approve it once in the Transporter popup.
112
112
  | `MAH_DEVICE_FILE` | `~/.myatriumhealth-mcp/device.json` | Session state (0600). Holds the **live cookie jar** as well as the device token — treat as a credential. |
113
113
  | `MAH_WS_PORT` | `37149` | fetchproxy concentrator port (bridge mode only). The whole fleet shares this one port; override only when hosting. |
114
114
  | `MAH_READ_ONLY` | `false` | `true` refuses `mah_reply_message` sends (previews still work). The tool stays listed either way. |
115
+ | `MCP_CONFIRM_MODE` | `ask-user` | What a reply does on a client that cannot show a confirmation prompt (claude.ai, Claude Desktop). `ask-user`: two steps — the first call sends nothing and returns a preview plus a token, and the model must get your approval in chat before calling again with it. `auto`: the same two steps, but the model may use the token after reviewing the preview itself. `refuse`: replies are refused on such clients. A client that can show prompts (Claude Code) always gets the real prompt. An unrecognised value is treated as `refuse`. |
116
+ | `MCP_CONFIRM_TTL_SECONDS` | `600` | How long a token stays valid. |
117
+ | `MCP_CONFIRM_SECRET` | random per process | Signing key; set it only if tokens must survive a server restart. |
115
118
 
116
119
  ## Tools
117
120
 
@@ -135,7 +138,7 @@ stated rather than inferred.
135
138
  | `mah_get_health_summary` | Health-summary header and action plans |
136
139
  | `mah_list_message_folders` | Message Center folders with unread counts |
137
140
  | `mah_list_messages` | Message Center conversations for a folder, each with the `conversationId` to reply to |
138
- | `mah_reply_message` | Reply to a conversation as the active patient — previews unless `confirm: true` with the preview's `confirmationToken` *(irreversible)* |
141
+ | `mah_reply_message` | Reply to a conversation as the active patient — asks you to confirm first: a prompt where the client supports one, otherwise a preview and a `confirmToken` *(irreversible)* |
139
142
  | `mah_list_insurance` | Insurance coverages on file |
140
143
  | `mah_list_care_team` | Care team providers, internal and external |
141
144
  | `mah_list_billing_accounts` | Billing accounts and balances (parsed from HTML) |
@@ -164,7 +167,9 @@ Every other reader gets the URL strip only. That field list is applied where one
164
167
  actually established and nowhere else — the list above is generated from
165
168
  `PROJECTED_ENDPOINTS` and checked against the `project()` call sites by a test, so it
166
169
  cannot quietly drift out of step with the code. If the portal's shape drifts, the
167
- projection warns to stderr and returns the raw response rather than an empty list.
170
+ projection warns to stderr and returns `{ projectionFailed: true, endpoint, topLevelKeys,
171
+ note }` rather than an empty list — key names only, never the raw health record; ask for
172
+ `view: 'full'` to see the portal's payload.
168
173
 
169
174
  ## Sessions expire, and they do it quietly
170
175
 
@@ -194,14 +199,22 @@ local organization returns HTTP 500. The client assembles this from
194
199
  `mah_reply_message` takes a `conversationId` from `mah_list_messages`, a plain-text
195
200
  `body`, and optionally `attachments`. It replies **as whichever patient is active**.
196
201
 
197
- - **It previews by default.** Without `confirm: true` it returns the thread, recipients
198
- and body and sends nothing. The send itself is irreversible and provider-visible.
199
- - **A send must follow its own preview.** The preview returns a `confirmationToken`
200
- bound to the patient, thread, body and attachments it showed; `confirm: true` is
201
- refused without it, with one for anything else, after 10 minutes, or once it has been
202
- used for a send — each preview authorizes one send, so a retry after an uncertain send
203
- needs a fresh preview. So message text the model has read cannot talk it into a
204
- one-call send the user never saw.
202
+ - **It asks before it sends.** A client that can show a confirmation prompt (Claude
203
+ Code) gets one with the thread, recipients, body and attachments. Elsewhere the first
204
+ call sends nothing and returns that preview plus a `confirmToken`; only a repeat call
205
+ with the same arguments and that token sends. `MCP_CONFIRM_MODE` (above) decides
206
+ whether the model must get your approval in chat before using it (`ask-user`, the
207
+ default), may use it itself (`auto`), or is refused (`refuse`). The send itself is
208
+ irreversible and provider-visible.
209
+ - **A send must follow its own preview.** The token is bound to the patient, thread,
210
+ recipients, body and attachments the preview showed (the fleet's shared mechanism from
211
+ `@chrischall/mcp-utils`). Anything else is refused: a different reply or thread
212
+ (`DRAFT_CHANGED`, with the new preview and a fresh token), after 10 minutes
213
+ (`TOKEN_EXPIRED`), a token already used (`TOKEN_REUSED`) or not issued for this reply
214
+ (`TOKEN_INVALID`). Each preview authorizes one send, and the token is spent once the send
215
+ is authorized, so any retry, even after a failure before anything went out, needs a
216
+ fresh preview. So message text the model has read cannot talk it into a one-call send
217
+ the user never saw.
205
218
  - **`MAH_READ_ONLY=true` refuses every send.** The tool stays registered — a hosted
206
219
  connector publishes the tool list of a child with no env of its own, so a tool that
207
220
  registered only when writes were allowed would disappear for everyone.