Agents & MCP
The MCP server
htmldrop ships an MCP server,
@htmldrop.app/mcp, so an agent can publish and manage sites directly as
tool calls instead of shelling out to curl. Run it with:
npx -y @htmldrop.app/mcp
It exposes three tools:
htmldrop_publish— publish HTML or Markdown content to a live URL.htmldrop_list— list the sites in your account.htmldrop_delete— delete a site by its id (the opaque id returned by htmldrop_list — not the slug).
Multi-file bundles, folders, and .zip archives are published via the
REST API (POST /sites/{id}/upload-bundle) or the dashboard, not via the
MCP htmldrop_publish tool — see the API docs.
Authentication is a single environment variable:
HTMLDROP_API_TOKEN=hsk_live_...
Get a token
- Go to /dashboard/settings.
- Under API tokens, click Create.
- Copy the
hsk_live_…token — it's shown once, so store it somewhere safe (a secrets manager or your MCP client's env config).
Minimal client config
Most MCP clients read a JSON config that maps a server name to a command to
launch. For Claude Desktop, that's claude_desktop_config.json:
{
"mcpServers": {
"htmldrop": {
"command": "npx",
"args": ["-y", "@htmldrop.app/mcp"],
"env": {
"HTMLDROP_API_TOKEN": "hsk_live_..."
}
}
}
}
Other MCP-compatible clients use the same shape — a command/args pair
to launch the server and an env block for the token — just in whatever
config file that client expects.
Set up your client
Step-by-step install instructions for specific clients:
Once connected, ask your agent to publish some HTML or Markdown and it will
call htmldrop_publish and hand back the live URL. For raw HTTP access instead
of MCP, see the API docs; for every way to publish
interactively, see Publishing.