{
  "about": "Copy-and-paste Angular components for MCP Apps built with ngx-mcp-apps. Each file is standalone.",
  "components": [
    {
      "name": "one-file-app",
      "title": "A whole MCP App in one file",
      "description": "One component and three lines of bootstrap: this file is the entire application. It waits for the tool result and checks it, follows the host theme, calls a server tool from a form, follows the server while it changes, goes fullscreen and tells the model what the user did. `ng build` turns it into one HTML file. It is written for Angular 22: signal forms, `linkedSignal`, `@let`, `animate.enter`, no zone.js. Start from here when the app is small; split it into the pieces below when it grows.",
      "usage": "save it as `src/main.ts` of a new Angular 22 application, then `ng add ngx-mcp-apps-builder` and `ng build`.",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/one-file-app.ts"
    },
    {
      "name": "mcp-status",
      "title": "Connection status",
      "description": "A small badge that says whether the app is talking to a host. Useful in a header while you develop: outside a host (`ng serve`, a browser tab) it reads \"Standalone\".",
      "usage": "`<mcp-status />`",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/mcp-status.ts"
    },
    {
      "name": "mcp-tool-state",
      "title": "Tool result states",
      "description": "Wraps the part of the app that needs the tool result. It shows your content only when a result has arrived; before that, and when the tool call is cancelled or fails, it shows a short message instead. The app is on screen before the result exists, because the model streams the tool arguments first: this component covers that moment.",
      "usage": "`<mcp-tool-state> ...your view of the result... </mcp-tool-state>`",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/mcp-tool-state.ts"
    },
    {
      "name": "mcp-call-tool",
      "title": "Button that calls a server tool",
      "description": "Put it on a `<button>`: a click calls a tool of your MCP server through the host. While the call runs the button is disabled and marked busy, so a second click cannot start a second call.",
      "usage": "`<button mcpCallTool=\"add_item\" [args]=\"{ text }\" (result)=\"saved($event)\" (failed)=\"show($event)\">Add</button>`",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/mcp-call-tool.ts"
    },
    {
      "name": "mcp-live-value",
      "title": "Follow server state",
      "description": "A tool result reaches the app once. To show something that changes afterwards, for example because the model called another tool, read it from your server again and again. This component follows a counter: it calls `read_counter` every second and checks each answer with a guard. Copy it, then change the tool name, the guard and the template.",
      "usage": "`<mcp-live-value />`",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/mcp-live-value.ts"
    },
    {
      "name": "mcp-theme",
      "title": "Host theme",
      "description": "Follows the light or dark theme of the host. It writes `data-theme` on the `<html>` element, so your stylesheet can react with `:root[data-theme='dark'] { ... }`, and sets `color-scheme` there too. That second part matters: when the colour scheme of your page differs from the one of the host, the browser paints the frame white instead of leaving it transparent. It also copies the style variables the host sends (colours, fonts) to the `<html>` element, so your CSS can use them with a fallback: `color: var(--color-text-primary, #16203a)`. Keep the page background transparent: the host draws it.",
      "usage": "add `McpTheme` to the `hostDirectives` of your root component, or put `mcpTheme` on any element.",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/mcp-theme.ts"
    },
    {
      "name": "mcp-fullscreen-button",
      "title": "Fullscreen button",
      "description": "Asks the host to show the app in fullscreen, and back. It renders nothing when the host does not offer fullscreen (many mobile hosts do not), so you can leave it in the template.",
      "usage": "`<mcp-fullscreen-button />`",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/mcp-fullscreen-button.ts"
    },
    {
      "name": "mcp-tell-model",
      "title": "Tell the model",
      "description": "A text box with the two ways an app can talk back. \"Add to context\" is silent: the model reads the text on its next turn. \"Send as message\" posts a chat message as the user; hosts may ask the user to confirm it or refuse it (common on mobile), and then the component says so instead of failing.",
      "usage": "`<mcp-tell-model />`",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/mcp-tell-model.ts"
    },
    {
      "name": "mcp-host-link",
      "title": "Link opened by the host",
      "description": "Inside the host iframe a normal link is usually blocked by the sandbox. This directive asks the host to open the link instead. Outside a host, or if the host refuses, the link opens as a normal one in a new tab.",
      "usage": "`<a mcpHostLink href=\"https://example.com/docs\">Docs</a>`",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/mcp-host-link.ts"
    },
    {
      "name": "mcp-standalone-notice",
      "title": "Standalone notice",
      "description": "A line shown only when the app runs outside a host, for example with `ng serve`. There is no tool data there and calls to the host fail: saying so saves a puzzled minute while developing.",
      "usage": "`<mcp-standalone-notice />`",
      "source": "https://umb0o.github.io/ngx-mcp-apps/components/mcp-standalone-notice.ts"
    }
  ]
}
