---
title: "Connect Tray.ai to Claude: Deploy Instances and Export Projects"
slug: connect-tray-ai-to-claude-deploy-instances-and-export-projects
date: 2026-10-19
author: Nachi Raman
categories: ["AI & Agents"]
excerpt: "Learn how to connect Tray.ai to Claude using a managed MCP server. Automate embedded user provisioning, solution deployment, and CI/CD project exports."
tldr: "Connect Tray.ai to Claude using Truto's MCP server. This guide covers how to generate the server, configure Claude, and orchestrate complex embedded deployments and project exports via AI."
canonical: https://truto.one/blog/connect-tray-ai-to-claude-deploy-instances-and-export-projects/
---

# Connect Tray.ai to Claude: Deploy Instances and Export Projects


If you need to connect Tray.ai to Claude to automate embedded integrations, deploy solution instances, manage user authentications, or handle CI/CD project exports, you need a [Model Context Protocol (MCP) server](https://truto.one/what-is-mcp-and-mcp-servers-and-how-do-they-work/). This server acts as the translation layer between Claude's tool calls and Tray.ai's APIs. You can either [build and maintain this infrastructure yourself](https://truto.one/the-hands-on-guide-to-building-mcp-servers-for-ai-agents-2026/), or use a managed integration platform like Truto to dynamically generate a [secure, authenticated MCP server URL](https://truto.one/managed-mcp-for-claude-full-saas-api-access-without-security-headaches/). If your team uses ChatGPT, check out our guide on [/connect-tray-ai-to-chatgpt-manage-embedded-users-and-solutions/](https://truto.one/connect-tray-ai-to-chatgpt-manage-embedded-users-and-solutions/) or explore our broader architectural overview on [/connect-tray-ai-to-ai-agents-automate-auth-and-user-lifecycle/](https://truto.one/connect-tray-ai-to-ai-agents-automate-auth-and-user-lifecycle/).

Giving a Large Language Model (LLM) read and write access to a sprawling automation platform like Tray.ai is a significant engineering challenge. You have to handle API token lifecycles, map deeply nested GraphQL schemas to MCP tool definitions, and deal with complex configuration deployments. Every time Tray.ai introduces a new API mutation or updates an existing schema, you have to update your server code, redeploy, and test the integration.

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

> Want to give your AI agents secure, authenticated access to Tray.ai and 100+ other SaaS APIs? Let's talk about [managed MCP architecture](https://truto.one/managed-mcp-for-claude-full-saas-api-access-without-security-headaches/).
>
> [Talk to us](https://truto.one/book-a-demo/)

## The Engineering Reality of the Tray.ai API

A [custom MCP server](https://truto.one/the-hands-on-guide-to-building-mcp-servers-for-ai-agents-2026/) is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools over JSON-RPC, the reality of implementing it against Tray.ai's API requires dealing with specific architectural quirks.

If you decide to build a custom MCP server for Tray.ai, you own the entire lifecycle. Here are the specific challenges you will face:

**GraphQL Abstractions and Nested Connections**
Tray.ai heavily utilizes GraphQL under the hood for its Embedded and organizational APIs. This means the API responses rely on the relay connection pattern (e.g., `data.viewer.solutions.edges.node`). When building tools for an LLM, you cannot simply hand Claude a deeply nested GraphQL response. The LLM will waste tokens navigating the connection/edge/node hierarchy. You must build a translation layer that flattens these structures into predictable, REST-like arrays for the model to digest efficiently.

**Config Slots and Auth Slots for Solution Instances**
Deploying a solution instance in Tray.ai is not a simple POST request. An LLM attempting to call `create_a_tray_ai_solution_instance` must understand that instances often require `configValues` and `authValues`. If you do not explicitly map the schema of these slots into the MCP tool definition, Claude will hallucinate the required configuration parameters, resulting in a failed deployment. Your MCP server must dynamically define these required properties in the tool schema.

**Large JSON Payloads for Project Exports**
Promoting a Tray project from a development workspace to production involves exporting the project as a massive, serialized JSON payload. Handling this via an LLM requires strict schema boundaries. If the MCP server does not accurately handle the encoding and decoding of these massive payloads, the JSON string will break the RPC context window or fail parsing during the import mutation. You must ensure the tool schemas instruct the LLM to treat these payloads as opaque strings.

## How to Create the Tray.ai MCP Server

To bridge Claude and Tray.ai, you need to spin up an MCP server. Truto derives tool definitions dynamically from Tray.ai's API resources, meaning you never have to hand-code JSON schemas for the tools. 

You can generate this server via the Truto UI or programmatically via the API.

### Method 1: Via the Truto UI

For administrators setting up a persistent connection for Claude Desktop, the UI is the fastest route:

1. Log in to the Truto dashboard and navigate to the **Integrated Accounts** page.
2. Select your connected Tray.ai account.
3. Click the **MCP Servers** tab.
4. Click **Create MCP Server**.
5. Select your desired configuration (name, allowed methods, tags, and optional expiration).
6. Click Save and **copy the generated MCP server URL**.

### Method 2: Via the Truto API

For engineering teams orchestrating temporary or tenant-specific AI agents, generating the server via API is required. Truto will validate the requested filters, generate a cryptographically secure token, and return the server URL.

Execute a POST request to `/integrated-account/:id/mcp`:

```bash
curl -X POST https://api.truto.one/integrated-account/YOUR_TRAY_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Tray.ai DevOps Agent Server",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'
```

The response contains the exact URL Claude needs to connect to the JSON-RPC interface:

```json
{
  "id": "mcp_srv_8f92b...",
  "name": "Tray.ai DevOps Agent Server",
  "config": { "methods": ["read", "write", "custom"] },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/abc123def456..."
}
```

## Connecting the MCP Server to Claude

Once you have the Truto MCP server URL, you must connect it to your Claude environment. You can do this through the Claude application UI or by modifying the desktop configuration file.

### Method A: Via the Claude UI

If you are using an Enterprise or Team plan with custom connector support:

1. Open Claude and navigate to **Settings -> Integrations**.
2. Click **Add MCP Server** (or "Add custom connector").
3. Provide a recognizable name (e.g., "Tray.ai Integration API").
4. Paste the `url` generated from the Truto API in the previous step.
5. Click **Add**.

Claude will immediately ping the `/mcp/:token` endpoint, complete the JSON-RPC 2.0 handshake, and index the available Tray.ai tools.

### Method B: Via the claude_desktop_config.json File

If you are using Claude Desktop for local agent development, you configure the server directly in your local environment file. Truto provides an SSE (Server-Sent Events) wrapper that allows Claude Desktop to communicate with remote HTTP MCP endpoints.

Locate your `claude_desktop_config.json` file (typically located at `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS) and add the following configuration:

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

Restart Claude Desktop. The application will initialize the SSE transport layer and automatically load the Tray.ai tool schemas into the context window.

## Tray.ai Hero Tools for Claude

When Claude connects to the MCP server, Truto dynamically exposes Tray.ai's endpoints as strictly typed JSON-RPC tools. Below are the highest-leverage tools available for orchestrating embedded solutions and project deployments.

### List All Tray.ai Solutions

This tool retrieves all Tray Embedded solutions available to your end users. Because Truto flattens the GraphQL edges internally, Claude receives a clean array of solution nodes including IDs, titles, descriptions, and expected config slots.

> "Claude, list all the available Tray.ai solutions in our workspace and tell me which ones require authentication slots."

### Create a Tray.ai Solution Instance

This tool creates a specific solution instance for an end user based on a parent solution. Claude must pass the `solution_id` and `name`.

> "Deploy a new instance of the 'Salesforce to Slack' solution for the new client. Name the instance 'ClientA_SFDC_Sync'."

### Create a Tray.ai Authentication

Before a solution instance can operate, it needs authenticated service connectors. This tool creates a Tray Embedded user authentication for a specific service.

> "Create a new authentication record for the Slack service connector under user ID 9384-xyz. Hide this authentication from the public list."

### Generate Authorization Code

Embedded users often need to authenticate their own third-party tools via the Tray Config Wizard. This tool generates the one-time-use authorization code required to launch the wizard.

> "Generate a one-time authorization code for the Tray end user 'Acme Corp Admin' so they can launch the configuration wizard."

### Export Tray.ai Projects

This tool triggers the export of a specific Tray project, returning the massive JSON payload required for backups or cross-workspace promotion.

> "Export the configuration for the 'Billing Webhook Processor' project and save the resulting JSON payload so we can promote it to production."

### Import Tray.ai Projects

This tool takes the exported JSON payload from a previous step and imports it into a target project. This is the core engine for automated CI/CD pipelines managed by an AI agent.

> "Take the project JSON payload I just provided and import it into the target project ID 'proj_89123' to update our production environment."

To view the complete inventory of available tools, required parameters, and JSON schemas for this connector, visit the [Tray.ai integration page](https://truto.one/integrations/detail/trayai).

## Workflows in Action

By chaining these MCP tools together, Claude can execute complex orchestration scenarios that typically require a human engineer navigating the Tray.ai GraphQL API.

### Scenario 1: Provisioning an Embedded User and Deploying a Solution

**The Persona:** An Integration Operations Engineer needs to quickly onboard a new tenant, create their embedded user profile, generate a configuration token, and deploy a standard integration solution.

**The Prompt:**
> "We just signed a new client, BetaTech. Create a new Tray embedded user for them with external ID 'betatech-prod'. Once created, generate a user access token for them. Finally, deploy a new solution instance named 'BetaTech HubSpot Sync' using solution ID 'sol_98765'."

**The Execution:**
1. Claude calls `create_a_tray_ai_user` passing `name: "BetaTech"` and `external_user_id: "betatech-prod"`.
2. The Truto MCP server executes the API call, returning the new `user_id`.
3. Claude calls `tray_ai_users_create_user_token` using the newly returned `user_id` to generate the secure access token.
4. Claude calls `create_a_tray_ai_solution_instance` passing the `solution_id` and the requested instance name.

```mermaid
sequenceDiagram
    participant User as User
    participant Claude as Claude Desktop
    participant Truto as Truto MCP Server
    participant TrayAI as "Tray.ai API"

    User->>Claude: "Create embedded user for BetaTech..."
    Claude->>Truto: call: create_a_tray_ai_user (BetaTech)
    Truto->>TrayAI: POST /users
    TrayAI-->>Truto: user_id: 12345
    Truto-->>Claude: Result: user_id 12345
    
    Claude->>Truto: call: tray_ai_users_create_user_token (user_id: 12345)
    Truto->>TrayAI: POST /users/12345/token
    TrayAI-->>Truto: accessToken: "abc..."
    Truto-->>Claude: Result: accessToken
    
    Claude->>Truto: call: create_a_tray_ai_solution_instance (sol_98765)
    Truto->>TrayAI: POST /solution_instances
    TrayAI-->>Truto: instance_id: 999
    Truto-->>Claude: Result: Solution deployed
    Claude-->>User: "BetaTech user created, token generated, and solution deployed."
```

**The Result:** The user receives a confirmation that the tenant has been fully onboarded into the Tray Embedded architecture, complete with their secure token and active solution instance.

### Scenario 2: Automated CI/CD Project Promotion

**The Persona:** A DevOps Administrator needs to migrate a tested integration project from a staging workspace into production without manually downloading and uploading JSON files.

**The Prompt:**
> "I need to promote our 'Staging Order Router' project (ID: proj_stage1) to production. Export the project from staging, and then immediately import that exact payload into our 'Prod Order Router' project (ID: proj_prod9)."

**The Execution:**
1. Claude calls `tray_ai_projects_export` passing `project_id: "proj_stage1"`.
2. The Truto MCP server returns the massive `exportedProjectJson` payload.
3. Claude calls `tray_ai_projects_import` passing `target_project_id: "proj_prod9"` and injecting the exact `exportedProjectJson` string it just received.

```mermaid
flowchart TD
    A["Export Request<br>(proj_stage1)"] --> B["Truto MCP Server"]
    B -->|"tray_ai_projects_export"| C["Tray.ai API (Staging)"]
    C -->|"exportedProjectJson"| B
    B --> D["Claude Memory"]
    D --> E["Import Request<br>(proj_prod9)"]
    E --> F["Truto MCP Server"]
    F -->|"tray_ai_projects_import"| G["Tray.ai API (Prod)"]
```

**The Result:** Claude securely orchestrates the export and import of the project configuration between environments, automating a tedious devops chore in seconds.

## Security and Access Control

Exposing an automation platform like Tray.ai to an LLM requires strict boundary controls. Truto's MCP architecture provides several layers of security to ensure AI agents only interact with authorized endpoints:

*   **Method Filtering:** You can restrict the MCP server configuration to read-only operations. By passing `config.methods: ["read"]` during server creation, Truto prevents the generation of any `create`, `update`, or `delete` tools. Claude will physically not see the tools to modify projects or instances.
*   **Tag Filtering:** Limit the server scope to specific functional areas using `config.tags`. For example, you can create a server that only exposes user management tools by filtering for the `users` tag, keeping project modification tools entirely hidden.
*   **API Token Authentication:** By enabling `require_api_token_auth`, possessing the MCP URL is no longer enough to invoke tools. The caller must also pass a valid Truto API token in the authorization header, adding a required secondary authentication layer.
*   **Automatic Expiration:** You can provision short-lived MCP servers by supplying an `expires_at` ISO datetime. Once the timestamp passes, Truto's background alarm workers automatically purge the server configuration, severing Claude's access.

**A Note on Rate Limits:** Tray.ai enforces API rate limits. When integrating via Truto MCP, Truto *does not* absorb, throttle, or automatically retry HTTP 429 (Too Many Requests) errors. Truto passes the 429 error directly back to the caller (Claude) along with standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). The client executing the workflow is responsible for implementing appropriate backoff and retry logic.

## Moving Faster with Managed MCP

Connecting Tray.ai to Claude transforms how your engineering and operations teams manage embedded integrations and CI/CD pipelines. However, [building a custom MCP server](https://truto.one/the-hands-on-guide-to-building-mcp-servers-for-ai-agents-2026/) means owning the burden of GraphQL edge normalization, auth slot management, and API lifecycle updates.

Using a managed MCP server via Truto eliminates the boilerplate infrastructure. You get dynamic, documentation-driven tool schemas, built-in security filtering, and instant JSON-RPC compatibility with Claude Desktop and custom AI agents.

Stop writing custom integration scripts to manage your automation platform. Give your AI agents the tools they need to operate Tray.ai autonomously.
