Health data is data you want an assistant to read and never to change. That makes it a good case study for the Model Context Protocol (MCP): you can design a server where "read-only" is a property of the architecture, not a sentence in the docs. Here is how the pieces fit together, and where the limits are.
Why remote, not local
A local MCP server runs on your machine and talks over stdio. It is simple, but every user must install and secure it, and it does not work from a phone or a browser-based assistant. A remote server speaks MCP over HTTP (the Streamable HTTP transport), so the assistant just connects to a URL and the user installs nothing. The cost moves to the author, who now holds credentials and has to protect them.
Authorization: OAuth, not keys pasted into a chat
A remote server must know which person is calling. The MCP specification builds on OAuth 2.1, so an assistant can run an authorization-code flow with PKCE:
- The client calls your endpoint without a token and receives a 401 that points to the protected resource metadata (RFC 9728).
- It reads your authorization server metadata (RFC 8414) and registers itself dynamically (RFC 7591), so nobody has to share a client secret by hand.
- The user lands on your sign-in page, approves the request, and the client receives a short-lived access token.
The consequences are good ones: tokens are per user and revocable, the assistant never sees the upstream password, and you decide what a token may do. For health data I would keep the scope list boring: one read scope, nothing else. Encrypt tokens at rest and keep their lifetime short.
Tools: few, narrow, bounded
Every tool is a function the model may call. Four rules that held up:
- Name tools after questions, not endpoints: sleep for a date range, activities in a period, HRV trend.
- Require a date range and cap it. Return a summary plus a way to ask for more, never the full dump: huge payloads make answers worse.
- State units and time zones in the output. "Resting heart rate: 52 bpm" is fine, "sleep: 7.2" is not.
- Annotate honestly. MCP lets a tool declare hints about its behavior:
{ "name": "get_sleep", "description": "Sleep sessions for a date range (90 days maximum).", "annotations": { "readOnlyHint": true, "destructiveHint": false, "idempotentHint": true, "openWorldHint": true } } Hints are advisory: a client may use them to skip a confirmation prompt, but nothing enforces them. Real read-only behavior comes from the server: never hold a credential that can write, never expose a write tool.
One subtlety: a "refresh" tool that asks your server to re-sync from the upstream source changes your own cache, not the user's account. Say so in its description instead of hiding it behind the word read-only.
Limits worth stating upfront
- Read-only is not harmless. The model reads the data into its context, and what the assistant vendor does with conversations is outside your server's control. Tell users.
- Prompt injection. Text that comes from the data source, such as an activity title or a note, can contain instructions. With no write tools the damage is bounded, but treat every tool result as untrusted input.
- Freshness. Your server knows only what the upstream has synced. Tell the model how old the data is.
- Deletion. If you keep synced copies, disconnecting must delete them. Test that path.
- Errors. Return short, plain messages the model can relay.
Where I applied this
I used these ideas in garmlink, my own project: a free hosted MCP server that connects a Garmin Connect account to assistants such as Claude and ChatGPT. It is read-only, signs in with OAuth, and is independent of Garmin (no affiliation, no endorsement). You can see the flow from the user's side at garmlink.
Which limits would you add to the list?
Sébastien from garmlink



