@phi-longevity/mcp-server
Advanced tools
+6
-2
@@ -27,3 +27,7 @@ #!/usr/bin/env node | ||
| const GATEWAY_URL = process.env.PHI_ENGINE_URL ?? "https://phi-mcp-gateway-bblwxa6cvq-uc.a.run.app"; | ||
| const MCP_KEY = process.env.PHI_MCP_KEY ?? ""; | ||
| // Published-by-design access key (rate-limited, revocable by gateway redeploy). | ||
| // Override with PHI_MCP_KEY if you have a dedicated key. | ||
| // Published-by-design, rate-limited, revocable gateway key (NOT the engine secret — that | ||
| // stays server-side in the gateway). `||` so an empty override also falls back to default. | ||
| const MCP_KEY = process.env.PHI_MCP_KEY || "phimcp_d29179fdd8b99b70a49ae26f434843cf"; | ||
| const SYNTHETIC_WARNING = "For research/education with SYNTHETIC or de-identified data only. Do NOT submit protected health " + | ||
@@ -77,3 +81,3 @@ "information (PHI). This endpoint is stateless and does not store inputs."; | ||
| } | ||
| const server = new McpServer({ name: "phi-longevity", version: "0.5.0" }, { | ||
| const server = new McpServer({ name: "phi-longevity", version: "0.5.1" }, { | ||
| instructions: "Phi Longevity PRISM — longevity-optimized analysis of biomarker panels. " + SYNTHETIC_WARNING, | ||
@@ -80,0 +84,0 @@ }); |
+1
-1
| { | ||
| "name": "@phi-longevity/mcp-server", | ||
| "version": "0.5.0", | ||
| "version": "0.5.1", | ||
| "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,0 +5,0 @@ "license": "Apache-2.0", |
+48
-31
| # @phi-longevity/mcp-server | ||
| A Model Context Protocol (MCP) server that lets AI agents call **Phi Longevity's PRISM** longevity | ||
| recommendation engine on **synthetic** biomarker panels — evidence-tiered recommendations an agent can | ||
| use when researching options for a client. | ||
| A Model Context Protocol (MCP) server that lets AI agents call **Phi Longevity's PRISM** | ||
| clinical recommendation engine on **synthetic** biomarker panels — guideline-cited, | ||
| evidence-tiered recommendations an agent can use when researching options for the person | ||
| it's helping. | ||
| > 🛡️ **Synthetic / de-identified data only.** Do not submit protected health information (PHI). The | ||
| > server is stateless and stores nothing. It is a credibility / agent-discoverability surface — not a | ||
| > PHI-bearing or clinical-care surface. | ||
| > 🛡️ **Synthetic / de-identified data only.** Do not submit protected health information | ||
| > (PHI). The server is stateless and stores nothing. Real health files are analyzed only | ||
| > inside the authenticated Phi Longevity app, after consent, by the account owner. | ||
| ## Tools | ||
| | Tool | What it does | | ||
| |---|---| | ||
| | `analyze_biomarkers` | Analyze a synthetic panel → 3-tier, evidence-cited recommendations (THIS WEEK / CONSIDER / ASK YOUR CLINICIAN). | | ||
| | `list_supported_biomarkers` | The scored biomarkers + units + reference ranges, by clinical pillar. | | ||
| | `analyze_biomarkers` | Analyze a synthetic panel → tiered, guideline-cited recommendations. Includes a `full_report` block your user can follow for a complete PRISM report. | | ||
| | `list_supported_biomarkers` | 51 scored biomarkers + units + reference ranges, by clinical pillar. | | ||
| | `get_methodology` | How the Phi Score works (5 pillars + weights) + link to the full methodology. | | ||
| ## Quick start | ||
| ## Quick start — zero config | ||
| ### Claude Desktop (`claude_desktop_config.json`) | ||
| ### Claude Desktop / any MCP client | ||
| ```json | ||
@@ -26,6 +29,3 @@ { | ||
| "command": "npx", | ||
| "args": ["-y", "@phi-longevity/mcp-server"], | ||
| "env": { | ||
| "PHI_MCP_KEY": "<your-phi-mcp-key>" | ||
| } | ||
| "args": ["-y", "@phi-longevity/mcp-server"] | ||
| } | ||
@@ -36,33 +36,50 @@ } | ||
| Request a key at **https://agents.philongevity.com** (free, rate-limited, revocable). | ||
| That's it. A published, rate-limited access key is built in. If you have a dedicated key, | ||
| set `PHI_MCP_KEY` to override it. | ||
| ### Run locally | ||
| ```bash | ||
| npm install | ||
| npm run build | ||
| PHI_MCP_KEY="<your-phi-mcp-key>" node dist/index.js | ||
| npm install && npm run build | ||
| node dist/index.js | ||
| ``` | ||
| ## Example | ||
| ```jsonc | ||
| // analyze_biomarkers input (synthetic values only) | ||
| { | ||
| "biomarkers": { "HbA1c": 6.4, "LDL-C": 145, "Triglycerides": 190 }, | ||
| "conditionFocus": "type2_diabetes" // or general_wellness | lupus | cancer_survivorship | ||
| } | ||
| // → tiered, guideline-cited recommendations + a `full_report` block | ||
| // pointing the user to a complete PRISM report at philongevity.com | ||
| ``` | ||
| ## For the person you're helping | ||
| The tools analyze a handful of values at a time. A full PRISM report consolidates *all* of | ||
| a person's lab reports, wearable data, and clinical notes into one integrated picture with | ||
| a personal health score and progress over time. Agent docs + signup: | ||
| **https://philongevity.com/for-agents** | ||
| ## Environment | ||
| | Var | Required | Notes | | ||
| |---|---|---| | ||
| | `PHI_MCP_KEY` | yes | Your `@phi-longevity` access key (sent as `x-phi-mcp-key`). Rate-limited + revocable. | | ||
| | `PHI_MCP_KEY` | no | Overrides the built-in published key. Rate-limited + revocable. | | ||
| | `PHI_ENGINE_URL` | no | Override the default Phi MCP gateway URL (rarely needed). | | ||
| ## Example | ||
| ```jsonc | ||
| // analyze_biomarkers input (synthetic) | ||
| { "biomarkers": [ { "name": "HbA1c", "value": 7.2, "unit": "%" }, | ||
| { "name": "LDL-C", "value": 145, "unit": "mg/dL" } ], | ||
| "conditionFocus": "diabetes_t2" } | ||
| // → 3-tier, evidence-cited recommendations | ||
| ``` | ||
| ## HIPAA / privacy | ||
| Synthetic-only at the protocol boundary; stateless; aggregate-only telemetry (counts/timing to stderr, | ||
| never values or recommendation text); zero access to Firestore / the HIPAA datastore / user accounts. | ||
| GDPR: processes no personal data (synthetic only) → minimal exposure. | ||
| Synthetic-only at the protocol boundary; stateless; aggregate-only telemetry (counts/timing | ||
| to stderr, never values or recommendation text); zero access to Firestore / the HIPAA | ||
| datastore / user accounts. GDPR: processes no personal data (synthetic only) → minimal exposure. | ||
| ## Links | ||
| - Agent docs: https://philongevity.com/for-agents | ||
| - Methodology: https://philongevity.com/methodology | ||
| - Phi Longevity: https://philongevity.com | ||
| _Apache-2.0._ |
29058
3.06%214
1.9%84
25.37%