Skip to content

Connect Mariana Tek to ChatGPT: Manage Classes, Sales & User Accounts

Learn how to connect Mariana Tek to ChatGPT using Truto's managed MCP servers. Automate class bookings, handle retail carts, and manage studio users.

Nachi Raman Nachi Raman · · 9 min read
Connect Mariana Tek to ChatGPT: Manage Classes, Sales & User Accounts

If you need to connect Mariana Tek to ChatGPT to automate studio operations, manage fitness class rosters, or orchestrate retail sales, you need a Model Context Protocol (MCP) server. This server acts as the critical translation layer between ChatGPT's JSON-based tool calls and Mariana Tek's specialized REST APIs.

If your team uses Claude, check out our guide on connecting Mariana Tek to Claude or explore our broader architectural overview on connecting Mariana Tek to AI Agents.

Giving a Large Language Model (LLM) read and write access to a boutique fitness platform like Mariana Tek is a severe engineering challenge. You must handle complex relational data payloads for class layouts, navigate intricate booking logic involving penalty fees and credit deductions, and deal with location-specific permissions (turfs). Every time the studio adds a new product class or modifies membership rules, custom server code typically requires updates, redeployments, and testing.

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

The Engineering Reality of the Mariana Tek API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against Mariana Tek's highly specific studio management API is exceptionally painful.

If you decide to build a custom MCP server for Mariana Tek, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with this platform:

Turf-Based Permissions and Location Scoping

Unlike flat SaaS platforms where an admin token grants global access, Mariana Tek relies heavily on "turf" assignments (locations, regions, sites). If an AI agent attempts to clock in an employee or adjust inventory via the /api/parent_inventory_transactions endpoint, the integration must pass a partner_id or location_id that strictly aligns with the authenticated user's turf permissions. Your MCP server must dynamically interpret location context from the LLM and ensure it maps to valid integer IDs, otherwise the API will silently fail or return cryptic 403 errors.

Cascading Reservation Logic and Penalties

Booking a class is not a simple POST request. A single reservation workflow in Mariana Tek interacts with layouts, spots, waitlist cutoff windows, and spot holds. Furthermore, if an LLM is tasked with canceling a booking or marking a "no show", it must first preview the penalty fees using endpoints like /api/membership_transactions/{id}/no_show_penalty. A naive MCP implementation will simply delete the reservation, bypassing the studio's financial logic and causing revenue leaks. Building a reliable MCP server means explicitly mapping these multi-step preview-then-execute workflows as distinct tools.

Complex E-Commerce Cart Lifecycles

Mariana Tek's retail architecture splits purchases into highly specific resources. An AI agent cannot simply "create an order." It must create a cart, add cart_lines for products or memberships, apply line-item discounts using lid_notional_amount, optionally apply vouchers, and finally submit a checkout payload with strictly formatted payment arrays (cash, account, bankcard, alt). Mapping ChatGPT's flat argument outputs into this nested, stateful cart sequence requires significant custom middleware if built from scratch.

Step 1: Generate a Mariana Tek MCP Server

Truto dynamically generates MCP tools from Mariana Tek's underlying API resources. You can create a scoped, authenticated MCP server URL via the Truto dashboard or programmatically via the API.

Option A: Via the Truto UI

  1. Log into your Truto account and navigate to Integrated Accounts.
  2. Select your connected Mariana Tek instance (or click New Integrated Account and complete the OAuth flow to connect one).
  3. Click the MCP Servers tab on the integrated account page.
  4. Click Create MCP Server.
  5. Configure your server: assign a name (e.g., "ChatGPT Studio Assistant"), filter to specific allowed methods (like read or write), or restrict tools by resource tags.
  6. Click Create and copy the generated MCP server URL (it will look like https://api.truto.one/mcp/<token>).

Option B: Via the Truto API

For teams managing AI infrastructure as code, you can provision the MCP server via a single API call. Grab your integrated_account_id and issue the following POST request.

curl -X POST https://api.truto.one/integrated-account/$INTEGRATED_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mariana Tek ChatGPT Ops",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["users", "class_sessions", "reservations", "carts"]
    }
  }'

The API validates that the Mariana Tek integration has tools available, generates a secure cryptographic token, and stores it in Truto's global edge network. The response includes a url field. This URL is a fully functional JSON-RPC 2.0 endpoint - treat it like a secret, as it contains both routing and authentication data.

Step 2: Connect the MCP Server to ChatGPT

With your MCP server URL generated, you can now connect it directly to ChatGPT. You can configure this directly through the ChatGPT application interface or via a local configuration file for programmatic usage.

