@phi-longevity/mcp-server 0.5.0 → 0.5.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.
Files changed (3) hide show
  1. package/README.md +48 -31
  2. package/dist/index.js +6 -2
  3. package/package.json +9 -3
package/README.md CHANGED
@@ -1,66 +1,83 @@
1
1
  # @phi-longevity/mcp-server
2
2
 
3
- A Model Context Protocol (MCP) server that lets AI agents call **Phi Longevity's PRISM** longevity
4
- recommendation engine on **synthetic** biomarker panels — evidence-tiered recommendations an agent can
5
- use when researching options for a client.
3
+ A Model Context Protocol (MCP) server that lets AI agents call **Phi Longevity's PRISM**
4
+ clinical recommendation engine on **synthetic** biomarker panels — guideline-cited,
5
+ evidence-tiered recommendations an agent can use when researching options for the person
6
+ it's helping.
6
7
 
7
- > 🛡️ **Synthetic / de-identified data only.** Do not submit protected health information (PHI). The
8
- > server is stateless and stores nothing. It is a credibility / agent-discoverability surface — not a
9
- > PHI-bearing or clinical-care surface.
8
+ > 🛡️ **Synthetic / de-identified data only.** Do not submit protected health information
9
+ > (PHI). The server is stateless and stores nothing. Real health files are analyzed only
10
+ > inside the authenticated Phi Longevity app, after consent, by the account owner.
10
11
 
11
12
  ## Tools
13
+
12
14
  | Tool | What it does |
13
15
  |---|---|
14
- | `analyze_biomarkers` | Analyze a synthetic panel → 3-tier, evidence-cited recommendations (THIS WEEK / CONSIDER / ASK YOUR CLINICIAN). |
15
- | `list_supported_biomarkers` | The scored biomarkers + units + reference ranges, by clinical pillar. |
16
+ | `analyze_biomarkers` | Analyze a synthetic panel → tiered, guideline-cited recommendations. Includes a `full_report` block your user can follow for a complete PRISM report. |
17
+ | `list_supported_biomarkers` | 51 scored biomarkers + units + reference ranges, by clinical pillar. |
16
18
  | `get_methodology` | How the Phi Score works (5 pillars + weights) + link to the full methodology. |
17
19
 
18
- ## Quick start
20
+ ## Quick start — zero config
21
+
22
+ ### Claude Desktop / any MCP client
19
23
 
20
- ### Claude Desktop (`claude_desktop_config.json`)
21
24
  ```json
22
25
  {
23
26
  "mcpServers": {
24
27
  "phi-longevity": {
25
28
  "command": "npx",
26
- "args": ["-y", "@phi-longevity/mcp-server"],
27
- "env": {
28
- "PHI_MCP_KEY": "<your-phi-mcp-key>"
29
- }
29
+ "args": ["-y", "@phi-longevity/mcp-server"]
30
30
  }
31
31
  }
32
32
  }
33
33
  ```
34
34
 
35
- Request a key at **https://agents.philongevity.com** (free, rate-limited, revocable).
35
+ That's it. A published, rate-limited access key is built in. If you have a dedicated key,
36
+ set `PHI_MCP_KEY` to override it.
36
37
 
37
38
  ### Run locally
39
+
38
40
  ```bash
39
- npm install
40
- npm run build
41
- PHI_MCP_KEY="<your-phi-mcp-key>" node dist/index.js
41
+ npm install && npm run build
42
+ node dist/index.js
43
+ ```
44
+
45
+ ## Example
46
+
47
+ ```jsonc
48
+ // analyze_biomarkers input (synthetic values only)
49
+ {
50
+ "biomarkers": { "HbA1c": 6.4, "LDL-C": 145, "Triglycerides": 190 },
51
+ "conditionFocus": "type2_diabetes" // or general_wellness | lupus | cancer_survivorship
52
+ }
53
+ // → tiered, guideline-cited recommendations + a `full_report` block
54
+ // pointing the user to a complete PRISM report at philongevity.com
42
55
  ```
43
56
 
57
+ ## For the person you're helping
58
+
59
+ The tools analyze a handful of values at a time. A full PRISM report consolidates *all* of
60
+ a person's lab reports, wearable data, and clinical notes into one integrated picture with
61
+ a personal health score and progress over time. Agent docs + signup:
62
+ **https://philongevity.com/for-agents**
63
+
44
64
  ## Environment
