@draftlet/mcp
v0.3.0
Published
MCP server that publishes HTML to draftlet.io
Readme
@draftlet/mcp
MCP server for publishing HTML to draftlet.io. Exposes three tools:
publish_html— single-page HTML, takes inline stringpublish_site— multi-file site, files passed as base64get_site— read site metadata bysiteId
Each tool wraps the full three-step API flow (manifest → presigned PUTs → finalize) so the agent only makes one call.
Install (local clone)
git clone <draftlet repo>
cd draftlet.io/mcp
npm install
npm run buildThen register in your MCP client config. For Claude Code (~/.claude.json or a project .mcp.json):
{
"mcpServers": {
"draftlet": {
"command": "node",
"args": ["/absolute/path/to/draftlet.io/mcp/dist/index.js"]
}
}
}Install (npm, once published)
{
"mcpServers": {
"draftlet": {
"command": "npx",
"args": ["-y", "@draftlet/mcp"]
}
}
}Configuration
| Env var | Default | Purpose |
|----------------------|-----------------------------|--------------------------------------|
| DRAFTLET_API_URL | https://api.draftlet.io | Override for dev (https://api.dev.draftlet.io) |
Try it
After registering and restarting your agent:
Publish this HTML to draftlet:
<!doctype html><h1>hello</h1>
The agent will call publish_html, which returns a URL like https://quiet-river-4821.draftlet.io.
