records-connector
Read-only access to a household's medrec records folder in Google Drive, enabling assistants to search records, retrieve summaries, filter and page record types, and read extracted document text.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Own Your Health connector
A read-only MCP connector over a household's medrec records folder in Google Drive. It runs as a Cloudflare Worker in the household's own Cloudflare account. An assistant that accepts remote MCP connectors (Claude on the web, phone and desktop, and others; see Assistants) can then answer questions from the records, with no computer left on to serve them.
It offers the four tools of medrec mcp 0.5.0 under the same names, with the
same descriptions and schemas (spec/medrec-tools.json). The answers are the
same too: test/golden.test.ts holds 154 recorded calls of medrec mcp to
this connector's answers, to the character.
Tool | What it answers |
| The household's people; with |
| Every document, record, study and note holding all the query's words |
| One kind of record (medications, results, tests, visits, claims, bills, documents, notes, the timeline…), filtered and paged |
| A document's extracted text, a part at a time |
Not affiliated with Anthropic, Google, OpenAI or Cloudflare.
How it keeps the records private
Read-only. The Worker asks Google for
drive.file(or, if you choose,drive.readonly), and its code has no path that writes.Nothing stored. Each call lists the records folder with the caller's own Google token and reads what it needs. Parsed files are kept only in the isolate's memory, and only while their version in Drive is unchanged. Nothing goes to KV, D1, R2 or the cache API, and request logs are off (
observabilityinwrangler.jsonc).Only your accounts. Signing in goes through Google, and only the accounts in
ALLOWED_ACCOUNTSare admitted. The list is checked again on every call and every token refresh, so removing an account ends its connections.Only your assistants. Authorization codes go only to the callbacks of the assistants you turn on (
ASSISTANTS). The consent page names where access goes, and asks you to continue only if you started connecting yourself.Tokens encrypted. Google's refresh token lives in the connection's grant, which workers-oauth-provider encrypts in KV with a key only that connection's tokens unlock.
An audit with no contents. Each call records the time, the Google account, the connection, the assistant and the tool name in D1. It never records arguments or results.
Errors without contents. Tool errors carry no record text, and none of Drive's own messages.
What it cannot protect against: anyone who controls your Cloudflare account, your Google account, or your assistant account. Your assistant's provider sees what the tools return, as with any connector.
Related MCP server: apple-health-shortcuts-mcp
Costs
Run it on Workers Paid ($5 a month). The Free plan allows 10 ms of CPU a request, and a folder of a few years' records needs more on the first call after a quiet spell:
Call, over a synthetic folder of 5.5 MB of index and 6.5 MB of text | CPU, warm | CPU, cold |
| 6.5 ms | — |
| 16 ms | 32 ms |
| 16 ms | 134 ms |
| 11 ms | — |
| 12 ms | — |
| 12 ms | — |
Measured with npm run bench (workerd under wrangler dev on an Apple
silicon Mac, mean of 40 calls, 2026-11-23); runs differ by about 5 ms. The
local KV and D1 simulators add CPU that production does not spend. A call is
cold on a fresh isolate or after a file changed. Workers
Paid allows 30 s and includes far more requests than one household makes.
Cloudflare's dashboard shows the deployed Worker's own CPU times.
Set it up
You need: a Cloudflare account, a GitHub account, the Google Cloud project your medrec signs in with, and Node 22.18 or newer.
1. Cloudflare
Create a Cloudflare account for the connector. A separate one keeps its usage apart from anything else you run.
Open Workers & Pages once, so the account gets its
workers.devsubdomain. Note the account id in the right-hand column.Subscribe the account to Workers Paid (see Costs).
Create an account API token: Manage Account > Account API Tokens > Create Token, with Workers Scripts: Edit, Workers KV Storage: Edit and D1: Edit, for this account only. The first deploy creates the connector's KV namespace and D1 database itself.
2. GitHub
Fork this repository, or copy it into one of your own. The public repository holds no household's data, and yours never needs to.
Settings > Environments > New environment, named
production. Under Deployment branches and tags, choose Selected branches and addmain.In that environment, add two environment secrets:
CLOUDFLARE_API_TOKEN(the token from step 1.4) andCLOUDFLARE_ACCOUNT_ID. Paste the token straight from Cloudflare's page. Nothing else goes into GitHub.
Each push to main then runs the checks and deploys
(.github/workflows/ci.yml). A pull request runs the checks only, and never
sees the environment's secrets. Every action is pinned by commit, and the
workflow's token can only read. The first deploy prints the Worker's address,
https://records-connector.<subdomain>.workers.dev.
To deploy from your computer instead, fill in connector.local.json (below)
and run npm ci && npm run deploy. Wrangler signs you in on first use.
3. Google
The connector's own sign-in is a Web client in the same Cloud project as
medrec's. Under drive.file, the clients of one project share access to
the files any of them made. So the connector can read the records folder
medrec made, and nothing else in the account
(pk-cli-drive's test).
In the Cloud console, Google Auth Platform > Clients > Create client, type Web application.
Under Authorized redirect URIs, add
https://records-connector.<subdomain>.workers.dev/google/callback.Create it, and click Download JSON without copying anything from the dialog. The file holds the client secret.
Under Data Access, the project needs
openid,.../auth/userinfo.emailand.../auth/drive.file(ordrive.readonly, if your records folder was not made by medrec's client).
4. Settings
cp connector.example.json connector.local.json # git ignores it; fill it in
npm ci
npm run setup -- ~/Downloads/client_secret_….json
rm ~/Downloads/client_secret_….jsonnpm run setup sends everything to the Worker in one
wrangler secret bulk over stdin. No value is printed or passed as an
argument. It sets GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET,
ALLOWED_ACCOUNTS, FOLDER_ID, and optionally TIME_ZONE (for "past due"),
ASSISTANTS and DRIVE_SCOPE. Deploys never change them. After editing
connector.local.json, run npm run setup -- --settings-only.
FOLDER_ID is the records folder's Drive id: the part after /folders/ in
its link, in the folder holding household.json.
5. Connect an assistant
The connector's address is https://records-connector.<subdomain>.workers.dev/mcp.
Claude (web, desktop, phone): Settings > Connectors > Add custom connector, paste the address, then Connect. Sign in with an admitted Google account. A connector added on the web also appears in the phone and desktop apps.
Claude Code:
claude mcp add --transport http records <address>.ChatGPT: add
chatgpttoassistants, runnpm run setup -- --settings-only, then add the address as a connector on chatgpt.com.Gemini: add
geminitoassistantsand run setup, then add the address at gemini.google.com in a browser. The app then reaches it with@.Gemini CLI: add
loopback, and insettings.jsonundermcpServers,"records": { "httpUrl": "<address>" }.
Assistants
Assistant |
| Callback | Tested |
Claude (web, desktop, phone) |
|
| not yet |
Claude Code, Gemini CLI, other programs on your computer |
|
| not yet |
ChatGPT |
|
| not yet |
Gemini (web; the phone app uses what the web added) |
|
| not yet |
Perplexity |
|
| not yet |
EXTRA_REDIRECT_URIS (comma-separated, matched exactly) allows any other.
Revoking, and seeing who used it
npm run grants # every connection: account, assistant, when, id
npm run grants -- revoke <id> # end one connection
npm run grants -- revoke --all # end them all
npm run audit # who called what, the last 7 days
npm run audit -- --since 2026-11-01 --limit 500These run wrangler against the account in connector.local.json. Ending a
connection deletes its grant and tokens from KV, along with the Google
refresh token inside. A connection also ends on its own after 60 days unused.
The connector never revokes anything at Google: every client of the Cloud project shares one grant, so a revoke would also sign you out of medrec and the web app. To cut off the connector's own client entirely, delete it in the Cloud console.
Development
npm ci
npm test # parity with medrec, the Worker end to end, the pieces
npm run verify # what CI runs: types, tests, pinned copies, no personal data, bundle
npm run golden # re-record medrec's answers (needs `medrec` on PATH)
npm run bench # CPU per call in workerd, over a large synthetic folder
npm run dev # the Worker on 127.0.0.1:8787Every record in the tests is invented. test/fixtures/records is the web
app's demo folder; scripts/synth.mjs grows it to a large family's size.
Google is test/fake-google.ts. The Drive client is a pinned copy of
own-your-health/app's
(src/records/app/PIN.json, checked by scripts/check-copies.mjs).
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Household health records with source attribution. Read and add records with OAuth approval.
AI-powered medical document management for cancer patients. Google Drive, Gmail, Calendar via MCP.
Your MedNode health vault in your AI assistant — records, summaries, labs, appointments.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely access and manage Google Docs, Sheets, and Drive documents via Cloudflare Workers.-
- AlicenseNot gradedqualityNot gradedmaintenanceMCP server that provides read-only access to Apple Health data via three tools (health_now, health_detail, health_trends), letting AI assistants query recent activity, sleep, and trends securely through a Cloudflare-deployed API.3MIT
- AlicenseNot gradedqualityNot gradedmaintenanceExposes 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 gradedqualityNot gradedmaintenanceEnables 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