Agent setup
Let agents publish HTML, without exposing tokens.
Use the hosted MCP when the agent supports remote tools. Use the GitHub repo or skill when the agent is running in a coding workspace. In every path, keep the upload token in a secret store or environment, not in chat.
Hosted MCP for agent upload URLs
Use this for Claude, ChatGPT, Codex, or another agent runtime that can connect to a remote MCP server and run shell commands.
Security rule: do not paste the htmler token into the conversation. Configure it as connector auth, a workspace secret, or an environment variable supplied by the agent runtime.
Remote MCP URL: https://htmler.faros.ai/mcp
Use bearer auth from the secret named HTMLER_TOKEN.
Call create_curl_upload_url, save HTML locally, curl the returned URL, and return the response url.
Agent instruction
When you create a self-contained HTML artifact for a Faros teammate, call create_curl_upload_url from the htmler MCP server. Save the generated HTML to a local .html file, curl the returned uploadUrl with Content-Type: text/html, then return the JSON response's url field. Do not send the full HTML through MCP tool arguments unless direct upload is unavailable. Never ask the user to paste HTMLER_TOKEN into the conversation.
Coding agents using GitHub
Use this for Codex, Claude Code, or another agent that can work from a repo checkout.
- Point the agent at
https://github.com/faros-ai/htmler. - Ask it to install the HTML-only skill from
skills/htmler-upload, or use the script directly. - Provide
HTMLER_TOKENthrough the workspace secret manager, shell environment, or 1Password injection.
git clone https://github.com/faros-ai/htmler.git
cd htmler
node skills/htmler-upload/scripts/upload-html.mjs ./artifact.html --format json
1Password-backed local runs
Prefer a wrapper that injects the token only into the process environment. The token should not be committed, printed, or stored in agent instructions.
op run --env-file .env.htmler -- node skills/htmler-upload/scripts/upload-html.mjs ./artifact.html --format markdown
The env file should reference the 1Password item, not contain a literal secret value.
Direct API fallback
Use the API only when MCP and the skill are unavailable. The same token handling rules apply.
curl -X POST https://htmler.faros.ai/api/pages -H "authorization: Bearer $HTMLER_TOKEN" -H "content-type: text/html" --data-binary @artifact.html