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:
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:
{
"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:
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:
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
POSTCreates 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
{
"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
| Field | Status | Type | Description |
|---|---|---|---|
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
{
"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
GETReturns the service health status. No authentication required.
{ "status": "ok" }
Error Responses
Missing html field, invalid slug format, or empty payload.
Request body exceeds the 1 MB limit.
Rate limit exceeded (10 deploys/min/IP). Retry after the indicated cooldown.
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.
/mcp
How It Works
- Your AI tool connects to the MCP endpoint via SSE transport.
- The tool discovers available tools via
tools/list. - The agent calls
deploy_assetwith HTML, Markdown, or Mermaid content. - 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 mcp add --transport http hostan https://hostan.app/mcp
Cursor Editor
Add to .cursor/mcp.json:
{
"mcpServers": {
"hostan": {
"url": "https://hostan.app/mcp"
}
}
}
VS Code
Add to .vscode/mcp.json:
{
"servers": {
"hostan": {
"type": "http",
"url": "https://hostan.app/mcp"
}
}
}
Generic MCP Client
Use the SSE transport to connect:
SSE URL: https://hostan.app/mcp
Transport: SSE (Server-Sent Events)
Protocol: JSON-RPC 2.0
deploy_asset Tool
TOOLThe single MCP tool exposed by Host An App. Deploys HTML, Markdown, or Mermaid diagram content and returns a public URL.
Input Schema
{
"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
{
"url": "https://hostan.app/my-app",
"expires_at": "2026-06-17T20:00:00Z"
}
Limits & Rules
| Limit | Value |
|---|---|
| Max payload size | 1 MB |
| Slug length | 3–63 chars |
| Slug characters | a-z 0-9 - |
| Deploy rate limit | 10/min/IP |
| Deployment TTL | 7 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.