Skip to main content
Hi Doctor is a remote MCP server at https://mcp.hi-doctor.ai/mcp that uses the Streamable HTTP transport with OAuth 2.1 authorization. Use this page when your client has no dedicated guide or when you write your own MCP client. It is also the reference for token lifetimes, rate limits and result size limits. Last reviewed: 2026-11-04

Endpoint

POST https://mcp.hi-doctor.ai (no path) is an alias of the same resource: tokens bound to /mcp work there too. /mcp is the canonical resource; use it in configuration and as the OAuth resource value, never the no-path form. GET https://mcp.hi-doctor.ai/healthz needs no token and returns the service status.

Protocol versions

The server uses the legacy initialize handshake and negotiates these protocol versions: 2025-11-25 (latest), 2025-06-18, 2025-03-26, 2024-11-05 and 2024-10-07. The 2026-07-28 specification removes initialize and protocol sessions and adds server/discover. Hi Doctor does not support the 2026-07-28 protocol; clients that support both should fall back to a 2025 version. Any change is announced in the changelog.

Authorization

Hi Doctor’s MCP server is both the OAuth authorization server and the protected resource. Sign-in itself is delegated to hi-doctor.ai, as described on Connect.

Token lifetimes and rotation

  • Authorization codes are single-use and expire after 60 seconds.
  • Access tokens last at most one hour.
  • Refresh tokens last 30 days and are single-use: each refresh returns a new one, and reusing an old one fails with invalid_grant.
  • Each token is bound to the /mcp resource and rejected anywhere else.
  • A revoked connection’s tokens are rejected at once, whatever their expiry.
If you request no scopes, the patient defaults apply. Requested scopes that do not apply to the account are dropped. See Permissions.
Only tokens issued by this authorization server are accepted. A Hi Doctor REST API token (from /v1/users/token/) is not an MCP token and must never be sent to the MCP endpoint, and an MCP token is never forwarded to the REST API by your client.
Call the revocation endpoint when the user removes your client’s connection, so access ends at once instead of when the access token expires.

Step-up for a missing permission

When a client calls a tool whose permission the user did not approve, the server answers with HTTP 403 before the tool runs. Start a new authorization with the scope value from the challenge, let the user approve it, and repeat the call with the new token. A client that does not support step-up should tell the user to disconnect and connect again.

A minimal session

Every request is a separate POST with the bearer token. Replace $HD_MCP_TOKEN with an access token your client obtained through OAuth; do not paste tokens into shared logs.
1

Initialize

The result includes the negotiated protocolVersion, the server’s capabilities and short instructions for the account. Send MCP-Protocol-Version with the negotiated version on later requests.
2

List tools

You receive only the tools for the account and its approved scopes.
3

Call a read-only tool

Results carry structuredContent that matches the tool’s output schema, plus the same data as JSON text for clients that only read text. A result is capped at about 20,000 tokens; larger lists come back shorter with has_more and next_offset. See Lists and pagination.

Limits

Errors

Tool errors are designed for the model to read and recover from. Retry reads after a pause; do not repeat a write until you have read the current state.

Frequently asked questions

Which MCP transport does Hi Doctor use?

Streamable HTTP, stateless. Each POST to https://mcp.hi-doctor.ai/mcp is handled on its own, and the legacy HTTP+SSE transport and stdio are not supported.

Which MCP protocol versions does Hi Doctor support?

2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05 and 2024-10-07, negotiated through the initialize handshake. The 2026-07-28 protocol is not supported.

How long do Hi Doctor MCP tokens last?

Access tokens last at most one hour. Refresh tokens last 30 days and are single-use, and authorization codes expire after 60 seconds.

Can I revoke a Hi Doctor MCP token?

Yes. POST the token to /revoke. The whole connection is revoked and every token from it is rejected on the next request.

Can I send a Hi Doctor REST API token to the MCP endpoint?

No. Only tokens issued by the MCP authorization server are accepted, and an MCP token must never be sent to the REST API.

What happens when a tool needs a permission the user did not approve?

The server answers HTTP 403 with an insufficient_scope challenge. Start a new authorization with the scope it names, then repeat the call.

What is the rate limit?

120 MCP requests a minute per access token and 30 token requests a minute per address, each counted in a fixed one-minute window. Over the limit, wait for the Retry-After value.

Next steps

  • Agent quickstart: a complete agent flow from connection to first tool call.
  • Security: how tokens and permissions are enforced.