{"_id":"@aion-health/bridge","_rev":"5-35effc21242b4b02c11a5087719a8d34","name":"@aion-health/bridge","dist-tags":{"latest":"2.0.2"},"versions":{"2.0.0":{"name":"@aion-health/bridge","version":"2.0.0","keywords":["mcp","cli","health","fhir","claude","claude-code","ai","aion"],"license":"PolyForm-Noncommercial-1.0.0","_id":"@aion-health/bridge@2.0.0","maintainers":[{"name":"easpencer1","email":"easpencer@gmail.com"}],"homepage":"https://github.com/easpencer/Aion","bugs":{"url":"https://github.com/easpencer/Aion/issues"},"bin":{"aion-health":"dist-bundle/aion-health.cjs"},"dist":{"shasum":"6c9ae23b00e938266daf3d5a28d828cc0a249264","tarball":"https://registry.npmjs.org/@aion-health/bridge/-/bridge-2.0.0.tgz","fileCount":4,"integrity":"sha512-7G6L/Em3tDcnLewRfvtIYOj86J43ccZ/KIy5TMpkaCD4DT2bEWFWAOoWyvaRvSeVo99VonNxqxq/0EBzKgWZLA==","signatures":[{"sig":"MEYCIQCcdStI27p+xg59X8Hp07ZtsUY30C8msooDQVkDOZdRRAIhAJN2qg4KyH2ZhCiQ64JqgdCTSS2jIT1uhYB2UbmRBAXQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":960207},"main":"dist-bundle/aion-health.cjs","type":"module","engines":{"node":">=18"},"gitHead":"23a2df48ac42cb92d1b5b205e1ebba8d9e016f76","scripts":{"build":"tsc","setup":"node dist-bundle/aion-health.cjs setup","start":"node dist-bundle/aion-health.cjs","bundle":"mkdir -p dist-bundle && esbuild dist/index.js --bundle --platform=node --target=node20 --outfile=dist-bundle/aion-health.cjs --format=cjs --define:__AION_MCP_VERSION__=\"\\\"$npm_package_version\\\"\"","export":"node dist-bundle/aion-health.cjs export","repair":"node dist-bundle/aion-health.cjs repair","pkg:all":"npm run pkg:mac-arm64 && npm run pkg:mac-x64 && npm run pkg:win && npm run pkg:linux && npm run pkg:linux-arm","pkg:win":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-win-x64     --output bin/aion-health-windows.exe","discover":"node dist-bundle/aion-health.cjs discover","pkg:linux":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-linux-x64   --output bin/aion-health-linux-x64","pkg:mac-x64":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-macos-x64   --output bin/aion-health-macos-x64","pkg:linux-arm":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-linux-arm64 --output bin/aion-health-linux-arm64","pkg:mac-arm64":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-macos-arm64 --output bin/aion-health-macos-arm64","prepublishOnly":"npm run build && npm run bundle"},"_npmUser":{"name":"easpencer1","email":"easpencer@gmail.com"},"repository":{"url":"git+https://github.com/easpencer/Aion.git","type":"git"},"_npmVersion":"10.9.2","description":"Connect Claude Code and other MCP clients (and your terminal) to your personal health data via the Aion local FHIR bridge","directories":{},"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.18.0","zod":"^3.23.0","esbuild":"^0.24.2","@types/ws":"^8.5.14","typescript":"^5.7.0","@yao-pkg/pkg":"^5.16.1","@aion-health/core":"file:../shared","@modelcontextprotocol/sdk":"^1.29.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_2.0.0_1780682111592_0.644513112691887","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.1":{"name":"@aion-health/bridge","version":"2.0.1","keywords":["mcp","cli","health","fhir","claude","claude-code","ai","aion"],"license":"PolyForm-Noncommercial-1.0.0","_id":"@aion-health/bridge@2.0.1","maintainers":[{"name":"easpencer1","email":"easpencer@gmail.com"}],"homepage":"https://github.com/easpencer/Aion","bugs":{"url":"https://github.com/easpencer/Aion/issues"},"bin":{"aion-health":"dist-bundle/aion-health.cjs"},"dist":{"shasum":"114875691c829045a2e2252b6dc80bbf63470e5c","tarball":"https://registry.npmjs.org/@aion-health/bridge/-/bridge-2.0.1.tgz","fileCount":4,"integrity":"sha512-5v9GZeJB3Jd5efKftSLdzuHS2zGLOsH5tAexDHweZD1IMxVjaVb59y0Cm9zM+yydCHbgPb2fXzLrglEMZCwjSQ==","signatures":[{"sig":"MEUCIEfukm8SV2zoj4F6sMexBC5gVWYO3y56oW2EUZzjTca3AiEAngxVhrS7MjNN0dSInTavIeOjwB7FlGfajxikPSNAdbI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":963297},"main":"dist-bundle/aion-health.cjs","type":"module","engines":{"node":">=18"},"gitHead":"8c5a9007052ff5879c51250dd200bcdd0e0f36ed","scripts":{"build":"tsc","setup":"node dist-bundle/aion-health.cjs setup","start":"node dist-bundle/aion-health.cjs","bundle":"mkdir -p dist-bundle && esbuild dist/index.js --bundle --platform=node --target=node20 --outfile=dist-bundle/aion-health.cjs --format=cjs --define:__AION_MCP_VERSION__=\"\\\"$npm_package_version\\\"\"","export":"node dist-bundle/aion-health.cjs export","repair":"node dist-bundle/aion-health.cjs repair","pkg:all":"npm run pkg:mac-arm64 && npm run pkg:mac-x64 && npm run pkg:win && npm run pkg:linux && npm run pkg:linux-arm","pkg:win":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-win-x64     --output bin/aion-health-windows.exe","discover":"node dist-bundle/aion-health.cjs discover","pkg:linux":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-linux-x64   --output bin/aion-health-linux-x64","pkg:mac-x64":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-macos-x64   --output bin/aion-health-macos-x64","pkg:linux-arm":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-linux-arm64 --output bin/aion-health-linux-arm64","pkg:mac-arm64":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-macos-arm64 --output bin/aion-health-macos-arm64","prepublishOnly":"npm run build && npm run bundle"},"_npmUser":{"name":"easpencer1","email":"easpencer@gmail.com"},"repository":{"url":"git+https://github.com/easpencer/Aion.git","type":"git"},"_npmVersion":"10.9.2","description":"Connect Claude Code and other MCP clients (and your terminal) to your personal health data via the Aion local FHIR bridge","directories":{},"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.18.0","zod":"^3.23.0","esbuild":"^0.24.2","@types/ws":"^8.5.14","typescript":"^5.7.0","@yao-pkg/pkg":"^5.16.1","@aion-health/core":"file:../shared","@modelcontextprotocol/sdk":"^1.29.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_2.0.1_1780703155567_0.4508508022557913","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.2":{"name":"@aion-health/bridge","version":"2.0.2","keywords":["mcp","cli","health","fhir","claude","claude-code","ai","aion"],"license":"PolyForm-Noncommercial-1.0.0","_id":"@aion-health/bridge@2.0.2","maintainers":[{"name":"easpencer1","email":"easpencer@gmail.com"}],"homepage":"https://github.com/easpencer/Aion","bugs":{"url":"https://github.com/easpencer/Aion/issues"},"bin":{"aion-health":"dist-bundle/aion-health.cjs"},"dist":{"shasum":"23e94e628f90b0c719910ad9805bab8c57a406e6","tarball":"https://registry.npmjs.org/@aion-health/bridge/-/bridge-2.0.2.tgz","fileCount":4,"integrity":"sha512-i8CD/3U/9xoN/wyiLMDzj/WAfzCI+2XzzF76UMUD6LO1F7GO3PzAlhloSsJnLMwKyhxrNTK7Rtx/nZxousYIKA==","signatures":[{"sig":"MEYCIQCERTSj/7HYRJFfIVZbk6SFF5CBaRRKS8XDCJjih3aQcQIhAL3rc7lhBhpGwtPX6kZ906DZMyu4rzflVcPLD+k9BNhP","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":964925},"main":"dist-bundle/aion-health.cjs","type":"module","engines":{"node":">=18"},"gitHead":"e3ba1a6c55de5003004b5aa398fb6f8dc912aea0","scripts":{"build":"tsc","setup":"node dist-bundle/aion-health.cjs setup","start":"node dist-bundle/aion-health.cjs","bundle":"mkdir -p dist-bundle && esbuild dist/index.js --bundle --platform=node --target=node20 --outfile=dist-bundle/aion-health.cjs --format=cjs --define:__AION_MCP_VERSION__=\"\\\"$npm_package_version\\\"\"","export":"node dist-bundle/aion-health.cjs export","repair":"node dist-bundle/aion-health.cjs repair","pkg:all":"npm run pkg:mac-arm64 && npm run pkg:mac-x64 && npm run pkg:win && npm run pkg:linux && npm run pkg:linux-arm","pkg:win":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-win-x64     --output bin/aion-health-windows.exe","discover":"node dist-bundle/aion-health.cjs discover","pkg:linux":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-linux-x64   --output bin/aion-health-linux-x64","pkg:mac-x64":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-macos-x64   --output bin/aion-health-macos-x64","pkg:linux-arm":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-linux-arm64 --output bin/aion-health-linux-arm64","pkg:mac-arm64":"npm run build && npm run bundle && mkdir -p bin && pkg dist-bundle/aion-health.cjs --target node20-macos-arm64 --output bin/aion-health-macos-arm64","prepublishOnly":"npm run build && npm run bundle"},"_npmUser":{"name":"easpencer1","email":"easpencer@gmail.com"},"repository":{"url":"git+https://github.com/easpencer/Aion.git","type":"git"},"_npmVersion":"10.9.2","description":"Connect Claude Code and other MCP clients (and your terminal) to your personal health data via the Aion local FHIR bridge","directories":{},"_nodeVersion":"23.11.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"ws":"^8.18.0","zod":"^3.23.0","esbuild":"^0.24.2","@types/ws":"^8.5.14","typescript":"^5.7.0","@yao-pkg/pkg":"^5.16.1","@aion-health/core":"file:../shared","@modelcontextprotocol/sdk":"^1.29.0"},"_npmOperationalInternal":{"tmp":"tmp/bridge_2.0.2_1780758919423_0.32541895932499254","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2026-06-05T17:55:11.372Z","modified":"2026-09-12T21:43:15.335Z","2.0.0":"2026-06-05T17:55:11.805Z","2.0.1":"2026-06-05T23:45:55.773Z","2.0.2":"2026-06-06T15:15:19.586Z"},"bugs":{"url":"https://github.com/easpencer/Aion/issues"},"license":"PolyForm-Noncommercial-1.0.0","homepage":"https://github.com/easpencer/Aion","keywords":["mcp","cli","health","fhir","claude","claude-code","ai","aion"],"repository":{"url":"git+https://github.com/easpencer/Aion.git","type":"git"},"description":"Connect Claude Code and other MCP clients (and your terminal) to your personal health data via the Aion local FHIR bridge","maintainers":[{"name":"easpencer1","email":"easpencer@gmail.com"},{"name":"rishi.graham","email":"rishi.graham@blihealth.com"}],"readme":"# Aion Bridge MCP\n\nConnect [Claude Code](https://claude.ai/code) (and other MCP clients) to your personal health data via the **Aion local FHIR bridge**. Everything stays on your local network — no cloud, no servers, no data leaving your home.\n\n> Source-available under [PolyForm-Noncommercial-1.0.0](./LICENSE) — free for personal and non-commercial use. Commercial use requires a license from Bionic Light Industries.\n\n## How it works\n\n```\nYour phone (Aion app)\n    ↕  WebSocket on local WiFi (port 8420, wss)\nYour PC (this MCP server)\n    ↕  stdio\nClaude Code / Cursor / Windsurf / …\n```\n\nClaude gets tools to query your FHIR health records (vitals, labs, conditions, medications, and more) and can reason about them directly.\n\n---\n\n## Quickstart\n\n### Fastest — npx (no install)\n\n```bash\nnpx -y @aion-health/bridge setup\n```\n\nThis auto-detects your installed AI clients (Claude Code, Claude Desktop, Cursor,\nWindsurf, Gemini CLI, Zed), finds your phone on the local network, and writes the\nright config for each. The published package is a single self-contained file — no\ndependencies to install.\n\n### Alternative — Aion Desktop companion\n\nThe **Aion Desktop** app ships this MCP server bundled, finds your phone, and\nwrites `.mcp.json` for every detected client. Open Aion Desktop → Connect → \"Set\nup AI clients\" and pick a launch method:\n\n- **npx (default)** — config runs `npx -y @aion-health/bridge`.\n- **Bundled binary** — config points at the executable inside the installed app. No Node.js required.\n\n### From a checkout\n\n```bash\nnpm install\nnpm run build && npm run bundle\nnode dist-bundle/aion-health.cjs setup\n```\n\nThe wizard auto-detects installed clients (Claude Code, Claude Desktop, Cursor, Windsurf, Gemini CLI, Zed) and writes their configs, plus prints manual snippets for Continue.dev and OpenAI Codex.\n\n---\n\n## Prerequisites\n\n1. **Aion app** installed on your phone, with data synced\n2. Phone and PC on the **same WiFi network** (or connected over USB — see below)\n3. Bridge running: **Aion app → Settings → Bridge → Start Bridge**\n4. The **6-digit pairing code** shown in the app\n\n---\n\n## .mcp.json reference\n\nAfter running `setup`, your AI client uses this config automatically. To configure manually:\n\n```json\n{\n  \"mcpServers\": {\n    \"aion-health\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aion-health/bridge\"],\n      \"env\": {\n        \"AION_BRIDGE_URL\": \"wss://192.168.1.100:8420\",\n        \"AION_PAIRING_CODE\": \"123456\"\n      }\n    }\n  }\n}\n```\n\nFor the bundled-binary launch method, `command` is the absolute path to the executable and `args` is empty.\n\n`AION_BRIDGE_URL` is optional — if omitted, the server auto-discovers your phone via Bonjour/mDNS, the ARP cache, and a TCP subnet scan.\n\n---\n\n## Available tools\n\n| Tool                  | Description                                                             |\n|-----------------------|-------------------------------------------------------------------------|\n| `fhir_summary`        | Counts of all FHIR resources by type — call first                       |\n| `fhir_query`          | Query a resource type with the full predicate surface                   |\n| `fhir_get`            | Fetch a single resource by type + id                                    |\n| `fhir_record`         | Record a new Observation                                                |\n| `analyze_health`      | Natural-language question answered by an LLM via the bridge (`AION_ANALYZE_*`) |\n| `export_health_data`  | Full FHIR R4 Bundle export                                              |\n| `health_graph_report` | Natural-language report over the health knowledge graph                 |\n| `health_audit`        | Recent bridge audit log                                                 |\n\n---\n\n## CLI subcommands\n\n```bash\nnpx @aion-health/bridge setup      # Interactive setup wizard\nnpx @aion-health/bridge repair     # Update the pairing code after a bridge restart\nnpx @aion-health/bridge discover   # Scan for the phone, print its URL\nnpx @aion-health/bridge export     # Write a FHIR Bundle to stdout or --output file\n```\n\nIt also doubles as a direct-to-bridge CLI (uses `AION_BRIDGE_URL` + `AION_PAIRING_CODE`, no server needed):\n\n```bash\nnpx @aion-health/bridge summary                                   # counts by type\nnpx @aion-health/bridge query Observation --category vital-signs --limit 20\nnpx @aion-health/bridge query Condition --json > conditions.json  # raw FHIR\nnpx @aion-health/bridge get Observation obs-123\nnpx @aion-health/bridge count Observation\nnpx @aion-health/bridge analyze \"Any concerning trends in my labs?\"\nnpx @aion-health/bridge graph                                     # knowledge-graph report\nnpx @aion-health/bridge audit --limit 30\n```\n\nUSB mode (no WiFi): `npx @aion-health/bridge setup --usb`, with `iproxy 8420 8420` (iOS) or `adb forward tcp:8420 tcp:8420` (Android) running — or let Aion Desktop manage USB automatically.\n\n---\n\n## Build standalone binaries\n\n```bash\nnpm install      # dev deps (esbuild + pkg + the shared lib)\nnpm run pkg:all  # builds all 5 platform binaries → bin/\n```\n\nThe binaries embed the entire server (the shared `@aion-health/core` library and\n`ws` are inlined at bundle time), so they run with no `node_modules` present.\n\n---\n\n## Development\n\nThis package consumes `@aion-health/core` (the shared bridge protocol / WebSocket\nclient / discovery / MCP-client config) via a `file:` dev dependency on `../shared`.\nThe build (`npm run build && npm run bundle`) inlines it into a single\n`dist-bundle/aion-health.cjs` — that bundle is the published `bin` and has\n**zero runtime dependencies**. Run `npm run build` in `../shared` first if you\nchange it. Source lives in the [Aion monorepo](https://github.com/easpencer/Aion).\n\n## License\n\nSource-available under [PolyForm-Noncommercial-1.0.0](./LICENSE). Free for personal\nand non-commercial use. Commercial use requires a license from Bionic Light Industries.\n","readmeFilename":"README.md"}