Skip to content

Connect Maia to ChatGPT: Manage AI Runners and Data Pipelines

Learn how to connect Maia to ChatGPT using Truto's auto-generated MCP servers. Automate AI runners, execute data pipelines, and manage human-in-the-loop decisions.

Nachi Raman Nachi Raman · · 9 min read
Connect Maia to ChatGPT: Manage AI Runners and Data Pipelines

If you need to connect Maia to ChatGPT to automate AI runners, trigger data pipelines, or orchestrate human-in-the-loop task approvals, you need a Model Context Protocol (MCP) server. This server acts as the translation layer, exposing Maia's complex orchestration APIs as discrete, function-callable tools that ChatGPT can understand.

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

Giving a Large Language Model (LLM) read and write access to a powerful pipeline orchestration engine like Maia is an engineering challenge. You must handle asynchronous execution states, complex nested configurations for AI tasks, and project-scoped resources. You can either build and maintain this translation layer yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.

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

The Engineering Reality of the Maia 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 Maia's orchestration API requires handling specific architectural paradigms.

If you decide to build a custom MCP server for Maia, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions:

Asynchronous State Management and Polling

Maia is designed to run complex data pipelines and AI agent tasks. When you trigger a pipeline via the API, it does not hold the connection open until completion. Instead, it returns an execution ID. Your MCP server must expose discrete tools for triggering the job and polling the status. You cannot rely on webhooks for synchronous LLM sessions; you must explicitly instruct the LLM on how to poll the status endpoints until a STOPPED, FINISHED, or FAILED state is reached.

Project and Environment Routing

Maia is heavily isolated by projects and environments. Nearly every impactful API call - from executing a pipeline to deploying a runner - requires both a project_id and an environmentName. If your MCP schemas do not strictly define these as required fields, the LLM will hallucinate global commands and hit 404 errors. Building static MCP schemas means constantly mirroring Maia's environment routing rules into your server logic.

Human-in-the-Loop Payload Complexity

When an AI task in Maia pauses for human input, it enters a pending decision state. Submitting a decision requires a deeply nested JSON payload that perfectly matches the required approval schema. If an LLM hallucinates the structure of the decisions array, the task remains blocked. Dynamic schema generation is mandatory to ensure the LLM knows exactly what data the current task expects.

How to Generate a Maia MCP Server with Truto

Instead of writing and hosting custom JSON-RPC handlers for every Maia endpoint, Truto dynamically derives MCP tools directly from Maia's API resources and documentation.

Truto creates a secure, self-contained MCP server endpoint scoped specifically to your connected Maia instance. You can create this server via the Truto dashboard or programmatically via the API.

Method 1: Via the Truto UI

  1. Log into your Truto dashboard and navigate to Integrated Accounts.
  2. Select your connected Maia account to open the account details page.
  3. Click the MCP Servers tab.
  4. Click Create MCP Server.
  5. Select your desired configuration (e.g., setting method filters to read only, or assigning specific tags like pipelines or agents).
  6. Copy the generated MCP server URL.

Method 2: Via the Truto API

For platform teams integrating this into an automated provisioning flow, you can generate the MCP server in a single API call.

First, grab your integrated_account_id from the Truto API:

curl -X GET https://api.truto.one/integrated-account \
  -H "Authorization: Bearer $TRUTO_API_TOKEN"

Next, send a POST request to generate the server. You can pass a config object to restrict the server to specific operations. In this example, we restrict the server to reading and writing pipeline and agent data.

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": "Maia Prod Runner Agent",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["agents", "pipelines", "projects"]
    }
  }'

