google-health-chatgpt-selfhost
Provides read-only access to Google Health data, including daily and physical rollups, reconcile records for daily, sample, interval, sleep-session, and exercise-session data, and irregular-rhythm notification history, using scoped OAuth and fixed data-type allowlists.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@google-health-chatgpt-selfhostWhat were my activity and sleep totals for yesterday?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Health ChatGPT Self-host
An unofficial, single-user reference implementation for reading a narrowly bounded set of Google Health data from ordinary ChatGPT conversations through a private MCP connection.
This repository is source code and a deployment guide. It does not publish or expose anyone's existing MCP service, ChatGPT app, tunnel, Google Cloud project, credentials, or health data. Each deployer creates and owns an independent Google Cloud project, OAuth grant, OpenAI tunnel, host, and ChatGPT Developer Mode app.
What it provides
A Node.js stdio MCP server with exactly four read-only tools.
Four fixed Google Health read-only OAuth scopes.
Fixed data-type allowlists: 32 reconcile types, 18 rollup types, and IRN history.
Server-generated Google filters, closed-open range validation, page-size limits, and privacy-preserving field masks.
A 90,000-byte upstream response limit enforced while the response is streamed, before the full body is buffered.
Query-routing metadata embedded in MCP instructions, tool descriptions, and schemas so web ChatGPT can choose the correct operation without a separate private baseline.
A local Skill and query catalog for development, review, and evaluation. Developer Mode does not automatically import this Skill into web ChatGPT.
Google Cloud OAuth, Linux/systemd, OpenAI Secure MCP Tunnel, ChatGPT, Scheduled task, privacy, and troubleshooting guides.
Related MCP server: Yummy Health MCP
Deliberate boundaries
This project is for a private, single-user deployment. It has no write operation, public MCP endpoint, database, response cache, analytics pipeline, multi-user authentication, public Plugin Directory package, or medical-diagnosis feature. It is not a medical device.
When a tool runs, the requested health response travels from Google Health through the self-hosted process and OpenAI's tunnel to the ChatGPT conversation. The application code does not persist that response, but the deployer must separately understand and disclose the policies and retention behavior of Google, OpenAI, the hosting platform, and any infrastructure logs.
Architecture
ChatGPT conversation or Scheduled task
|
private Developer Mode app
|
OpenAI Secure MCP Tunnel
outbound HTTPS only
|
tunnel-client host
|
stdio Node.js MCP
|
Google OAuth refresh on demand
|
health.googleapis.comSecure MCP Tunnel keeps the MCP server off the public internet, but it is a private development connection and is not a path to public plugin submission.
Read-only contract
The OAuth grant is pinned to these scopes:
https://www.googleapis.com/auth/googlehealth.activity_and_fitness.readonly
https://www.googleapis.com/auth/googlehealth.health_metrics_and_measurements.readonly
https://www.googleapis.com/auth/googlehealth.irn.readonly
https://www.googleapis.com/auth/googlehealth.sleep.readonlyThe MCP server exposes:
Tool | Intended result |
| Calendar-day totals and day-by-day trends |
| 5-minute, 15-minute, 1-hour, 6-hour, or 24-hour buckets |
| Daily, sample, interval, sleep-session, or exercise-session records |
| Irregular-rhythm notification records |
The full type-to-method matrix is in skills/google-health-readonly/references/query-catalog.md.
Deployment path
Read
docs/architecture-and-scope.mdanddocs/privacy-and-security.md.Configure an independent Google Cloud project and OAuth client with
docs/google-cloud-oauth.md.Obtain the single-user offline grant with
docs/local-offline-grant.md.Build and install the MCP server with
docs/deploy-linux-systemd.md.Create and run the private tunnel with
docs/openai-secure-mcp-tunnel.md.Add and validate the Developer Mode app with
docs/chatgpt-developer-mode.md.Only after interactive acceptance, configure a recurring task with
docs/scheduled-task.md.
Do not place credentials in this repository, chat messages, issue reports, command-line arguments, screenshots, or CI variables. The setup uses file paths in environment variables; the files themselves must be owner-only.
Development
Requirements: Node.js 22 or newer, npm, and Python 3 only if you want to run the optional Codex Skill validator.
npm ci
npm run check
npm run audit:discovery
npm auditThe discovery audit contacts only Google's public API discovery document; it does not authenticate or query health data. The test suite uses synthetic fixtures.
If the Codex Skill validator is installed locally:
python3 /path/to/skill-creator/scripts/quick_validate.py skills/google-health-readonlySee CONTRIBUTING.md before submitting changes. Never include real health data, query results, account identifiers, OAuth values, tunnel IDs, or screenshots from private control planes in an issue or pull request.
Upstream policy and product availability
Google Health API access, verification, scopes, and token behavior are governed by Google. Developer Mode and Secure MCP Tunnel availability and permissions are governed by OpenAI and may vary by account or workspace. Always re-check the linked official documentation during deployment.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Consent-gated tools that turn user health notes into non-diagnostic appointment-prep materials.
Read wearables and lab health data — sleep, activity, workouts, timeseries, lab tests and orders.
AI-powered medical document management for cancer patients. Google Drive, Gmail, Calendar via MCP.
HealthGuard - 12-tool health/medical AI safety MCP: PII redaction, HIPAA, GDPR Art.9.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceSelf-hosted MCP server that provides read-only access to Google Health API v4, enabling analysis of personal health data via OpenAI Responses API or ChatGPT.-
- FlicenseNot gradedqualityBmaintenancePrivate, read-only health data bridge that reads from Android Health Connect and exposes heart rate, steps, sleep, and other health metrics to ChatGPT via MCP tools.-
- AlicenseNot gradedqualityCmaintenanceExposes Apple Health data as three read-only MCP tools (current status, details, trends) via a Cloudflare Worker, enabling AI assistants to view health metrics without modification.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to read Apple Health data through a read-only MCP server, providing tools for current health status, sleep details, and trend summaries over 7, 14, or 30 days. Data is stored privately on Cloudflare and accessed with authentication.MIT