@uphealth/mcp-server 1.1.3 → 1.1.5
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/README.md +110 -67
- package/dist/config.js +1 -1
- package/dist/index.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/output-schemas.js +26 -1
- package/dist/output-schemas.js.map +1 -1
- package/dist/tool-result.js +1 -1
- package/dist/tool-result.js.map +1 -1
- package/dist/tools/lookup-health-fact.js +1 -1
- package/dist/tools/lookup-health-fact.js.map +1 -1
- package/package.json +3 -3
- package/DISTRIBUTION.md +0 -130
package/README.md
CHANGED
|
@@ -1,103 +1,146 @@
|
|
|
1
|
-
# Uphealth MCP
|
|
1
|
+
# Uphealth Signal MCP server
|
|
2
2
|
|
|
3
3
|
**The adaptive health-messaging engine for apps and agents** — federally-sourced, audience-safe. Not medical advice.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The Uphealth MCP server lets any [Model Context Protocol](https://modelcontextprotocol.io/) client — Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, or your own agent — look up federal health facts and drive a cued health-message stream as five tools (one needs no key). It wraps the [Signal API](https://uphealth.us/docs); the model never sees your raw HTTP layer.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
**Try it with zero setup:** `lookup_health_fact` needs **no key** — one already-public federal fact per question. For the adaptive stream, **get a free sandbox key** (no credit card, no PHI, no BAA) at **https://uphealth.us/signup**, then pick an install method below.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- **Tool surface** — 5 tools: a **no-key** `lookup_health_fact` (one already-public federal fact per question, zero setup) + 4 keyed tools (`create_patient_stream` / `get_next_cued_message` / `read_stream_state` / `list_sandbox_topics`)
|
|
11
|
-
- **Auth** — Bearer-token passthrough (MCP server is stateless thin proxy; Rails validates). `lookup_health_fact` is the sole exception — it needs no key; the per-tool policy still 401s every keyed tool without one.
|
|
12
|
-
- **Corpus** — sandbox only at v1
|
|
13
|
-
- **Hostname** — `mcp.uphealth.us` subdomain (Option A locked)
|
|
14
|
-
- **Transport** — Streamable HTTP
|
|
9
|
+
## The five tools
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
| Tool | Wraps | Key? | Does |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| `lookup_health_fact` | `GET /v1/public/health-fact` | **none** | One already-public federal fact for a question/topic + its source + an uphealth.me link |
|
|
14
|
+
| `create_patient_stream` | `POST /v1/signal/streams` | `up_…` | Start a stream from a template; returns the opening cue |
|
|
15
|
+
| `get_next_cued_message` | `POST /v1/signal/streams/:id/cue` | `up_…` | Submit the patient's response, get the next message |
|
|
16
|
+
| `read_stream_state` | `GET /v1/signal/streams/:id` | `up_…` | Read state + current cue without advancing |
|
|
17
|
+
| `list_sandbox_topics` | `GET /v1/signal/sandbox-topics` | `up_…` | List the five sandbox topics |
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
nvm use # picks Node 22 from .nvmrc
|
|
20
|
-
npm install
|
|
21
|
-
cp .env.example .env
|
|
22
|
-
npm run dev # tsx hot-reload of src/index.ts
|
|
23
|
-
```
|
|
19
|
+
**The one rule** (keyed tools): every cue after the first requires feedback on the prior one (the model passes the patient's `response_action`). The tool descriptions teach this, so a capable agent drives the loop correctly.
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
---
|
|
26
22
|
|
|
27
|
-
##
|
|
23
|
+
## Option A — Local (stdio via `npx`) · recommended
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
No hosting, no URL. The client launches the server as a subprocess with your key in its environment.
|
|
26
|
+
|
|
27
|
+
### Claude Desktop
|
|
28
|
+
|
|
29
|
+
`claude_desktop_config.json` (Settings → Developer → Edit Config):
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"mcpServers": {
|
|
34
|
+
"uphealth": {
|
|
35
|
+
"command": "npx",
|
|
36
|
+
"args": ["-y", "@uphealth/mcp-server"],
|
|
37
|
+
"env": { "UPHEALTH_API_KEY": "up_sandbox_YOUR_KEY" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
33
41
|
```
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
### Cursor
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
`~/.cursor/mcp.json` (or a project's `.cursor/mcp.json`):
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"uphealth": {
|
|
51
|
+
"command": "npx",
|
|
52
|
+
"args": ["-y", "@uphealth/mcp-server"],
|
|
53
|
+
"env": { "UPHEALTH_API_KEY": "up_sandbox_YOUR_KEY" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
39
57
|
```
|
|
40
58
|
|
|
41
|
-
|
|
59
|
+
### VS Code (Copilot agent mode)
|
|
42
60
|
|
|
43
|
-
|
|
61
|
+
`.vscode/mcp.json`:
|
|
44
62
|
|
|
45
|
-
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"servers": {
|
|
66
|
+
"uphealth": {
|
|
67
|
+
"command": "npx",
|
|
68
|
+
"args": ["-y", "@uphealth/mcp-server"],
|
|
69
|
+
"env": { "UPHEALTH_API_KEY": "up_sandbox_YOUR_KEY" }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Claude Code (CLI)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
claude mcp add uphealth --env UPHEALTH_API_KEY=up_sandbox_YOUR_KEY -- npx -y @uphealth/mcp-server
|
|
79
|
+
```
|
|
46
80
|
|
|
47
|
-
|
|
81
|
+
Any other stdio MCP client uses the same shape: command `npx`, args `["-y", "@uphealth/mcp-server"]`, env `UPHEALTH_API_KEY`.
|
|
48
82
|
|
|
49
|
-
|
|
83
|
+
---
|
|
50
84
|
|
|
51
|
-
|
|
85
|
+
## Option B — Remote (hosted Streamable HTTP)
|
|
52
86
|
|
|
53
|
-
The
|
|
87
|
+
The server is also hosted at `https://mcp.uphealth.us/mcp`. Clients with native remote-MCP support add it directly with an `Authorization: Bearer` header. For clients that only speak stdio, bridge with `mcp-remote`:
|
|
54
88
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
7. **Cert SAN extension** — `certbot --nginx --expand -d uphealth.us -d www.uphealth.us -d api.uphealth.us -d mcp.uphealth.us`. Existing cert at `/etc/letsencrypt/live/uphealth.us/` gains the new SAN; auto-renewal via the certbot timer continues.
|
|
69
|
-
8. **Auto-deploy cron is already running** on `/root/uphealth-us/bin/deploy` per the existing `.us` setup. The `bin/deploy` extension (PR #424) detects changes under `mcp-server/` and runs `bin/mcp-server-systemd.sh` automatically. No new cron entry needed.
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"mcpServers": {
|
|
92
|
+
"uphealth": {
|
|
93
|
+
"command": "npx",
|
|
94
|
+
"args": [
|
|
95
|
+
"-y", "mcp-remote", "https://mcp.uphealth.us/mcp",
|
|
96
|
+
"--header", "Authorization: Bearer up_sandbox_YOUR_KEY"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
70
102
|
|
|
71
|
-
|
|
103
|
+
---
|
|
72
104
|
|
|
73
|
-
|
|
105
|
+
## Verify
|
|
74
106
|
|
|
75
|
-
|
|
107
|
+
Use the MCP Inspector against either transport:
|
|
76
108
|
|
|
77
109
|
```bash
|
|
78
|
-
|
|
79
|
-
|
|
110
|
+
# local stdio
|
|
111
|
+
UPHEALTH_API_KEY=up_sandbox_YOUR_KEY npx @modelcontextprotocol/inspector npx -y @uphealth/mcp-server
|
|
112
|
+
|
|
113
|
+
# hosted
|
|
114
|
+
npx @modelcontextprotocol/inspector --transport streamable-http \
|
|
80
115
|
--url https://mcp.uphealth.us/mcp \
|
|
81
|
-
--header "Authorization: Bearer
|
|
116
|
+
--header "Authorization: Bearer up_sandbox_YOUR_KEY"
|
|
82
117
|
```
|
|
83
118
|
|
|
84
|
-
Then
|
|
119
|
+
Then call `create_patient_stream` with `template_id: "general_wellness_daily"`, and `get_next_cued_message` with a `response_action` (e.g. `did_it`).
|
|
120
|
+
|
|
121
|
+
## Where it's published
|
|
85
122
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
123
|
+
| Surface | Coordinates |
|
|
124
|
+
|---|---|
|
|
125
|
+
| npm (this package) | [`@uphealth/mcp-server`](https://www.npmjs.com/package/@uphealth/mcp-server) — stdio via `npx` |
|
|
126
|
+
| Official MCP registry | `us.uphealth/mcp` ([registry.modelcontextprotocol.io](https://registry.modelcontextprotocol.io/v0/servers?search=us.uphealth)) |
|
|
127
|
+
| Hosted remote | `https://mcp.uphealth.us/mcp` (Streamable HTTP) |
|
|
128
|
+
| SDKs | npm [`@uphealth/signal`](https://www.npmjs.com/package/@uphealth/signal) (Node/TS) · PyPI [`uphealth-signal`](https://pypi.org/project/uphealth-signal/) (Python) |
|
|
129
|
+
| Smithery | [`uphealth/signal`](https://smithery.ai/server/uphealth/signal) |
|
|
130
|
+
| Glama | Listed + claimed (ownership via `/.well-known/glama.json` on `mcp.uphealth.us` and the `uphealth.us` apex) |
|
|
131
|
+
| mcp.so | [`uphealth-signal`](https://mcp.so/server/uphealth-signal) |
|
|
92
132
|
|
|
93
|
-
|
|
133
|
+
The npm package page shows the current version; third-party catalogs re-scan on their own schedule, so their displayed version can lag a release or two behind npm and the official registry.
|
|
94
134
|
|
|
95
|
-
##
|
|
135
|
+
## Notes
|
|
96
136
|
|
|
97
|
-
|
|
137
|
+
- **Keep your key private.** Treat `UPHEALTH_API_KEY` like any secret; don't commit client configs containing a live key.
|
|
138
|
+
- **Display mode only** in the sandbox — no PHI, no BAA. Deliver mode is BAA-gated at the PMPM tier.
|
|
139
|
+
- **Discovery quota:** 50 cues / calendar month. Over the cap, tools return the `over_quota` result with an upgrade link.
|
|
98
140
|
|
|
99
|
-
|
|
100
|
-
- Claude Desktop MCP directory
|
|
101
|
-
- Third-party catalogs (mcp.so, mcpservers.com if active at launch time)
|
|
141
|
+
## Links
|
|
102
142
|
|
|
103
|
-
|
|
143
|
+
- Docs: https://uphealth.us/docs
|
|
144
|
+
- MCP quickstart: https://uphealth.us/docs/mcp-quickstart
|
|
145
|
+
- OpenAPI: https://uphealth.us/openapi/signal-v1.yaml
|
|
146
|
+
- Get a key: https://uphealth.us/signup
|
package/dist/config.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -42,11 +42,26 @@ function extractBearer(req) {
|
|
|
42
42
|
}
|
|
43
43
|
function startHttpServer() {
|
|
44
44
|
const app = express();
|
|
45
|
+
// Don't advertise the framework — gratuitous fingerprinting on a public,
|
|
46
|
+
// internet-facing listener. Zero-dependency; no behavior change.
|
|
47
|
+
app.disable("x-powered-by");
|
|
45
48
|
app.use(express.json({ limit: "1mb" }));
|
|
46
49
|
// Health check (does NOT require auth; useful for nginx/load-balancer probes).
|
|
47
50
|
app.get("/health", (_req, res) => {
|
|
48
51
|
res.status(200).json({ status: "ok", server: config.serverName, version: config.serverVersion });
|
|
49
52
|
});
|
|
53
|
+
// Glama connector ownership proof (https://glama.ai). Static, no auth — Glama
|
|
54
|
+
// fetches https://mcp.uphealth.us/.well-known/glama.json and matches the
|
|
55
|
+
// maintainer email to the claiming Glama account to unlock listing control.
|
|
56
|
+
// Mirrored on the apex via public/.well-known/glama.json (Rails serves
|
|
57
|
+
// uphealth.us). The email is public (this is a discoverability proof, not a
|
|
58
|
+
// secret), mirroring the public/.well-known/mcp-registry-auth precedent.
|
|
59
|
+
app.get("/.well-known/glama.json", (_req, res) => {
|
|
60
|
+
res.status(200).json({
|
|
61
|
+
$schema: "https://glama.ai/mcp/schemas/connector.json",
|
|
62
|
+
maintainers: [{ email: "eabykr@gmail.com" }],
|
|
63
|
+
});
|
|
64
|
+
});
|
|
50
65
|
// MCP endpoint — POST is request/response; GET is SSE upgrade for
|
|
51
66
|
// server-initiated streams (Streamable HTTP transport spec).
|
|
52
67
|
const mcpHandler = async (req, res, _next) => {
|
|
@@ -58,7 +73,7 @@ function startHttpServer() {
|
|
|
58
73
|
if (!bearer && !requestAllowedWithoutBearer(req.body)) {
|
|
59
74
|
res.status(401).json({
|
|
60
75
|
error: "unauthorized",
|
|
61
|
-
message: "Missing or malformed Authorization: Bearer header. Get a free sandbox key at https://uphealth.us/signup
|
|
76
|
+
message: "Missing or malformed Authorization: Bearer header. Get a free sandbox key at https://uphealth.us/signup — then send it as 'Authorization: Bearer up_sandbox_…'. (No key needed for the lookup_health_fact tool.)",
|
|
62
77
|
});
|
|
63
78
|
return;
|
|
64
79
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,EAAE;AACF,SAAS;AACT,4EAA4E;AAC5E,EAAE;AACF,oBAAoB;AACpB,iFAAiF;AACjF,qEAAqE;AACrE,iDAAiD;AACjD,sEAAsE;AACtE,wEAAwE;AACxE,kEAAkE;AAClE,uEAAuE;AACvE,oDAAoD;AACpD,uEAAuE;AACvE,+CAA+C;AAC/C,sEAAsE;AACtE,2DAA2D;AAC3D,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,+BAA+B;AAC/B,EAAE;AACF,yDAAyD;AAEzD,OAAO,OAA2D,MAAM,SAAS,CAAC;AAClF,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAA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AAC"}
|
package/dist/output-schemas.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Track A A4 / A5 (2026-06-14) — MCP `outputSchema` declarations for the
|
|
1
|
+
// Track A A4 / A5 (2026-06-14) — MCP `outputSchema` declarations for the 5 tools.
|
|
2
2
|
//
|
|
3
3
|
// Declaring outputSchema (+ returning `structuredContent`, see tool-result.ts)
|
|
4
4
|
// lets MCP hosts validate and parse a tool's result reliably instead of
|
|
@@ -29,6 +29,25 @@ const CUE_SCHEMA = {
|
|
|
29
29
|
source_quote: { type: "string" },
|
|
30
30
|
receptivity: { type: "number", description: "Advisory receptivity in [0.0, 1.0]; 0.5 = neutral/new patient." },
|
|
31
31
|
safety: { type: "object", additionalProperties: true, description: "PHI-free audience-safety verdict." },
|
|
32
|
+
arc: {
|
|
33
|
+
type: ["object", "null"],
|
|
34
|
+
description: "Where this cue sits in the template's curated arc, or null when the cue is not on a spine. " +
|
|
35
|
+
"source is 'spine' or 'corpus_continuation'; a corpus-continuation cue (past the arc's end) " +
|
|
36
|
+
"carries source only, with day/phase/seq/total null.",
|
|
37
|
+
properties: {
|
|
38
|
+
source: { type: "string", description: "spine | corpus_continuation" },
|
|
39
|
+
day: { type: ["integer", "null"], description: "The curated arc day of this message." },
|
|
40
|
+
phase: { type: ["string", "null"], description: "The curated arc phase, e.g. starting_dose / titrating / re_entry." },
|
|
41
|
+
seq: { type: ["integer", "null"], description: "1-based position of this message in the spine." },
|
|
42
|
+
total: { type: ["integer", "null"], description: "Total messages in the spine." },
|
|
43
|
+
},
|
|
44
|
+
additionalProperties: true,
|
|
45
|
+
},
|
|
46
|
+
day_of_stream: {
|
|
47
|
+
type: ["integer", "null"],
|
|
48
|
+
description: "Advisory 1-based wall-clock day the patient is on in this stream (anchored to enrollment). " +
|
|
49
|
+
"Null on legacy cues issued before day-of-stream tracking.",
|
|
50
|
+
},
|
|
32
51
|
cued_at: { type: "string", description: "ISO 8601 timestamp." },
|
|
33
52
|
},
|
|
34
53
|
additionalProperties: true,
|
|
@@ -87,6 +106,12 @@ export const getNextCuedMessageOutputSchema = {
|
|
|
87
106
|
state: { type: "string" },
|
|
88
107
|
// CueResult fields:
|
|
89
108
|
idempotent: { type: "boolean", description: "true when this is the cached result of a repeated idempotency_key." },
|
|
109
|
+
normalized_action: {
|
|
110
|
+
type: ["string", "null"],
|
|
111
|
+
description: "null when the submitted response_action was a recognized value; otherwise the acknowledge-class " +
|
|
112
|
+
"value the well-formed-but-unrecognized action was folded to (forward-compat tolerance). " +
|
|
113
|
+
"Always present on a cue result; absent on the exhausted-stream result.",
|
|
114
|
+
},
|
|
90
115
|
next_cue: CUE_SCHEMA,
|
|
91
116
|
// StreamExhausted fields (end-of-stream marker):
|
|
92
117
|
sandbox_exhausted: { type: "boolean", description: "Present + true when the sandbox subset is exhausted; no next_cue then." },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-schemas.js","sourceRoot":"","sources":["../src/output-schemas.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,EAAE;AACF,+EAA+E;AAC/E,wEAAwE;AACxE,uEAAuE;AACvE,2EAA2E;AAC3E,iDAAiD;AACjD,EAAE;AACF,uEAAuE;AACvE,2EAA2E;AAC3E,8EAA8E;AAC9E,gFAAgF;AAChF,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,6EAA6E;AAC7E,8EAA8E;AAE9E,6EAA6E;AAC7E,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,gFAAgF;IAC7F,UAAU,EAAE;QACV,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QACjC,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;QAC/B,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACjC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE;QAC1D,IAAI,EAAE,EAAE,IAAI,EAAE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9B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,oCAAoC,EAAE;QAClF,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yEAAyE;YACtF,oBAAoB,EAAE,IAAI;SAC3B;KACF;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,CAAC;CAC3D,CAAC"}
|
package/dist/tool-result.js
CHANGED
|
@@ -64,7 +64,7 @@ export function railsErrorToToolResult(status, body, context, headers) {
|
|
|
64
64
|
const ctxPrefix = context ? `${context}: ` : "";
|
|
65
65
|
switch (status) {
|
|
66
66
|
case 401:
|
|
67
|
-
return errorResult(`${ctxPrefix}Authentication failed. Check that your Authorization: Bearer header carries a valid up_sandbox_… token. Get a free sandbox key at https://uphealth.us/signup
|
|
67
|
+
return errorResult(`${ctxPrefix}Authentication failed. Check that your Authorization: Bearer header carries a valid up_sandbox_… token. Get a free sandbox key at https://uphealth.us/signup`);
|
|
68
68
|
case 403:
|
|
69
69
|
if (errCode === "insufficient_scope") {
|
|
70
70
|
return errorResult(`${ctxPrefix}Insufficient scope. Your token lacks the '${body?.required ?? "required"}' scope. Upgrade tier or request a scope grant.`);
|
package/dist/tool-result.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-result.js","sourceRoot":"","sources":["../src/tool-result.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,EAAE;AACF,gEAAgE;AAChE,uEAAuE;AACvE,kEAAkE;AAClE,sBAAsB;AA6BtB;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAgC;IAEhC,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACzC,MAAM,SAAS,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACjD,MAAM,KAAK,GAAG,OAAO,CAAC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,OAAO,EAAE,CACvE,CAAC;IACN,CAAC;AACH,CAAC"}
|
|
@@ -21,7 +21,7 @@ export const lookupHealthFactTool = {
|
|
|
21
21
|
'or topic (e.g. "high blood pressure", "sleep", "type 2 diabetes"), with its federal source (CDC / MedlinePlus / ' +
|
|
22
22
|
"NIH) and a link to the public uphealth.me page. Free + rate-limited. For adaptive, patient-specific " +
|
|
23
23
|
"message sequencing — receptivity-scored cues + audience-safety verdicts over the full library of " +
|
|
24
|
-
"federally-sourced facts, lists & tips — get a free Discovery key at https://uphealth.us/signup
|
|
24
|
+
"federally-sourced facts, lists & tips — get a free Discovery key at https://uphealth.us/signup",
|
|
25
25
|
annotations: {
|
|
26
26
|
title: "Look up a public health fact, list, or tip (no key)",
|
|
27
27
|
readOnlyHint: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lookup-health-fact.js","sourceRoot":"","sources":["../../src/tools/lookup-health-fact.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,mCAAmC;AACnC,4DAA4D;AAC5D,gFAAgF;AAChF,+EAA+E;AAC/E,kFAAkF;AAClF,gEAAgE;AAChE,EAAE;AACF,iFAAiF;AACjF,gFAAgF;AAChF,gEAAgE;AAChE,EAAE;AACF,gEAAgE;AAEhE,OAAO,EAAE,eAAe,EAAE,aAAa,EAAuB,MAAM,oBAAoB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAE,WAAW,EAAmB,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EACT,4GAA4G;QAC5G,kHAAkH;QAClH,sGAAsG;QACtG,mGAAmG;QACnG,
|
|
1
|
+
{"version":3,"file":"lookup-health-fact.js","sourceRoot":"","sources":["../../src/tools/lookup-health-fact.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAA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,IAAI,GAAG,QAAQ,CAAC,IAA6B,CAAC;YACpD,yDAAyD;YACzD,0EAA0E;YAC1E,6FAA6F;YAC7F,kEAAkE;YAClE,MAAM,OAAO,GACX,CAAC,OAAO,IAAI,EAAE,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC;gBACnD,CAAC,OAAO,IAAI,EAAE,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,KAAK,CAAC;gBAC/C,+BAA+B,QAAQ,CAAC,MAAM,IAAI,CAAC;YACrD,MAAM,MAAM,GAAG,OAAO,IAAI,EAAE,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACjF,OAAO,WAAW,CAAC,uBAAuB,OAAO,GAAG,MAAM,EAAE,CAAC,CAAC;QAChE,CAAC;QAED,0EAA0E;QAC1E,2EAA2E;QAC3E,OAAO,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uphealth/mcp-server",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.5",
|
|
4
4
|
"mcpName": "us.uphealth/mcp",
|
|
5
|
-
"description": "Uphealth Signal — the adaptive health-messaging engine for apps and agents. Drive federally-sourced, audience-safe cued health-message streams from any MCP client
|
|
5
|
+
"description": "Uphealth Signal — the adaptive health-messaging engine for apps and agents. Drive federally-sourced, audience-safe cued health-message streams from any MCP client — local stdio via npx, or the hosted mcp.uphealth.us endpoint. Not medical advice.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Uphealth (Anschutz Media, Inc.)",
|
|
8
8
|
"homepage": "https://uphealth.us/docs",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"bin": {
|
|
20
20
|
"uphealth-mcp": "dist/stdio.js"
|
|
21
21
|
},
|
|
22
|
-
"files": ["dist", "README.md", "
|
|
22
|
+
"files": ["dist", "README.md", "LICENSE"],
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=22.0.0"
|
|
25
25
|
},
|
package/DISTRIBUTION.md
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
# Use Uphealth Signal from an AI agent (MCP)
|
|
2
|
-
|
|
3
|
-
The Uphealth MCP server lets any [Model Context Protocol](https://modelcontextprotocol.io/) client — Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, or your own agent — look up federal health facts and drive a cued health-message stream as five tools (one needs no key). It wraps the [Signal API](https://uphealth.us/docs); the model never sees your raw HTTP layer.
|
|
4
|
-
|
|
5
|
-
**Try it with zero setup:** `lookup_health_fact` needs **no key** — one already-public federal fact per question. For the adaptive stream, **get a free sandbox key** (no credit card, no PHI, no BAA) at **https://uphealth.us/signup**, then pick an install method below.
|
|
6
|
-
|
|
7
|
-
## The five tools
|
|
8
|
-
|
|
9
|
-
| Tool | Wraps | Key? | Does |
|
|
10
|
-
|---|---|---|---|
|
|
11
|
-
| `lookup_health_fact` | `GET /v1/public/health-fact` | **none** | One already-public federal fact for a question/topic + its source + an uphealth.me link |
|
|
12
|
-
| `create_patient_stream` | `POST /v1/signal/streams` | `up_…` | Start a stream from a template; returns the opening cue |
|
|
13
|
-
| `get_next_cued_message` | `POST /v1/signal/streams/:id/cue` | `up_…` | Submit the patient's response, get the next message |
|
|
14
|
-
| `read_stream_state` | `GET /v1/signal/streams/:id` | `up_…` | Read state + current cue without advancing |
|
|
15
|
-
| `list_sandbox_topics` | `GET /v1/signal/sandbox-topics` | `up_…` | List the five sandbox topics |
|
|
16
|
-
|
|
17
|
-
**The one rule** (keyed tools): every cue after the first requires feedback on the prior one (the model passes the patient's `response_action`). The tool descriptions teach this, so a capable agent drives the loop correctly.
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Option A — Local (stdio via `npx`) · recommended
|
|
22
|
-
|
|
23
|
-
No hosting, no URL. The client launches the server as a subprocess with your key in its environment.
|
|
24
|
-
|
|
25
|
-
### Claude Desktop
|
|
26
|
-
|
|
27
|
-
`claude_desktop_config.json` (Settings → Developer → Edit Config):
|
|
28
|
-
|
|
29
|
-
```json
|
|
30
|
-
{
|
|
31
|
-
"mcpServers": {
|
|
32
|
-
"uphealth": {
|
|
33
|
-
"command": "npx",
|
|
34
|
-
"args": ["-y", "@uphealth/mcp-server"],
|
|
35
|
-
"env": { "UPHEALTH_API_KEY": "up_sandbox_YOUR_KEY" }
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Cursor
|
|
42
|
-
|
|
43
|
-
`~/.cursor/mcp.json` (or a project's `.cursor/mcp.json`):
|
|
44
|
-
|
|
45
|
-
```json
|
|
46
|
-
{
|
|
47
|
-
"mcpServers": {
|
|
48
|
-
"uphealth": {
|
|
49
|
-
"command": "npx",
|
|
50
|
-
"args": ["-y", "@uphealth/mcp-server"],
|
|
51
|
-
"env": { "UPHEALTH_API_KEY": "up_sandbox_YOUR_KEY" }
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### VS Code (Copilot agent mode)
|
|
58
|
-
|
|
59
|
-
`.vscode/mcp.json`:
|
|
60
|
-
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
"servers": {
|
|
64
|
-
"uphealth": {
|
|
65
|
-
"command": "npx",
|
|
66
|
-
"args": ["-y", "@uphealth/mcp-server"],
|
|
67
|
-
"env": { "UPHEALTH_API_KEY": "up_sandbox_YOUR_KEY" }
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### Claude Code (CLI)
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
claude mcp add uphealth --env UPHEALTH_API_KEY=up_sandbox_YOUR_KEY -- npx -y @uphealth/mcp-server
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Any other stdio MCP client uses the same shape: command `npx`, args `["-y", "@uphealth/mcp-server"]`, env `UPHEALTH_API_KEY`.
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## Option B — Remote (hosted Streamable HTTP)
|
|
84
|
-
|
|
85
|
-
The server is also hosted at `https://mcp.uphealth.us/mcp`. Clients with native remote-MCP support add it directly with an `Authorization: Bearer` header. For clients that only speak stdio, bridge with `mcp-remote`:
|
|
86
|
-
|
|
87
|
-
```json
|
|
88
|
-
{
|
|
89
|
-
"mcpServers": {
|
|
90
|
-
"uphealth": {
|
|
91
|
-
"command": "npx",
|
|
92
|
-
"args": [
|
|
93
|
-
"-y", "mcp-remote", "https://mcp.uphealth.us/mcp",
|
|
94
|
-
"--header", "Authorization: Bearer up_sandbox_YOUR_KEY"
|
|
95
|
-
]
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
## Verify
|
|
104
|
-
|
|
105
|
-
Use the MCP Inspector against either transport:
|
|
106
|
-
|
|
107
|
-
```bash
|
|
108
|
-
# local stdio
|
|
109
|
-
UPHEALTH_API_KEY=up_sandbox_YOUR_KEY npx @modelcontextprotocol/inspector npx -y @uphealth/mcp-server
|
|
110
|
-
|
|
111
|
-
# hosted
|
|
112
|
-
npx @modelcontextprotocol/inspector --transport streamable-http \
|
|
113
|
-
--url https://mcp.uphealth.us/mcp \
|
|
114
|
-
--header "Authorization: Bearer up_sandbox_YOUR_KEY"
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Then call `create_patient_stream` with `template_id: "general_wellness_daily"`, and `get_next_cued_message` with a `response_action` (e.g. `did_it`).
|
|
118
|
-
|
|
119
|
-
## Notes
|
|
120
|
-
|
|
121
|
-
- **Keep your key private.** Treat `UPHEALTH_API_KEY` like any secret; don't commit client configs containing a live key.
|
|
122
|
-
- **Display mode only** in the sandbox — no PHI, no BAA. Deliver mode is BAA-gated at the PMPM tier.
|
|
123
|
-
- **Discovery quota:** 50 cues / calendar month. Over the cap, tools return the `over_quota` result with an upgrade link.
|
|
124
|
-
|
|
125
|
-
## Links
|
|
126
|
-
|
|
127
|
-
- Docs: https://uphealth.us/docs
|
|
128
|
-
- OpenAPI: https://uphealth.us/openapi/signal-v1.yaml
|
|
129
|
-
- SDKs: [`@uphealth/signal`](../sdks/typescript) (Node/TS) · [`uphealth-signal`](../sdks/python) (Python)
|
|
130
|
-
- Get a key: https://uphealth.us/signup
|