The response contains a secure url (e.g., https://api.truto.one/mcp/<secure_token>). This URL acts as both the routing endpoint and the authentication mechanism. Treat it like a sensitive credential.

Connecting the MCP Server to ChatGPT

Once you have your Truto MCP URL, connecting it to ChatGPT takes less than a minute. You can do this via the ChatGPT UI or via a standard configuration file for local development frameworks.

Method A: Via the ChatGPT UI

Note: MCP support in ChatGPT is available for Pro, Plus, Business, Enterprise, and Education accounts with Developer mode enabled.

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Toggle Developer mode to ON.
  3. Scroll to the MCP servers / Custom connectors section and click Add.
  4. Enter a recognizable name (e.g., "Maia Production Orchestrator").
  5. Paste your Truto MCP server URL into the Server URL field.
  6. Click Save.

ChatGPT will immediately perform a handshake with the Truto server, fetch the available Maia capabilities, and register the tools.

Method B: Via Manual Config File (SSE Transport)

If you are running a local agent framework, Cursor, or testing locally before deploying to ChatGPT, you can use the official MCP Server SSE CLI to bridge the connection.

Add the following to your mcp.json or framework configuration:

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

Hero Tools for Maia Workflows

Truto exposes Maia's complex orchestration layer as discrete, highly-documented tools. Here are the highest-leverage tools available for AI agents.

list_all_maia_agents

Discover all active runners (agents) across your Maia environment. This tool returns the status, cloud provider details, and version track for each runner, allowing the LLM to verify infrastructure health before assigning tasks.

"Get a list of all Maia agents currently deployed in our environment. Flag any agents that have a status other than CONNECTED."

create_a_maia_project_pipeline_execution

Execute a published data pipeline within a specific project. Because pipelines run asynchronously, the LLM will use the returned pipelineExecutionId to track progress in subsequent steps.

"Trigger the 'nightly_etl_sync.orch.yaml' pipeline in the 'data-warehouse-prod' environment for project ID 8a7b6c5d. Return the execution ID so I can track it."

get_single_maia_project_pipeline_execution_by_id

Check the current status of a running pipeline. By observing the status field, the AI agent can determine if the pipeline is still processing, finished, or failed, and read any resulting error messages.

"Check the status of pipeline execution ID 12345 in project ID 8a7b6c5d. If it is still running, let me know. If it failed, retrieve the error message."

create_a_maia_agents_task

Create a new AI agent task in Maia and initiate its execution. This requires passing the initial instruction message and the agent configuration payload.

"Create a new AI agent task to analyze the recent data warehouse logs. Use the default diagnostic agent configuration and start the task immediately."

create_a_maia_task_decision

Submit human-in-the-loop approvals or answer questions for tasks that are paused awaiting input. The tool handles the complex payload mapping required to unblock the agent.

"The database optimization task is asking for approval to drop stale indexes. Submit a decision approving the action on task ID 998877."

maia_agents_tasks_bulk_update

Modify the permissions granted to an active AI agent task. This allows you to dynamically escalate or restrict the tools an agent is allowed to use mid-execution.

"Update the permissions for task ID 998877 to include 'write_database_schema' so it can proceed with the migration plan."

list_all_maia_consumptions

Retrieve a breakdown of credit consumption for flat-rated products. This is critical for FinOps workflows where the AI agent monitors daily usage costs against budget thresholds.

"Pull the Maia credit consumption report for the last 7 days and summarize the total credits burned across all ETL operations."

For a complete list of available operations - including SCIM user management, streaming pipeline controls, and vault secret management - check out the Maia Integration Page.

Workflows in Action

By chaining these tools together, ChatGPT can act as an autonomous orchestration engine for your data infrastructure.

Workflow 1: Orchestrating and Monitoring a Data Pipeline

Instead of a human engineer logging into a dashboard to trigger a job and staring at a loading bar, the LLM handles the execution and polling lifecycle.

"Run the monthly financial rollup pipeline in the production environment of the finance project. Monitor it until it finishes and give me a summary of the result."

  1. ChatGPT calls create_a_maia_project_pipeline_execution with the project ID and pipeline name.
  2. Maia returns the pipelineExecutionId.
  3. ChatGPT enters a loop, periodically calling get_single_maia_project_pipeline_execution_by_id.
  4. Once the status reads FINISHED, ChatGPT reports the success message back to the user.
sequenceDiagram
  participant User as User
  participant ChatGPT as ChatGPT
  participant Truto as Truto MCP Server
  participant Maia as Maia API
  
  User->>ChatGPT: "Run the monthly financial rollup..."
  ChatGPT->>Truto: call create_a_maia_project_pipeline_execution
  Truto->>Maia: POST /projects/{project_id}/pipelines/execute
  Maia-->>Truto: pipelineExecutionId: 8844
  Truto-->>ChatGPT: Execution ID 8844
  
  loop Polling Interval
      ChatGPT->>Truto: call get_single_maia_project_pipeline_execution_by_id
      Truto->>Maia: GET /projects/{project_id}/executions/8844
      Maia-->>Truto: status: RUNNING
      Truto-->>ChatGPT: RUNNING
  end
  
  ChatGPT->>Truto: call get_single_maia_project_pipeline_execution_by_id
  Truto->>Maia: GET /projects/{project_id}/executions/8844
  Maia-->>Truto: status: FINISHED, message: "Success"
  Truto-->>ChatGPT: FINISHED
  ChatGPT-->>User: "The pipeline has finished successfully."

Workflow 2: Human-in-the-Loop Task Approval

When a Maia AI agent pauses for human confirmation, ChatGPT can act as the interface, presenting the decision to the user and submitting the approval.

"Check on task ID 5544. If it is waiting for a decision, tell me what it wants to do, and then approve it if it is just a read operation."

  1. ChatGPT calls get_single_maia_agents_task_by_id to retrieve the task state.
  2. The task status shows PENDING_DECISION and details the requested action.
  3. ChatGPT analyzes the decision payload. Realizing it is a read-only request, it determines approval is safe based on the user's prompt.
  4. ChatGPT calls create_a_maia_task_decision with the exact approval structure required.
  5. The Maia task resumes execution.

Workflow 3: FinOps Consumption Audit

LLMs are excellent at parsing dense consumption logs and flagging anomalies in infrastructure spend.

"Check our Maia credit consumption for the last 48 hours. Are any specific ETL users burning significantly more credits than their daily average?"

  1. ChatGPT calls list_all_maia_consumptions with the date range.
  2. It then calls list_all_maia_consumption_etl_users for the same period.
  3. ChatGPT parses the returned arrays, compares the daily usage against baseline numbers, and outputs a formatted report of anomalous consumption.

Security and Access Control

Handing an LLM the keys to your orchestration pipelines is dangerous without strict security boundaries. Truto provides several mechanisms to lock down your MCP servers:

  • Method Filtering: During creation, set config.methods to ["read"] to generate a read-only server. This ensures ChatGPT can query runner status and consumption data, but cannot trigger pipelines or delete projects.
  • Tag Filtering: Use config.tags to restrict the server to specific functional domains. For example, passing ["pipelines"] ensures the LLM cannot interact with SCIM user directories or vault secrets.
  • Token Authentication: Enable require_api_token_auth to enforce a second layer of security. With this enabled, possession of the MCP URL is not enough - the client must also pass a valid Truto API token in the Authorization header.
  • Automatic Expiration: Set an expires_at datetime when provisioning the server. Truto's distributed workers will automatically revoke the token and delete the server infrastructure at the exact second it expires. Perfect for temporary contractor access or limited-time audit workflows.

A Note on Rate Limits and Upstream Errors

When orchestrating high-volume polling or heavy data extraction, you will eventually hit API rate limits.

It is important to understand how Truto handles these constraints: Truto does not retry, throttle, or apply automatic backoff on rate limit errors.

When the upstream Maia API 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 IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset).

