# `A2UIPhoenix.Components.MCP`
[🔗](https://github.com/a2ui-elixir/a2ui/blob/v0.1.1/umbrella/apps/a2ui_phoenix/lib/a2ui_phoenix/components/mcp.ex#L1)

The function component for the MCP catalog's `McpApp` (v1.0): an
[MCP App](https://github.com/modelcontextprotocol/ext-apps) running in
a double-iframe sandbox, connected to the surface over the MCP Apps
JSON-RPC bridge.

The component renders a container with the `A2UIMcpApp` hook
(`priv/static/a2ui_phoenix.js`). The hook loads the sandbox proxy page
(`priv/static/a2ui_mcp_sandbox.html`, at the URL given by the surface's
`:mcp_sandbox` assign, `"/a2ui_phoenix/a2ui_mcp_sandbox.html"` by default),
hands it the app's HTML with its CSP domains and permissions, answers
the app's handshake, resizes the frame, keeps the app's bound state
(`data.paths`) in step with the data model, and passes the requests
that concern the surface to `A2UIPhoenix.Session.mcp_app_request/5`.

# `components`
*since 0.1.0* 

```elixir
@spec components() :: %{
  required(String.t()) =&gt; (map() -&gt; Phoenix.LiveView.Rendered.t())
}
```

The MCP catalog's components by type.

# `default_sandbox`
*since 0.1.0* 

```elixir
@spec default_sandbox() :: String.t()
```

The sandbox proxy URL used when the surface sets none: `/a2ui_phoenix/a2ui_mcp_sandbox.html`.

# `mcp_app`
*since 0.1.0* 

```elixir
@spec mcp_app(map()) :: Phoenix.LiveView.Rendered.t()
```

`McpApp`: the app's sandbox frame.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
