### Install Frost using curl script Source: https://frost.build/docs/installation This command downloads and executes the Frost installation script from GitHub. It requires root privileges (sudo) and assumes curl is installed on the system. The script handles the setup process for Frost. ```bash curl -fsSL https://raw.githubusercontent.com/elitan/frost/main/install.sh | sudo bash ``` -------------------------------- ### Inter-Service Communication Example (HTTP) Source: https://frost.build/docs/guides/ai-setup Illustrates how services within the same Frost project can communicate using the service's hostname and the default port 8080. This avoids the need for external URLs or complex service discovery. ```http http://:8080/api ``` -------------------------------- ### Local Docker Build and Run Verification Source: https://frost.build/docs/guides/ai-setup Commands to verify the Docker build process and run the container locally, simulating Frost's environment by setting the PORT environment variable. ```bash # Build the image docker build -t my-app . # Run with PORT env var (same as Frost does) docker run -p 8080:8080 -e PORT=8080 my-app ``` -------------------------------- ### Monorepo Dockerfile and Config Path (YAML) Source: https://frost.build/docs/guides/ai-setup Demonstrates how to specify the Dockerfile path within a monorepo structure in frost.yaml. The path is relative to the repository root. ```yaml dockerfile: apps/web/Dockerfile ``` -------------------------------- ### Frost Project Configuration (YAML) Source: https://frost.build/docs/guides/ai-setup An optional frost.yaml file at the repository root to configure Frost deployment settings. It specifies the Dockerfile path, the port to listen on, and health check parameters. ```yaml # yaml-language-server: $schema=https://raw.githubusercontent.com/elitan/frost/main/apps/app/frost.schema.json dockerfile: Dockerfile port: 8080 health_check: path: /health timeout: 30 ``` -------------------------------- ### Frost YAML Configuration Example Source: https://frost.build/docs/guides/config-file An example of the `frost.yaml` configuration file, specifying Dockerfile, port, health check settings, and resource limits for a service build. ```yaml # frost.yaml dockerfile: Dockerfile port: 3000 health_check: path: /health timeout: 30 resources: memory: 512m cpu: 0.5 ``` -------------------------------- ### Correct Network Binding for Containers (Node.js) Source: https://frost.build/docs/guides/ai-setup Illustrates the correct way for a server to bind to all network interfaces (0.0.0.0) within a containerized environment, contrasting it with the incorrect practice of binding only to localhost. This is crucial for container accessibility. ```javascript # Wrong server.listen(PORT, "localhost") # Correct server.listen(PORT, "0.0.0.0") ``` -------------------------------- ### Listen on PORT Environment Variable (Node.js) Source: https://frost.build/docs/guides/ai-setup Ensures the application listens on the dynamically assigned PORT environment variable provided by Frost, with a fallback to 8080. This is crucial for Frost's deployment mechanism. ```javascript server.listen(process.env.PORT || 8080) ``` -------------------------------- ### Standard .dockerignore File Source: https://frost.build/docs/guides/ai-setup A common .dockerignore file to exclude unnecessary files and directories from the Docker build context, leading to smaller image sizes and faster builds. Adaptable to various languages and frameworks. ```dockerignore node_modules .git .env .env.* dist build .next *.md .DS_Store ``` -------------------------------- ### Health Check Configuration (YAML) Source: https://frost.build/docs/guides/ai-setup Configures HTTP health checks within the frost.yaml file, specifying the path for the health check endpoint and the timeout duration. ```yaml health_check: path: /health timeout: 30 ``` -------------------------------- ### Test Application Health Check (curl) Source: https://frost.build/docs/guides/ai-setup This snippet demonstrates how to test if your application is responding by sending a curl request to the root or a configured health check path. It assumes the application is running on localhost:8080. ```bash curl http://localhost:8080 ``` ```bash curl http://localhost:8080/health ``` -------------------------------- ### IDE Autocompletion Schema for Frost YAML Source: https://frost.build/docs/guides/config-file This snippet shows how to enable IDE autocompletion for the `frost.yaml` file by adding a schema directive. This requires a YAML language server to be installed and configured in your IDE. ```yaml # yaml-language-server: $schema=https://raw.githubusercontent.com/elitan/frost/main/apps/app/frost.schema.json ``` -------------------------------- ### Available MCP Tools Source: https://frost.build/docs/guides/mcp Lists the available tools (functions) that AI agents can invoke via the MCP API, along with their required inputs and descriptions. ```APIDOC ## Available MCP Tools ### Description The MCP API exposes a set of tools that AI agents can use to interact with your Frost instance. These tools cover project management, service deployment, domain configuration, environment variables, and log retrieval. ### Tools | Tool | Input | Description | |-------------------|-------------------------------------|-----------------------------------------------------| | `list_projects` | — | List all projects with service count. | | `get_project` | `projectId` | Get project details with all services. | | `create_project` | `name` | Create a new empty project. | | `delete_project` | `projectId` | Delete project and all resources. | | `list_services` | `projectId` | List services with latest deployment status. | | `get_service` | `serviceId` | Get service config + latest deployment. | | `create_service` | `projectId`, `name`, `deployType`, ... | Create a service. | | `update_service` | `serviceId`, ... | Update service settings. | | `delete_service` | `serviceId` | Delete a service. | | `deploy_service` | `serviceId` | Trigger deployment for a specific service. | | `deploy_project` | `projectId` | Deploy all services within a project. | | `get_deployment` | `deploymentId` | Get deployment status and details. | | `list_deployments`| `serviceId`, `limit?` | List recent deployments for a service. | | `rollback` | `deploymentId` | Rollback to a previous deployment. | | `list_env_vars` | `serviceId` | Get environment variables for a service. | | `set_env_vars` | `serviceId`, `vars` | Set or update environment variables for a service. | | `delete_env_vars` | `serviceId`, `keys` | Delete environment variables by their keys. | | `list_domains` | `serviceId` | List domains associated with a service. | | `add_domain` | `serviceId`, `domain` | Add a new domain to a service. | | `remove_domain` | `domainId` | Remove a domain. | | `get_build_log` | `deploymentId` | Retrieve the build and deployment log. | | `get_runtime_logs`| `serviceId`, `tail?`, `replica?` | Get recent container logs for a service. | ``` -------------------------------- ### Authentication Flow Source: https://frost.build/docs/guides/mcp Details the OAuth 2.1 with PKCE authentication flow for MCP, including the steps from initial connection to obtaining an access token. ```APIDOC ## MCP Authentication Flow ### Description Frost uses OAuth 2.1 with PKCE for secure authentication of AI agents connecting to the MCP API. This process involves several steps to establish trust and obtain an access token. ### Method N/A (Authentication Flow) ### Endpoint N/A (Authentication Flow) ### Steps 1. **Initial Connection**: The AI agent attempts to connect to the MCP endpoint (e.g., `/api/mcp`) and receives a `401 Unauthorized` response. 2. **Discovery**: The agent discovers the authorization server's endpoints by requesting `/.well-known/oauth-protected-resource`. 3. **Client Registration**: The agent registers itself as a client application by calling the `/api/oauth/register` endpoint. 4. **User Approval**: The user's browser is opened to log in and approve the agent's access request. 5. **Token Acquisition**: Upon successful approval, the agent receives an access token, which it stores locally. 6. **Authenticated Requests**: All subsequent requests to the MCP API must include the obtained access token in the `Authorization: Bearer ` header. ### Token Expiration Access tokens have a default expiration of 30 days. Active tokens can be viewed and revoked in the Frost UI under **Settings → MCP Tokens**. ### Alternative Authentication For programmatic or CI/CD access, you can use the `x-frost-token` header with an API key obtained from the Frost settings. ``` -------------------------------- ### Configure Claude Code for Frost MCP Source: https://frost.build/docs/guides/mcp Configuration for Claude Code to connect to a Frost instance via MCP. This JSON snippet should be added to `~/.claude.json` for global access or `.mcp.json` within a project for project-specific access. Authentication is handled via browser-based OAuth 2.1. ```json { "mcpServers": { "frost": { "type": "http", "url": "https://your-frost-server.com/api/mcp" } } } ``` -------------------------------- ### MCP Server Configuration Source: https://frost.build/docs/guides/mcp Configuration for connecting AI agents like Claude Code and Cursor to a Frost MCP server. This involves setting the server type and URL in a JSON configuration file. ```APIDOC ## MCP Server Configuration ### Description Configure your AI agent to connect to a Frost instance's MCP endpoint. This typically involves adding a `mcpServers` object to your agent's configuration file (e.g., `~/.claude.json` or project-level `.mcp.json`). ### Method N/A (Configuration) ### Endpoint N/A (Configuration) ### Parameters N/A ### Request Example ```json { "mcpServers": { "frost": { "type": "http", "url": "https://your-frost-server.com/api/mcp" } } } ``` ### Response N/A (Configuration) ### Notes On first use, your browser will open for OAuth 2.1 approval. No tokens need to be manually copied. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.