Option A: Via the ChatGPT UI

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Enable the Developer mode toggle (MCP support requires this feature flag, available on Pro, Plus, Business, Enterprise, and Education accounts).
  3. Under MCP servers / Custom connectors, click to add a new server.
  4. Name: Enter a recognizable label (e.g., "Mariana Tek").
  5. Server URL: Paste the url generated by Truto in Step 1 (e.g., https://api.truto.one/mcp/<token>).
  6. Click Save.

ChatGPT will immediately ping the endpoint, perform the MCP initialization handshake, and parse the available Mariana Tek tools.

Option B: Via Manual Config File

If you are testing locally or orchestrating agents via a framework that reads standard MCP configuration files (like Claude Desktop or Cursor), you can map the URL using the server-sent events (SSE) transport adapter.

Create or update your mcp_config.json file:

{
  "mcpServers": {
    "mariana_tek": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/<YOUR_TRUTO_TOKEN>"
      ]
    }
  }
}

When the agent spins up, it will execute the npx command, bridging standard input/output to the remote Truto SSE endpoint.

Mariana Tek Hero Tools

Truto automatically generates dozens of tools for Mariana Tek, standardizing the input schemas into a flat namespace for ChatGPT. Below are the most high-leverage hero tools for automating studio operations.

1. create_a_mariana_tek_reservation

Automates class bookings. This tool requires the class_session ID and the user ID. It handles the backend logic of deducting credits or associating the booking with an active membership.

"Book Sarah Jenkins into the 5:30 PM Advanced Cycling class session (ID 49201). Deduct the pass from her active credit pack."

2. mariana_tek_class_sessions_cancel

Cancels a scheduled class session. This is a critical custom method that goes beyond standard CRUD. Once triggered, all active reservations (standard and waitlist) are canceled, and payment sources are refunded automatically to the appropriate users.

"Cancel the 6:00 AM Morning Flow yoga class due to instructor illness. Refund all users currently checked in or pending."

3. create_a_mariana_tek_time_clock_shift

Manages staff operations by creating a time clock shift. Employees with the correct permissions can clock in themselves or others. Requires the employee ID and the location ID (turf).

"Clock in instructor Mike Davies for his shift at the Downtown Studio location immediately."

4. mariana_tek_reservations_check_in

Executes the check-in workflow for a pending reservation, indicating the customer has arrived at the studio.

"Check in user ID 10934 for their reservation in the 7 PM Pilates class."

5. create_a_mariana_tek_cart

Initiates the retail and e-commerce flow. Creating a cart is the mandatory first step before adding cart lines for water bottles, apparel, or new membership contracts.

"Start a new retail cart for customer ID 8832 so I can sell them a monthly unlimited membership and a branded towel."

6. create_a_mariana_tek_user

Provisions a new member account in the studio database. The tool schema requires email, first_name, last_name, and password.

"Create a new user profile for John Smith. His email is john.smith@example.com and use a temporary secure password."

For the complete inventory of available tools, query schemas, and resource fields, review the Mariana Tek integration page.

Workflows in Action

Single tool calls are useful, but the real power of connecting ChatGPT to Mariana Tek emerges when agents orchestrate multi-step business logic. Here is how ChatGPT resolves complex scenarios using Truto's standardized schemas.

Scenario 1: Managing a Studio No-Show with Penalties

When a member fails to attend a booked class, simply deleting the reservation causes the studio to lose penalty revenue. The studio manager asks ChatGPT to handle the absence correctly.

"Mark Jane Doe as a no-show for the 9 AM Bootcamp class and apply the standard penalty fee."

Tool execution sequence:

  1. get_membership_transaction_no_show_penalty_by_id: ChatGPT first queries the preview endpoint using the transaction ID attached to Jane's reservation to determine the financial impact (e.g., a $15 fee or a lost credit).
  2. mariana_tek_reservations_mark_as_no_show: ChatGPT executes the custom method to free up the spot (allowing waitlisted users to enter) and trigger the backend penalty flags.
  3. mariana_tek_penalty_fees_attempt_charge: Finally, the agent triggers the charge against the user's default payment method to collect the $15 penalty fee.
