How does sign-in stay on Hi Doctor?
Your password is never entered on the connector or in the AI app.- The app starts a standard authorization-code flow with PKCE (
S256only) atmcp.hi-doctor.ai. - The server validates the request and forwards your browser to hi-doctor.ai, where you sign in with a password or Google, or create an account. The website asks for a fresh sign-in even if you already have a session, and does not change that session.
- hi-doctor.ai returns a short-lived, signed, single-use handoff to the connector. The connector verifies its signature, issuer, audience, binding to this specific request, and that the sign-in was recent, then shows the approval page.
- Only after you select Approve connection does the connector redeem the handoff with the Hi Doctor API and issue a single-use authorization code to the app.
access_denied to the app. A handoff or approval page that
has already been used cannot be used again.
Every redirect back to the app, including errors, carries
iss=https://mcp.hi-doctor.ai (RFC 9207), so an app talking to several
authorization servers can check which one answered before redeeming the
code.
Where can a code be sent?
Apps register through dynamic client registration. The client ID the server issues is signed and binds the exact redirect URIs the app registered. At authorization time theredirect_uri must match that binding exactly, so a
leaked client ID cannot be used to send a code somewhere else. Loopback
redirects for desktop apps may change port (RFC 8252).
How are tokens protected?
- Tokens are encrypted envelopes (AES-256-GCM) bound to the
https://mcp.hi-doctor.ai/mcpaudience. A token presented to another resource, tampered with, or used as the wrong token type is rejected. - Refresh tokens are single-use. Each refresh issues a new one; replaying an old one fails.
- No token passthrough. The Hi Doctor API credentials inside an envelope never leave the server. The app only ever holds the connector’s own tokens, and the server does not accept tokens it did not issue.
- Revocation ends the whole connection. Once an app revokes a token, every token from that connection is rejected on the next request.
How are permissions enforced?
Seven scopes control which groups of tools are offered. The account is read from Hi Doctor when the connection is approved and checked again on every token refresh and before every committed action; a refresh can narrow the granted scopes but never widen them. Details are on Permissions. A patient account reaches only its own records. The connector adds no access beyond what the Hi Doctor API already allows that account.Consent before consequences
Consequential actions, such as sending a message, submitting a questionnaire, or changing a plan, use approval links. The tool only prepares the action. The person opens the link and signs in through the same delegated sign-in on hi-doctor.ai; a connector token or a tool argument can never stand in for that sign-in. The approval page checks that the person is the account that prepared the action, shows a summary written by Hi Doctor, and accepts only an approve or decline of that exact summary. It is protected against cross-site requests and cannot be framed by another site. Tool hints also mark which tools only read and which change data, so MCP clients can ask you before calling them. Hints help the client; they do not replace the server’s authorization checks, and assistant builders should still ask for explicit confirmation in the conversation.Confidential documents and links
Prescription, invoice and other document tools return a link instead of the file itself. On current connections the link only opens after authentication, either with the connection’s own token or by signing in on hi-doctor.ai, and Hi Doctor checks the account’s access again on every download. A connection made before approval links existed may instead receive a signed link that opens without signing in; the result says so in itsdelivery field.
Treat documents and every link in results, such as a Stripe billing link, as
confidential: give them only to the patient, never repeat them in a shared or
public place, and do not store them.
What does the server keep and log?
- The connector never receives your password: it is entered only on hi-doctor.ai.
- The server keeps no token database. Its grant store holds short-lived, single-use markers (for codes, handoffs and refresh tokens), revocation markers, encrypted approval records and their receipts, kept for up to 30 days, and encrypted uploaded files, kept for up to 10 minutes. Every record has an expiry.
- Text returned to the app is scrubbed of token-like strings.
- Errors from the Hi Doctor API are reduced to a code, a message and the fields needed to fix the request; internal error details are not passed on.
Payment and clinical limits
The connector never handles card details: checkout and billing changes happen on Stripe’s pages. Every consultation is reviewed in full by an EU-licensed doctor, who decides on medical grounds only; see Safety. Clinical eligibility is enforced by the Hi Doctor API when a questionnaire is submitted, whatever the assistant says.Reporting a problem
Email hello@hi-doctor.ai. If you believe patient data is exposed, say so in the subject line so it is triaged first.Frequently asked questions
Does the AI app ever see my Hi Doctor password?
No. You sign in only on hi-doctor.ai, and the connector never stores or logs a password.Can a stolen MCP token be used against another service?
No. Each token is encrypted and bound to the Hi Doctor MCP endpoint, and any other resource rejects it. The Hi Doctor API credentials inside it never leave the server.Can someone approve an action for me with my connector token?
No. An approval needs a fresh sign-in on hi-doctor.ai by the same account that prepared the action. A token or a tool argument cannot stand in for it.Are prescription download links safe to share?
No. Treat every document and link in a result as confidential, give it only to the patient, and never post or store it.What happens to my data when I revoke a connection?
The connection’s tokens stop working on the next request. Your records stay in your Hi Doctor account; the connector keeps only short-lived, encrypted records that expire on their own.How do I report a security problem?
Email hello@hi-doctor.ai. If you believe patient data is exposed, say so in the subject line so it is triaged first.Next steps
Permissions
What each permission allows and what is never allowed.
Streamable HTTP
Endpoint, OAuth discovery, token lifetimes and limits.