> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bricks.tools/llms.txt
> Use this file to discover all available pages before exploring further.

# Built-in MCP server

> MCP server bundled with bricks-ctor

bricks-ctor includes a built-in MCP server that is automatically configured during `bun install`. The postinstall script adds a `bricks-ctor` entry to your `.mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "bricks-ctor": {
      "command": "bun",
      "args": ["./node_modules/@fugood/bricks-ctor/tools/mcp-server.ts"]
    }
  }
}
```

This server provides project-specific tools that AI coding agents (Claude Code, Codex, CTOR, etc.) can use alongside their built-in tools.

<Info>
  See the [CTOR MCP reference](/ctor/reference/mcp) for details on how MCP servers are configured and managed.
</Info>

## Available tools

<AccordionGroup>
  <Accordion title="compile" icon="hammer">
    Run type checking and compile the project.

    Executes `bun compile` in the project directory and returns the build output.
  </Accordion>

  <Accordion title="preview" icon="eye">
    Compile and launch a headless preview of the app, then take a screenshot.

    | Parameter       | Default | Description                                    |
    | --------------- | ------- | ---------------------------------------------- |
    | `delay`         | 3000    | Delay in milliseconds before taking screenshot |
    | `width`         | 600     | Screenshot width                               |
    | `height`        | 480     | Screenshot height                              |
    | `responseImage` | false   | Return screenshot as base64 image content      |
    | `testId`        | —       | Automation test ID to trigger                  |
    | `testTitleLike` | —       | Find automation test by partial title match    |

    <Info>
      Suppressed when this server runs inside [CTOR](/ctor) — CTOR's agent drives its embedded [Preview pane](/ctor/reference/preview) directly, so screenshots match what you see in the pane.
    </Info>
  </Accordion>

  <Accordion title="icon_search" icon="icons">
    Search the bundled FontAwesome 6 Pro icon set by keyword.

    | Parameter | Default | Description                                                               |
    | --------- | ------- | ------------------------------------------------------------------------- |
    | `query`   | —       | Search keywords                                                           |
    | `limit`   | 10      | Maximum results                                                           |
    | `style`   | —       | Filter by style: `brands`, `duotone`, `light`, `regular`, `solid`, `thin` |

    Returns matching icon names, unicode codes, and available styles.
  </Accordion>

  <Accordion title="lottie_search / lottie_popular / lottie_get_details" icon="film">
    Search and browse Lottie animations from LottieFiles.

    * **lottie\_search** — search by keywords with pagination
    * **lottie\_popular** — browse popular animations of the week
    * **lottie\_get\_details** — get full details for a specific animation by ID
  </Accordion>

  <Accordion title="huggingface_search / huggingface_select" icon="microchip">
    Search and select AI models from Hugging Face for use with BRICKS generators.

    **huggingface\_search** — search models filtered by generator type.

    | Parameter       | Default        | Description                                                                                                                                                                         |
    | --------------- | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | `generatorType` | `GeneratorLLM` | Generator type (`GeneratorLLM`, `GeneratorVectorStore`, `GeneratorReranker`, `GeneratorGGMLTTS`, `GeneratorGGMLTTSVocoder`, `GeneratorOnnxLLM`, `GeneratorOnnxSTT`, `GeneratorTTS`) |
    | `query`         | —              | Search keywords                                                                                                                                                                     |
    | `limit`         | 20             | Maximum results                                                                                                                                                                     |
    | `includeFiles`  | false          | Include model file listings                                                                                                                                                         |

    **huggingface\_select** — get download URLs and metadata for a specific model file. Supports GGUF and ONNX models, split files, multimodal projection files, and speaker embeddings.

    <Tip>
      Set the `HF_TOKEN` environment variable to access gated models on Hugging Face.
    </Tip>
  </Accordion>

  <Accordion title="media_boxes / media_files / media_file / media_get_box / media_upload_files" icon="photo-film">
    Manage media assets in your [BRICKS](https://bricks.tools) workspace via the CLI.

    * **media\_boxes** — list all media boxes
    * **media\_get\_box** — get details of a specific media box
    * **media\_files** — list files in a box (filter by type, tags, with pagination)
    * **media\_file** — get details of a specific file
    * **media\_upload\_files** — upload files to a box with optional image resizing, AI analysis, and tagging
  </Accordion>
</AccordionGroup>
