Skip to main content
Brelio’s MCP server turns the clinic’s data into tools an AI model can call. This guide shows prompts that work well, how the server behaves, and how to call it from your own code.

Connect

Follow Connect your AI assistant. For your own agent, any MCP client that supports Streamable HTTP and OAuth works: point it at https://api.brelio.app/mcp.

Prompts to try

Copy them into your assistant with the Brelio connector on. They are in Spanish, as a receptionist would ask; the assistant answers in the language you write in. The last three need the agenda and patient tools; see known limitations. Patient prompts also need the clinic’s patient data area on. A longer prompt that sets the agent up for front-desk work:
System prompt

How the server behaves

  • It acts as the person who connected it, in one clinic, with that person’s permissions read on every call. Tools the person cannot use are not listed.
  • Read tools only, in this version. Booking, rescheduling, cancelling and patient changes are REST for now. When write tools arrive, destructive ones (cancel, archive, delete) will ask the person to confirm before acting.
  • Every tool has a JSON Schema for its input and output, returns structuredContent, and carries readOnlyHint and destructiveHint annotations.
  • Lists are paginated: pass next_cursor back as cursor while has_more is true.
  • Errors are the same problem objects as REST, returned as a tool result with isError: true. Follow the hint rather than retrying blindly.
  • Patient-data acceptance: if the connection was not accepted for patient data, a patient tool returns PATIENT_DATA_CONSENT_REQUIRED. Clients that support URL elicitation open Brelio’s acceptance page; others get the link in params.consent_url and the hint.
  • Secrets never pass through MCP. Operations that reveal a one-time secret (a webhook’s signing secret) are not offered, and refuse with PLATFORM_REVEAL_FORBIDDEN.
The full list, with arguments and examples, is in MCP tools.

Call it from your own code

The server is stateless Streamable HTTP. With an access token for resource=https://api.brelio.app/mcp:
Response
Without a token the server answers 401 with a WWW-Authenticate header that points to its OAuth metadata; MCP SDKs follow it for you. With the official TypeScript SDK:
agent.ts
In production, let the SDK’s OAuth support (authProvider) obtain and refresh the token instead of passing one by hand.

Agents that call REST

An agent that writes code against the API, rather than using MCP tools, can start from the OpenAPI document at https://api.brelio.app/v1/openapi.json. Every operation there carries x-brelio-permission, x-brelio-data-class, x-brelio-risk and x-brelio-examples. This prompt sets one up:
Prompt