# Wire SDK

For teams building agents, harnesses, or AI infrastructure who want Wire container connectivity as a first-class part of the product. Your user authorizes in their browser; you get back a scoped MCP endpoint and API key to hand to your agent.

You don't run the storage. You don't build the const client = new WireClient({ agentId: 'my-agent' });

    const connection = await client.connect({ label: 'my-laptop' });

    // Hand these to your agent's MCP client:
    const mcp = new MCPClient({
      url: connection.mcpUrl,
      headers: { 'x-api-key': connection.apiKey },
    });
    ```
  </TabItem>
</Tabs>

`connect()` shows the user a short code and opens their browser. The user types the code on the connect screen, picks a container, and `connect()` resolves with the result. That's the whole happy path.

## What you get

<Tabs syncKey="lang">
  <TabItem label="TypeScript">
    ```typescript
    interface Connection {
      mcpUrl: string;
      apiUrl: string;
      apiKey: string;
      containerId: string;
      containerName: string;
      orgSlug: string | null;
      expiresAt: Date | null;   // ephemeral containers only
      agentId: string;
      credentialId: string;
      deviceKey: DeviceKey;
      connectedAt: Date;
      label?: string;
    }
    ```
  </TabItem>
</Tabs>

The SDK persists nothing. Keep whatever fields you want from the result, however you want. For typical agent use, the only fields you need at runtime are `mcpUrl` and `apiKey`.

## Disconnect and status

<Tabs syncKey="lang">
  <TabItem label="TypeScript">
    ```typescript
    await client.disconnect(connection.apiKey);
    await client.getStatus(connection.apiKey);
    ```
  </TabItem>
</Tabs>

`disconnect` revokes the apiKey but keeps the install identity, so reconnect from the same `deviceKey` still works. `getStatus` returns a live snapshot of the container and connection.

## Go deeper

<CardGrid>
  [Connect flows](/build/sdk/connect-flows/)
  [Sign in with Wire](/build/sdk/sign-in-with-wire/)
  [Ephemeral containers and claim](/build/sdk/ephemeral-claim/)
  [Provision mode](/build/sdk/provision-mode/)
  [Skills and instructions](/build/sdk/skills-instructions/)
  [Reference](/build/sdk/reference/)
</CardGrid>