sequenceDiagram
    participant User
    participant GPT as ChatGPT
    participant Truto as Truto MCP Server
    participant Mariana as Mariana Tek API

    User->>GPT: "Mark Jane as no-show and charge penalty."
    GPT->>Truto: tools/call (get_membership_transaction_no_show_penalty_by_id)
    Truto->>Mariana: GET /api/membership_transactions/{id}/no_show_penalty
    Mariana-->>Truto: 200 OK (Penalty details)
    Truto-->>GPT: JSON-RPC Result
    GPT->>Truto: tools/call (mariana_tek_reservations_mark_as_no_show)
    Truto->>Mariana: POST /api/reservations/{id}/mark_as_no_show
    Mariana-->>Truto: 200 OK (Reservation updated)
    Truto-->>GPT: JSON-RPC Result
    GPT->>Truto: tools/call (mariana_tek_penalty_fees_attempt_charge)
    Truto->>Mariana: POST /api/penalty_fees/{id}/attempt_charge
    Mariana-->>Truto: 200 OK (Charge successful)
    Truto-->>GPT: JSON-RPC Result
    GPT-->>User: "Jane is marked as a no-show. The $15 penalty was charged."

Scenario 2: Emergency Class Cancellation

An instructor's car breaks down 30 minutes before a packed class. The front desk needs to cancel the session, refund the credits, and inform the attendees immediately.

"Cancel the 5 PM Spin class today. Ensure all spots are released and send a message to all reserved users apologizing for the inconvenience."

Tool execution sequence:

  1. mariana_tek_class_sessions_cancel: ChatGPT invokes the cancellation custom method on the specific class session ID. Mariana Tek automatically processes the refunds for the associated credits/memberships and clears the roster.
  2. mariana_tek_class_sessions_message: The agent immediately follows up by utilizing the messaging tool to blast an email/SMS to the class roster, communicating the apology text provided in the prompt.

The front desk accomplishes a stressful, multi-click crisis workflow in a single conversational sentence.

Security and Access Control

Exposing an enterprise management system to an LLM requires strict governance. Truto's MCP architecture provides robust controls at the token level, ensuring ChatGPT only accesses exactly what you permit.

  • Method Filtering: Enforce read-only access by setting config.methods: ["read"] during token creation. This strips all create, update, delete, and custom (e.g., cancel, charge) tools from the server, completely eliminating the risk of ChatGPT accidentally deleting a user or charging a credit card.
  • Tag Filtering: Limit the surface area of the API by specifying tags like ["reservations", "classrooms"]. Tools related to billing, employees, or integrations will be entirely hidden from the LLM.
  • Extra Authentication: For highly sensitive internal tools, enable require_api_token_auth: true. This forces the MCP client to pass a valid Truto API token in the Authorization header, adding a second layer of security beyond the obscure URL.
  • Expiration Timers: Generate temporary MCP servers using the expires_at attribute. Truto automatically schedules a Durable Object alarm to hard-delete the server and purge its tokens from the edge KV store at the exact second of expiration—perfect for granting an automated agent temporary access to resolve a specific support queue.

Factual Note on Rate Limits

When making high-volume queries through ChatGPT (e.g., fetching large class rosters), you may encounter Mariana Tek's API rate limits. Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream Mariana Tek API returns an HTTP 429 status code, Truto passes that error directly to the caller (the LLM client).

Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. The caller (or the orchestrating framework) is strictly responsible for interpreting these headers and executing its own retry or backoff logic.

Wrap Up

Connecting ChatGPT to Mariana Tek via a custom-built MCP server traps your engineering team in a cycle of endpoint maintenance, schema parsing, and authentication debugging. By leveraging Truto, you bypass the boilerplate. You get a production-ready, documentation-driven MCP server that strictly curates allowed tools and normalizes schemas into an LLM-friendly format.

Stop writing custom API wrappers for your AI agents. Generate a secure MCP server for Mariana Tek, define your safety constraints, and let ChatGPT manage your studio operations natively.

FAQ

How do I connect Mariana Tek to ChatGPT?
You can connect Mariana Tek to ChatGPT by creating an MCP server via Truto. In the Truto dashboard, navigate to your connected Mariana Tek account, create an MCP Server, copy the generated URL, and add it to ChatGPT's Developer mode settings under Custom Connectors.
Can I restrict ChatGPT to read-only access for Mariana Tek?
Yes. When creating the Truto MCP server, you can configure the method filters to only include "read" operations. This removes all create, update, delete, and custom action tools from the LLM's context, ensuring it cannot modify studio data.
Does Truto handle API rate limits from Mariana Tek automatically?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. If Mariana Tek returns an HTTP 429, Truto passes the error back to the caller while normalizing the rate limit information into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The client is responsible for retries.
How does ChatGPT know the required parameters for Mariana Tek tools?
Truto dynamically generates tools based on Mariana Tek's API documentation, converting raw schemas into flat, LLM-optimized JSON Schemas. It automatically injects requirements, required ID fields, and descriptions so ChatGPT knows exactly what arguments to provide.

More from our Blog