# Install TrussLab MCP in your coding agent

## Start here {#start-here}

TrussLab MCP lets your coding agent inspect, create, and edit parametric Frames in your open TrussLab tab. Hosted MCP is deployed for enrolled, signed-in Pro accounts. Use your own coding agent and its model access; a Pro Cloud subscription is not required. The hosted connection needs no npm package or repository checkout.

Give your agent this request: **Read https://trusslab.ai/mcp.md and configure TrussLab MCP for this client. Help me authorize it and connect to my open TrussLab tab.**

This page is also available as [plain Markdown](https://trusslab.ai/mcp.md). Reading the guide does not install or authorize anything by itself.

## Server details {#server-details}

- Server name: `trusslab`.
- Transport: Streamable HTTP.
- Authentication: OAuth with browser sign-in, dynamic client registration, and PKCE. No manually copied API key is needed.
- Current production MCP URL: `https://mcp.trusslab.ai/mcp`.
- App: [app.trusslab.ai](https://app.trusslab.ai).

Use the complete MCP URL, including `/mcp`. The app's **Connect agent → Hosted MCP → Set up your coding agent** panel also supplies the current configuration. The app homepage and this documentation page are not MCP endpoints.

## Codex setup {#codex}

First inspect existing servers with `codex mcp list`. If `trusslab` already points to the URL above, keep it. Preserve unrelated MCP settings; resolve an existing entry with a different URL before replacing it.

Add the remote server with `codex mcp add trusslab --url https://mcp.trusslab.ai/mcp`.

If adding the server has not already completed authorization, run `codex mcp login trusslab`. In the browser, sign in with your enrolled Pro account and click **Authorize agent**. The user completes sign-in and consent themselves.

Check `codex mcp list`. If the current conversation has not loaded the new server's tools, restart the client or start a new session. Configuration alone does not mean a model tab is connected. See [OpenAI's MCP documentation](https://developers.openai.com/codex/mcp) for client configuration and OAuth details.

## Other MCP clients {#other-clients}

Add a remote MCP server named `trusslab` using the URL above. The client must support Streamable HTTP and OAuth with dynamic client registration. Follow its sign-in flow and authorize the agent in TrussLab.

For clients using the `mcpServers` JSON format, merge this entry into the existing configuration: `{"mcpServers":{"trusslab":{"url":"https://mcp.trusslab.ai/mcp"}}}`. Configuration formats vary; Codex uses its CLI or TOML configuration instead of this JSON format.

## Approve your editor tab {#approve-your-editor-tab}

1. Open [TrussLab](https://app.trusslab.ai) and sign in with the same Pro account used during OAuth. Open the Frame or workspace you want the agent to use.
2. Ask the agent to call `begin_pairing` and show you its connection ID. Pairing requests expire after two minutes.
3. In that TrussLab tab, click **Connect agent**, select **Hosted MCP**, and select the matching waiting agent. Use **Refresh agents** if needed.
4. Choose **Only the current Frame** for the open model, or **This workspace** if the task needs catalogue access or document creation/opening. Choose a connection duration, then click **Approve and connect**.
5. Keep the tab open and tell the agent it is ready. Start with: **Inspect the current Frame and summarize it without changing anything.**

OAuth authorizes the client; tab approval selects the actual model scope. Browser focus does not change the approved target. After connection, the agent should read the server's modeling instructions, schemas, and examples before editing. Related edits can become one native undo step.

## Data and connection lifetime {#data-and-connection-lifetime}

Model storage and execution remain in the browser. Hosted requests and selected model results pass through the TrussLab relay and your agent provider; this is not end-to-end encryption. The relay processes model payloads in memory rather than storing them as cloud documents. Connecting does not enable model backup or sync.

Consent lasts 1, 8, or 24 hours, capped by your account session and Pro access. Use **Agent connected → Disconnect** to end tab access. Sign-out, tab closure, expiry, or a lost stream also stop access; reload or connection loss requires fresh pairing and approval. There is no unattended reconnection.

An accepted edit does not mean the browser has finished saving it. Wait for the editor's save indicator before reloading. If a mutation times out, inspect the model and recover the original request with `get_result` where available; do not blindly replay the edit with a new request ID.

## Troubleshooting {#troubleshooting}

- **Pro requirement:** MCP needs an enrolled, signed-in Pro account. Self-service signup and purchase are not yet available. Reading these instructions does not grant Pro access.
- **No waiting agent:** Complete OAuth, use the same account in the editor, select Hosted MCP, and ask the agent for a fresh `begin_pairing` request.
- **Tools unavailable after setup:** Refresh or restart your MCP client. A server configuration and a connected editor tab are separate states.
- **Protocol mismatch:** Reload the app to pick up its current release. If the hosted relay still reports a mismatch, report it to TrussLab; do not bypass the check.
- **Client lacks remote OAuth:** The app also offers **Local connector (advanced)** with a matching download and installation instructions. Initial local-connector support is macOS, Google Chrome, Node 22 or newer, and a local stdio MCP client.

For general editor concepts, see the [agent context](https://trusslab.ai/agent-context.md) and [Frame Editor reference](https://trusslab.ai/docs/frame-editor/reference/). For account or connection help, contact [info@trusslab.ai](mailto:info@trusslab.ai).