The caller (your agent framework or ChatGPT) is entirely responsible for reading these headers and implementing its own retry or backoff logic. Do not rely on the MCP server to absorb rate limit errors.

Moving Beyond Manual Orchestration

Connecting Maia to ChatGPT transforms how your team interacts with data infrastructure. By wrapping complex, asynchronous orchestration APIs inside standardized MCP tools, you eliminate the need for engineers to memorize endpoint routing, construct complex JSON decision payloads, or write polling scripts.

Instead of building and maintaining custom integration middleware, your team can rely on Truto to auto-generate, authenticate, and secure the connection layer. This allows you to focus on building intelligent workflows, rather than fighting with API schemas.

Ready to put your orchestration on autopilot?

FAQ

How do I connect Maia to ChatGPT?
You can connect Maia to ChatGPT by generating a secure Model Context Protocol (MCP) server URL via Truto. Once generated, add the URL as a custom connector in ChatGPT's developer settings.
Does Truto handle Maia API rate limits automatically?
No. Truto does not retry, throttle, or apply backoff on rate limit errors. When Maia returns an HTTP 429, Truto passes the error directly to the caller, normalizing the rate limit information into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset).
Can I restrict what ChatGPT can do in my Maia account?
Yes. When creating the Truto MCP server, you can apply method filters (e.g., read-only access) and tag filters to restrict the AI's capabilities to specific resources or environments.
How does Truto handle asynchronous pipeline executions in Maia?
Truto provides direct access to Maia's status endpoints. ChatGPT must invoke the status check tools on a polling interval until the pipeline or AI agent task reaches a completed state.

More from our Blog