---
title: "Connect Coviu to ChatGPT: Manage Sessions, Participants, and Queues"
slug: connect-coviu-to-chatgpt-manage-sessions-participants-and-queues
date: 2026-06-19
author: Uday Gajavalli
categories: ["AI & Agents"]
excerpt: "Learn how to connect Coviu to ChatGPT using a managed MCP server. Automate telehealth sessions, triage waiting queues, and retrieve clinical recordings via AI."
tldr: "Connecting Coviu to ChatGPT requires translating complex telehealth API endpoints into an LLM-friendly format. This guide covers how to deploy a managed MCP server to orchestrate waiting queues, manage participant states, and retrieve binary clinical recordings without building custom middleware."
canonical: https://truto.one/blog/connect-coviu-to-chatgpt-manage-sessions-participants-and-queues/
---

# Connect Coviu to ChatGPT: Manage Sessions, Participants, and Queues


You want to connect Coviu to ChatGPT so your AI agents can read triage queues, manage telehealth sessions, and extract clinical recordings. If your team uses Claude, check out our guide on [connecting Coviu to Claude](https://truto.one/connect-coviu-to-claude-automate-bookings-and-clinical-recordings/) or explore our broader architectural overview on [connecting Coviu to AI Agents](https://truto.one/connect-coviu-to-ai-agents-orchestrate-call-queues-and-submissions/).

Giving a Large Language Model (LLM) read and write access to a secure, state-dependent clinical platform like Coviu is an engineering challenge. You either spend weeks building, hosting, and maintaining a custom Model Context Protocol (MCP) server that translates the model's JSON-RPC tool calls into Coviu's specific REST patterns, or you use a managed infrastructure layer to handle the boilerplate.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Coviu, connect it natively to ChatGPT, and execute complex triage and session management workflows using natural language.

## The Engineering Reality of the Coviu API

A custom MCP server is a self-hosted integration layer. While Anthropic's open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against vendor-specific APIs requires deep domain knowledge.

If you decide to build a custom MCP server for Coviu, you are responsible for the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with Coviu's infrastructure:

### Strict Lifecycle State Management
Coviu enforces strict chronological states on its entities. You cannot simply update or append data to any record at any time. For example, if an AI agent attempts to use `create_a_coviu_participant` to inject an interpreter into a session that has already finished, the Coviu API will reject the request. Your MCP server needs schemas that explicitly communicate these constraints to the LLM via tool descriptions, otherwise the model will attempt the operation, fail, and potentially hallucinate a success response to the user.

### Binary Stream Retrieval for Clinical Data
Most API integrations deal purely with JSON. Coviu handles clinical recordings and file submissions. Endpoints like `get_single_coviu_audio_recording_by_id` or `get_single_coviu_submission_file_by_id` do not return a standard JSON object - they return binary video or audio streams (like `audio/webm` or `video/webm`). They also utilize HTTP 206 Partial Content responses for large files. If your custom server blindly assumes all API responses are JSON and attempts to parse them, it will crash. The MCP layer must safely proxy these streams so the client executing the LLM can pipe them into a transcription service or secure storage bucket.

### Rate Limits and Standardization
Coviu enforces its own rate limits to protect its infrastructure. A common mistake developers make when building custom MCP servers is attempting to swallow or hide these limits from the LLM. 

Truto takes a strict pass-through approach. We do not retry, throttle, or apply backoff on rate limit errors. When Coviu returns an HTTP 429 Too Many Requests, Truto passes that error directly back to the caller. However, Truto normalizes the upstream rate limit information into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF specification. This means your application code managing the LLM has a predictable way to read the backoff requirements and pause the agent, rather than dealing with vendor-specific header variations.

## How Truto's Managed MCP Server Works

Instead of forcing your engineering team to build a Node.js or Python MCP server from scratch, host it, and maintain the endpoint schemas, Truto dynamically generates the server based on your connected Coviu account. 

Our system follows an [auto-generated MCP tools architecture](https://truto.one/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide) that derives tools dynamically from the integration's internal configuration and documentation records. Every resource and method (e.g., the `list` method on the `waiting_queue_calls` resource) that has a documentation record is automatically exposed as an LLM tool. The system reads the required body schemas and query schemas, injects necessary pagination context, and builds a JSON-RPC 2.0 endpoint.

```mermaid
sequenceDiagram
    participant ChatGPT as ChatGPT (Client)
    participant Truto as Truto MCP Router
    participant Proxy as Truto Proxy API
    participant Coviu as Coviu API
    
    ChatGPT->>Truto: POST /mcp/{token} (tools/call: create_a_coviu_session)
    Truto->>Truto: Validate Token & Flatten Arguments
    Truto->>Proxy: Route to POST handler
    Proxy->>Coviu: POST /sessions (with Coviu Auth)
    Coviu-->>Proxy: 200 OK (Session Data)
    Proxy-->>Truto: Standardized Result
    Truto-->>ChatGPT: JSON-RPC 2.0 Result
```

Each generated server is scoped to a specific integrated account. The server URL contains a cryptographically hashed token that authenticates the request, identifies the tenant, and applies any method or tag filters you configured. 

## Generating and Connecting the Coviu MCP Server

Truto provides two ways to generate an MCP server for your Coviu integration: via the UI for manual testing, and via the API for programmatic, multi-tenant deployment.

### Step 1: Create the MCP Server

**Method A: Via the Truto UI**
1. Navigate to the **Integrated Accounts** page in your Truto dashboard.
2. Select your connected Coviu account.
3. Click the **MCP Servers** tab.
4. Click **Create MCP Server**.
5. Select your desired configuration (e.g., name, method filters). 
6. Copy the generated MCP server URL (it will look like `https://api.truto.one/mcp/a1b2c3d4...`).

**Method B: Via the API**
For production deployments where you need to provision agent access for your end-users dynamically, use the REST API. This request generates a server restricted entirely to `read` operations.

```bash
curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Coviu Triage Agent MCP",
    "config": {
      "methods": ["read"]
    },
    "expires_at": "2026-12-31T23:59:59Z"
  }'
```

### Step 2: Connect to ChatGPT

Once you have the URL, you need to register it with your LLM framework or chat interface. You can also [bring over 100 custom connectors to ChatGPT](https://truto.one/bring-100-custom-connectors-to-chatgpt-with-superai-by-truto) using the same pattern.

**Method A: Via the ChatGPT UI**
1. In ChatGPT, click your profile and navigate to **Settings**.
2. Select **Apps**, then click **Advanced settings**.
3. Enable **Developer mode**.
4. Under MCP servers / Custom connectors, click **Add a new server**.
5. Name the integration (e.g., "Coviu Telehealth") and paste your Truto MCP URL.
6. Click **Save**. ChatGPT will immediately handshake with Truto, request the `tools/list`, and populate its context window with the Coviu API operations.

**Method B: Via CLI or Custom Agent Frameworks**
If you are building a custom agent wrapper or testing locally, you can use the official Model Context Protocol SSE transport utility to connect.

```json
{
  "mcpServers": {
    "coviu_prod": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/YOUR_TOKEN_HERE"
      ]
    }
  }
}
```

## Hero Tools for Coviu

When connected, Truto exposes Coviu's capabilities as distinct, snake_case tools. Below are the highest-leverage operations for telehealth workflows. 

### `list_all_coviu_waiting_queue_calls`
This tool is critical for triage agents. It lists all currently waiting calls for a specific Coviu queue, returning state fields such as `callId`, `joinedAt`, `lastActivityAt`, and specific lifecycle timestamps.

> "Check the primary clinical waiting queue (ID: 8912) and tell me how many patients have been waiting for longer than 15 minutes. Provide their call IDs."

### `create_a_coviu_session`
Creates a new isolated Coviu session. The LLM must supply a `session_name`, `start_time`, and `end_time`. The AI can also pass `feature_flags` to customize the call interface (e.g., `exit-url`, `disable-menu`, `enforce-participant-uniqueness`).

> "Create a new 45-minute Coviu session named 'Follow-up Consultation - Smith' starting at 2:00 PM today. Ensure the disable-menu feature flag is active so the patient cannot alter room settings."

### `create_a_coviu_participant`
Injects a participant into a specific session. This returns the `entry_url` which the agent can then email or message to the user. Note that the schema strictly warns the LLM that it cannot add a participant to a session that has already finished.

> "Add a participant with the role of 'interpreter' to session ID 10485. Give me the entry_url so I can send it to our translation service."

### `get_single_coviu_session_summary_by_id`
Retrieves the post-call wrap-up data. This returns the `actual_end_time`, final participant list, and core session details, which is ideal for an agent tasked with generating compliance logs or syncing data back to an EHR.

> "Fetch the session summary for session ID 10485. Did the session end on time, and how many total participants joined?"

### `get_single_coviu_audio_recording_by_id`
Retrieves the binary audio recording file for a specific Coviu collection submission. Because this returns a binary stream instead of JSON, the LLM usually delegates the execution to a host environment script that saves the buffer to disk.

> "Retrieve the audio recording for submission ID 441 in collection 99. Save it locally so we can run a transcription pass over the clinical notes."

### `delete_a_coviu_session_by_id`
Cancels a scheduled session. This operation requires the `id` and returns a boolean confirming success. 

> "Cancel the 'Follow-up Consultation - Smith' session (ID: 10499) as the patient has rescheduled for next week."

> Need to connect your LLM to complex telehealth platforms? Let's talk architecture.
>
> [Talk to us](https://cal.com/truto/partner-with-truto)

*For the complete list of available operations, schemas, and required parameters, view the [Coviu integration page](https://truto.one/integrations/detail/coviu).*

## Workflows in Action

Once the MCP server is mounted, ChatGPT can orchestrate multi-step clinical workflows autonomously. Because Truto's proxy normalizes the JSON schemas, the LLM understands exactly which arguments belong in the query string versus the request body.

### Workflow 1: Clinical Triage & Room Assignment

In high-volume telehealth clinics, patients enter a generalized waiting room. A triage agent (or an AI acting as one) needs to monitor the queue, spin up a dedicated room when a physician is ready, and move the patient.

> "Check the main waiting queue. If there is a patient who has been waiting more than 10 minutes, create a new 30-minute consultation session named 'Triage Overflow', generate an entry URL for the patient, and give me the link."

**Execution Steps:**
1. **`list_all_coviu_waiting_queue_calls`**: The LLM queries the queue and identifies a `callId` with a `joinedAt` timestamp indicating a 12-minute wait.
2. **`create_a_coviu_session`**: The LLM provisions a new session, setting the `start_time` to the current time and `end_time` to 30 minutes later.
3. **`create_a_coviu_participant`**: Using the newly generated `session_id`, the LLM creates a participant record for the patient.

**Output:**
The LLM responds with a summary: "I found a patient waiting for 12 minutes. I've created the 'Triage Overflow' session. Here is the secure entry URL for the patient: `https://coviu.com/entry/...`."

### Workflow 2: Post-Call Compliance & Logging

After a telehealth consultation, clinical administrators must ensure the session data is logged and any recordings are archived for compliance purposes.

> "The psychiatric evaluation session (ID: 9940) just concluded. Fetch the session summary to confirm the actual end time, then retrieve the audio recording from collection 12, submission 88."

**Execution Steps:**
1. **`get_single_coviu_session_summary_by_id`**: The LLM fetches the final metadata, parsing the `actual_end_time` and validating that the provider and patient were both present based on the `participants` array.
2. **`get_single_coviu_audio_recording_by_id`**: The LLM executes the retrieval. The host system executing the LLM tool receives the HTTP 206 stream via Truto and writes the `audio/webm` file to secure storage.

**Output:**
The LLM states: "The session successfully concluded at 4:15 PM with 2 participants logged. The audio recording has been retrieved and streamed to your environment."

## Security and Access Control

Exposing patient data and clinical infrastructure to an LLM requires strict access control. Using [SOC 2 and GDPR compliant AI agents](https://truto.one/zero-data-retention-mcp-servers-building-soc-2-gdpr-compliant-ai-agents) is essential in telehealth contexts. Truto provides multiple mechanisms to secure your MCP servers before the LLM ever sees a tool:

*   **Method Filtering:** Configure `config.methods` to `["read"]` during server creation. Truto will instantly strip out `create`, `update`, and `delete` tools. The LLM will only see `get` and `list` tools, effectively creating a read-only agent.
*   **Tag Filtering:** Use `config.tags` to limit the server's scope to specific functional areas. If you tag certain resources as `["billing"]` and others as `["clinical"]`, you can provision an MCP server that only exposes billing operations.
*   **API Token Authentication:** By default, possessing the MCP server URL grants access to its tools. By setting `require_api_token_auth: true`, Truto enforces a second layer of authentication. The MCP client (ChatGPT or your custom agent) must pass a valid Truto API token in the `Authorization` header to execute calls.
*   **Automatic Expiration:** You can set an `expires_at` timestamp. Truto utilizes durable object alarms and edge key-value expiration to automatically tear down the server at the exact millisecond requested, leaving no stale access hanging around.

## Architecting for Scale

Connecting Coviu to ChatGPT via a managed MCP server removes the burden of writing custom middleware. You don't have to monitor endpoint deprecations, write exponential backoff loops for rate limits, or manage OAuth refreshes. 

By utilizing Truto, you ensure that your LLM interacts with Coviu's strict state requirements and binary streams predictably. This allows your engineering team to focus on the prompt architecture and the agentic workflow logic, rather than wrestling with telehealth REST anomalies.
