google-health-chatgpt-selfhost
Lets a single user read a bounded set of their own Google Health data from ChatGPT conversations through a private MCP connection, exposing four read-only tools for rollups, reconciled records, and irregular-rhythm notification history.
README
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.
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.com
Secure 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.readonly
The MCP server exposes:
| Tool | Intended result |
|---|---|
google_health_daily_rollup |
Calendar-day totals and day-by-day trends |
google_health_physical_rollup |
5-minute, 15-minute, 1-hour, 6-hour, or 24-hour buckets |
google_health_reconcile |
Daily, sample, interval, sleep-session, or exercise-session records |
google_health_irn_list |
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 audit
The 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-readonly
See 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.