Documentation

Host An App is a zero-config API for hosting HTML apps, Markdown documents, and Mermaid diagrams. Deploy content, get a public URL instantly. Works via REST API or MCP for AI agents.

Instant Deploy

One API call. Live URL in under a second.

AI-Native

MCP protocol for direct agent integration.

Ephemeral

Auto-expires after 7 days. No cleanup needed.

Quick Start

Deploy your first app in one curl command:

bash
curl -X POST https://hostan.app/api/v1/deploy \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-first-app",
    "content": "<!DOCTYPE html><html><body>Hello World</body></html>"
  }'

Response:

201 Created
{
  "id": "dep_01k8x7n1f8k0",
  "slug": "my-first-app",
  "url": "https://hostan.app/my-first-app",
  "created_at": "2026-06-10T20:00:00Z",
  "expires_at": "2026-06-17T20:00:00Z"
}

Deploy Markdown or Mermaid content by setting the type field:

bash
curl -X POST https://hostan.app/api/v1/deploy \
  -H "Content-Type: application/json" \
  -d '{
    "name": "hello-md",
    "content": "# Hello\n\nThis is **Markdown**.",
    "type": "markdown",
    "title": "Hello MD"
  }'

Or deploy a Mermaid diagram:

bash
curl -X POST https://hostan.app/api/v1/deploy \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-diagram",
    "content": "graph TD\n  A[Start] --> B[End]",
    "type": "mermaid",
    "title": "My Diagram"
  }'
💡

That's it!

Your app is now live at the returned URL. It will automatically be removed after 7 days. No account, no signup, no configuration needed.

Deploy Application

POST
/api/v1/deploy

Creates a new deployment. The content field accepts HTML, Markdown, or Mermaid diagram source depending on the type field. If name is omitted, a random slug is generated.

Request Body

application/json
{
  "name": "weather-dashboard",    // optional, 3–63 chars
  "content": "<!DOCTYPE html>..."  // required, max 1 MB
  "type": "markdown",           // optional, "html", "markdown", or "mermaid"
  "title": "My Page",            // optional, page title (markdown / mermaid)
  "one_time": true                 // optional, self-destructs after first visit
}

Parameters

FieldStatusTypeDescription
name optional string Preferred slug. Lowercase letters, digits, and hyphens. 3–63 characters. Auto-generated if omitted or taken.
content required string HTML, Markdown, or Mermaid diagram source. Must be valid UTF-8 and under 1 MB.
type optional string Interpretation of content. Default "html" — served as-is. "markdown" — rendered to HTML with a clean dark-themed layout. "mermaid" — rendered as an interactive diagram page with source tab.
title optional string Page <title> and H1 heading. Applies when type is "markdown" or "mermaid".
one_time optional boolean If true, the deployment self-destructs after the first visit.

Success Response

201 Created
{
  "id":         "dep_01k8x7n1f8k0",
  "slug":       "weather-dashboard",
  "url":        "https://hostan.app/weather-dashboard",
  "created_at": "2026-06-10T20:00:00Z",
  "expires_at": "2026-06-17T20:00:00Z"
}

Health Check

GET
/healthz

Returns the service health status. No authentication required.

200 OK
{ "status": "ok" }

Error Responses

400 Bad Request

Missing html field, invalid slug format, or empty payload.

413 Payload Too Large

Request body exceeds the 1 MB limit.

429 Too Many Requests

Rate limit exceeded (10 deploys/min/IP). Retry after the indicated cooldown.

500 Internal Server Error

Unexpected server failure. Retry once, then contact support.

MCP Overview

Host An App implements the Model Context Protocol (MCP) via Server-Sent Events (SSE). This allows AI agents to deploy applications directly without writing HTTP calls.

Endpoint
/mcp

How It Works

  1. Your AI tool connects to the MCP endpoint via SSE transport.
  2. The tool discovers available tools via tools/list.
  3. The agent calls deploy_asset with HTML, Markdown, or Mermaid content.
  4. Host An App returns a live URL the agent can share with the user.

MCP Setup Guides

Connect Host An App to your preferred AI tool in one step.

Claude Code Claude Code

Terminal
claude mcp add --transport http hostan https://hostan.app/mcp

Cursor Cursor Editor

Add to .cursor/mcp.json:

JSON
{
  "mcpServers": {
    "hostan": {
      "url": "https://hostan.app/mcp"
    }
  }
}

VS Code VS Code

Add to .vscode/mcp.json:

JSON
{
  "servers": {
    "hostan": {
      "type": "http",
      "url": "https://hostan.app/mcp"
    }
  }
}

Generic MCP Client

Use the SSE transport to connect:

Connection
SSE URL:    https://hostan.app/mcp
Transport:  SSE (Server-Sent Events)
Protocol:   JSON-RPC 2.0

deploy_asset Tool

TOOL

The single MCP tool exposed by Host An App. Deploys HTML, Markdown, or Mermaid diagram content and returns a public URL.

Input Schema

parameters
{
  "content": "<!DOCTYPE html>...",   // required, HTML, Markdown, or Mermaid
  "type": "mermaid",             // optional, "html" (default), "markdown", or "mermaid"
  "requested_slug": "my-app",  // optional (alias: "name")
  "title": "My Page",            // optional, page title (markdown/mermaid)
  "one_time": true               // optional, self-destructs after first visit
}

Output

response
{
  "url": "https://hostan.app/my-app",
  "expires_at": "2026-06-17T20:00:00Z"
}

Limits & Rules

LimitValue
Max payload size1 MB
Slug length3–63 chars
Slug charactersa-z 0-9 -
Deploy rate limit10/min/IP
Deployment TTL7 days

Reserved Slugs

These names cannot be used as deployment slugs:

api www mcp admin static hostan app _healthz healthz docs assets

Security

Response Headers

All deployment responses include:

X-Content-Type-Options: nosniff
Referrer-Policy: no-referrer

Path Traversal Prevention

All slugs are sanitized before filesystem operations.

No Restrictive CSP

Currently allows arbitrary user JavaScript in deployments. Isolation is at the origin level via same-origin policy.