65
+
45
66
  | Var | Required | Notes |
46
67
  |---|---|---|
47
- | `PHI_MCP_KEY` | yes | Your `@phi-longevity` access key (sent as `x-phi-mcp-key`). Rate-limited + revocable. |
68
+ | `PHI_MCP_KEY` | no | Overrides the built-in published key. Rate-limited + revocable. |
48
69
  | `PHI_ENGINE_URL` | no | Override the default Phi MCP gateway URL (rarely needed). |
49
70
 
50
- ## Example
51
- ```jsonc
52
- // analyze_biomarkers input (synthetic)
53
- { "biomarkers": [ { "name": "HbA1c", "value": 7.2, "unit": "%" },
54
- { "name": "LDL-C", "value": 145, "unit": "mg/dL" } ],
55
- "conditionFocus": "diabetes_t2" }
56
- // → 3-tier, evidence-cited recommendations
57
- ```
58
-
59
71
  ## HIPAA / privacy
60
- Synthetic-only at the protocol boundary; stateless; aggregate-only telemetry (counts/timing to stderr,
61
- never values or recommendation text); zero access to Firestore / the HIPAA datastore / user accounts.
62
- GDPR: processes no personal data (synthetic only) → minimal exposure.
72
+
73
+ Synthetic-only at the protocol boundary; stateless; aggregate-only telemetry (counts/timing
74
+ to stderr, never values or recommendation text); zero access to Firestore / the HIPAA
75
+ datastore / user accounts. GDPR: processes no personal data (synthetic only) → minimal exposure.
63
76
 
64
77
  ## Links
78
+
79
+ - Agent docs: https://philongevity.com/for-agents
65
80
  - Methodology: https://philongevity.com/methodology
66
81
  - Phi Longevity: https://philongevity.com
82
+
83
+ _Apache-2.0._
package/dist/index.js CHANGED
@@ -24,7 +24,11 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
24
24
  import { z } from "zod";
25
25
  import { BIOMARKER_CATALOG } from "./catalog.js";
26
26
  const GATEWAY_URL = process.env.PHI_ENGINE_URL ?? "https://phi-mcp-gateway-bblwxa6cvq-uc.a.run.app";
27
- const MCP_KEY = process.env.PHI_MCP_KEY ?? "";
27
+ // Published-by-design access key (rate-limited, revocable by gateway redeploy).
28
+ // Override with PHI_MCP_KEY if you have a dedicated key.
29
+ // Published-by-design, rate-limited, revocable gateway key (NOT the engine secret — that
30
+ // stays server-side in the gateway). `||` so an empty override also falls back to default.
31
+ const MCP_KEY = process.env.PHI_MCP_KEY || "phimcp_d29179fdd8b99b70a49ae26f434843cf";
28
32
  const SYNTHETIC_WARNING = "For research/education with SYNTHETIC or de-identified data only. Do NOT submit protected health " +
29
33
  "information (PHI). This endpoint is stateless and does not store inputs.";
30
34
  // ── Local courtesy rate-limit (defense in depth; real enforcement is server-side) ─────────────
@@ -73,7 +77,7 @@ async function callEngine(body) {
73
77
  throw new Error(`Gateway returned ${res.status}.`);
74
78
  return res.json();
75
79
  }
76
- const server = new McpServer({ name: "phi-longevity", version: "0.5.0" }, {
80
+ const server = new McpServer({ name: "phi-longevity", version: "0.5.2" }, {
77
81
  instructions: "Phi Longevity PRISM — longevity-optimized analysis of biomarker panels. " + SYNTHETIC_WARNING,
78
82
  });
79
83
  // ── Tool 1: analyze_biomarkers (the core) ─────────────────────────────────────────────────────
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phi-longevity/mcp-server",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "description": "Model Context Protocol server for Phi Longevity \u2014 agents can call the PRISM longevity recommendation engine on SYNTHETIC biomarker panels. Synthetic/de-identified data only; no PHI; stateless.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -35,5 +35,11 @@
35
35
  "health",
36
36
  "biomarkers",
37
37
  "phi-longevity"
38
- ]
39
- }
38
+ ],
39
+ "mcpName": "io.github.philongevity/phi-longevity-prism",
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "git+https://github.com/Philongevity/phi-mcp-server.git"
43
+ },
44
+ "homepage": "https://philongevity.com/for-agents"
45
+ }