MCP documentation
Connect BinHTML to an MCP-capable agent and let it publish generated HTML directly into your workspace.
Publish with your own API key
Sign up, open Settings, create an API key, then use the API or MCP endpoint from your tools.
Quick start
Create a BinHTML API key, add the remote MCP endpoint to your agent, then ask the agent to publish an HTML artifact.
- 1. Create a key
Open Settings and create a BinHTML API key. - 2. Connect MCP
Add https://binhtml.com/mcp. - 3. Publish
Ask your agent to publish generated HTML to BinHTML.
What agents can do
BinHTML exposes tools for publishing one HTML artifact or a whole project of related artifacts.
Publish a new artifact
The agent sends title, sourceHtml, visibility, and optional project or expiry details.
Return share links
The response includes share, dashboard, and source download URLs.
Share a project
Pro users can publish several HTML files into one project and get one project link.
Update a version
The agent can pass artifactId to replace the current HTML without changing the link.
Configuration
Use the Authorization header with a BinHTML API key. The apiKey tool argument remains available only for clients that cannot send headers.
MCP config
Use this with MCP clients that support remote HTTP servers and custom headers.
{
"mcpServers": {
"binhtml": {
"type": "http",
"url": "https://binhtml.com/mcp",
"headers": {
"Authorization": "Bearer $BINHTML_API_KEY"
}
}
}
}Copy for agent
Copy a setup prompt into another agent so it can configure BinHTML MCP, verify the tool, and tell the user where to create their API key.
Codex handoff
Configure BinHTML as a remote MCP server for this Codex environment. BinHTML MCP endpoint: https://binhtml.com/mcp Use a local environment variable named BINHTML_API_KEY for the user's BinHTML API key. Do not paste the key into chat history, source files, or committed config. Run: export BINHTML_API_KEY="paste-binhtml-api-key-here" codex mcp add binhtml --url https://binhtml.com/mcp --bearer-token-env-var BINHTML_API_KEY codex mcp get binhtml After setup, tell the user: 1. Get or create their BinHTML API key at https://binhtml.com/dashboard/settings. 2. Store it in BINHTML_API_KEY for this environment. 3. Once configured, BinHTML MCP exposes publish_html for one HTML file and publish_project for several related HTML files with one project link. Use publish_project when the user asks for a single link to a set of generated reports, options, or explainers. 4. publish_html returns share, management, and source-download URLs. To update an existing link, pass artifactId with replacement sourceHtml.
Agent handoff prompts
These prompts are static text so agents and crawlers can read the setup instructions without using the copy control.
Codex handoff
Codex
Configure BinHTML as a remote MCP server for this Codex environment. BinHTML MCP endpoint: https://binhtml.com/mcp Use a local environment variable named BINHTML_API_KEY for the user's BinHTML API key. Do not paste the key into chat history, source files, or committed config. Run: export BINHTML_API_KEY="paste-binhtml-api-key-here" codex mcp add binhtml --url https://binhtml.com/mcp --bearer-token-env-var BINHTML_API_KEY codex mcp get binhtml After setup, tell the user: 1. Get or create their BinHTML API key at https://binhtml.com/dashboard/settings. 2. Store it in BINHTML_API_KEY for this environment. 3. Once configured, BinHTML MCP exposes publish_html for one HTML file and publish_project for several related HTML files with one project link. Use publish_project when the user asks for a single link to a set of generated reports, options, or explainers. 4. publish_html returns share, management, and source-download URLs. To update an existing link, pass artifactId with replacement sourceHtml.
Claude handoff
Claude Code
Configure BinHTML as a remote HTTP MCP server for Claude Code. BinHTML MCP endpoint: https://binhtml.com/mcp Use the user's BinHTML API key through an Authorization header. Do not paste the key into source files or committed config. Run: export BINHTML_API_KEY="paste-binhtml-api-key-here" claude mcp add --transport http --header "Authorization: Bearer $BINHTML_API_KEY" binhtml https://binhtml.com/mcp claude mcp get binhtml After setup, tell the user: 1. Get or create their BinHTML API key at https://binhtml.com/dashboard/settings. 2. Keep it in BINHTML_API_KEY or their local secret store. 3. Open Claude Code's /mcp panel if they need to verify the server. 4. BinHTML provides publish_html for one generated HTML file and publish_project for several related files with one project link. Use projectName to group related outputs and artifactId to upload a new version to an existing link.
Generic handoff
Generic MCP
Configure BinHTML as a remote Streamable HTTP MCP server in this MCP-capable client.
Server name: binhtml
Endpoint: https://binhtml.com/mcp
Auth: Authorization header with Bearer token from BINHTML_API_KEY
If the client supports JSON MCP config, use:
{
"mcpServers": {
"binhtml": {
"type": "http",
"url": "https://binhtml.com/mcp",
"headers": {
"Authorization": "Bearer ${BINHTML_API_KEY}"
}
}
}
}
After setup, tell the user:
1. Get or create their BinHTML API key at https://binhtml.com/dashboard/settings.
2. Store it as BINHTML_API_KEY or in the client's secret manager.
3. Reload/list MCP tools and confirm publish_html and publish_project are available.
4. publish_html accepts title, sourceHtml, unlisted/private visibility, optional projectName, and optional expiresAt. Use artifactId to update an existing link instead of creating a new one.
5. publish_project accepts projectName plus a list of generated HTML artifacts and returns one shareable project URL for Pro accounts.Tool fields
These are the fields an agent can send to publish_html.
titleThe name shown in BinHTML when creating a new artifact.
sourceHtmlThe full HTML document to publish.
visibilityunlisted or private. Defaults to unlisted.
projectNameOptional project name for grouping related outputs.
expiresAtOptional future expiry date.
artifactIdOptional existing artifact ID when uploading a new version.
descriptionOptional short summary shown on the artifact detail page.
labelOptional version label when updating an existing artifact.
Project links
Use publish_project when an agent creates several HTML outputs and you want one shareable project index.
projectNameThe project to create or reuse for the shared collection.
artifactsA list of HTML files to publish into that project.
titleThe name shown for each artifact.
sourceHtmlThe full HTML document for each artifact.
projectShareExpiresAtOptional future expiry date for the project share link.
Project links are unlisted, noindex, and only show unlisted, active artifacts from that project. Private, deleted, expired, or moved artifacts are not shown.
Examples
These prompts work well once BinHTML MCP is connected.
Generate an HTML implementation report for this branch, publish it to BinHTML, and return the share URL.
Turn this PR review into a visual HTML summary, publish it with an unlisted BinHTML link, and give me the URL.
Create three HTML design options, publish them into a BinHTML project called Website concepts, and return one project link.
Tool call
A direct request example for clients that expose raw MCP calls.
curl https://binhtml.com/mcp \
-H "Authorization: Bearer $BINHTML_API_KEY" \
-H "Accept: application/json, text/event-stream" \
-H "Content-Type: application/json" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "publish_html",
"arguments": {
"title": "Agent report",
"projectName": "Launch workspace",
"sourceHtml": "<!doctype html><html><body><h1>Report</h1></body></html>",
"visibility": "unlisted"
}
}
}'Tool output
The agent should usually show the share URL to the user.
{
"artifact": {
"id": "7d9f6c84-9c6b-4f8e-8d8a-3a8097a56a91",
"slug": "agent-report-a1b2c3d4",
"title": "Agent report",
"visibility": "unlisted",
"expiresAt": null,
"createdAt": "2026-05-14T10:30:00.000Z",
"project": {
"id": "2e1a8d5a-2b73-4a9e-9d91-83ec19001b3a",
"name": "Launch workspace",
"slug": "launch-workspace"
}
},
"version": {
"number": 1,
"sizeBytes": 72,
"renderMode": "sandboxed-html"
},
"urls": {
"share": "https://binhtml.com/a/agent-report-a1b2c3d4",
"management": "https://binhtml.com/dashboard/artifacts/7d9f6c84-9c6b-4f8e-8d8a-3a8097a56a91",
"sourceDownload": "https://binhtml.com/dashboard/artifacts/7d9f6c84-9c6b-4f8e-8d8a-3a8097a56a91/source"
}
}Project tool call
For Pro users who want one link for several HTML files.
curl https://binhtml.com/mcp \
-H "Authorization: Bearer $BINHTML_API_KEY" \
-H "Accept: application/json, text/event-stream" \
-H "Content-Type: application/json" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "publish_project",
"arguments": {
"projectName": "Launch workspace",
"artifacts": [
{
"title": "Design option",
"sourceHtml": "<!doctype html><html><body><h1>Option A</h1></body></html>"
},
{
"title": "Research report",
"sourceHtml": "<!doctype html><html><body><h1>Research</h1></body></html>"
}
]
}
}
}'Project tool output
The agent should usually show the projectShare URL.
{
"project": {
"id": "2e1a8d5a-2b73-4a9e-9d91-83ec19001b3a",
"name": "Launch workspace",
"slug": "launch-workspace"
},
"share": {
"enabled": true,
"slug": "proj_7ZukWupbLk8aQhHc",
"expiresAt": null
},
"artifacts": [
{
"id": "7d9f6c84-9c6b-4f8e-8d8a-3a8097a56a91",
"title": "Design option",
"urls": {
"share": "https://binhtml.com/a/design-option-a1b2c3d4"
}
}
],
"urls": {
"projectShare": "https://binhtml.com/p/proj_7ZukWupbLk8aQhHc"
}
}Compatibility
Most users only need the endpoint and API key. These details are here for MCP clients, scanners, and directory listings.
Endpoint: https://binhtml.com/mcp
Protocol version: 2025-06-18.
BinHTML currently supports request/response Streamable HTTP over POST. It does not currently provide resumable streams or server-initiated SSE responses.
GET returns 405 because BinHTML does not send server-pushed messages.
Initialize request
Directory scanners and MCP clients call initialize before listing tools.
curl https://binhtml.com/mcp \
-H "Accept: application/json, text/event-stream" \
-H "Content-Type: application/json" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": { "name": "example", "version": "1.0.0" }
}
}'Smithery listing
Prompts users for a BinHTML API key during install.
smithery mcp publish "https://binhtml.com/mcp" -n @binhtml/binhtml \
--config-schema '{"type":"object","properties":{"binhtmlApiKey":{"type":"string","title":"BinHTML API key","format":"password","writeOnly":true,"x-from":{"header":"binhtml-api-key"},"x-to":{"header":"Authorization"}}},"required":["binhtmlApiKey"],"additionalProperties":false}'Failures
BinHTML returns clear tool errors so the agent can explain what needs to be fixed.
Missing or invalid API keys are rejected.
HTML must include <!doctype html> or an <html> tag.
Rate-limited calls include a retry hint.
BinHTML MCP does not expose browser automation, local files, prompts, resources, or generic hosting controls.
FAQ
Short answers for users connecting BinHTML through an MCP-capable agent.
How do I publish HTML from an agent?
Connect the BinHTML MCP endpoint, give the agent access to your BinHTML API key, then ask it to publish the generated HTML. The agent should return the BinHTML share URL.
Do I need a BinHTML API key?
Yes. MCP publishing requires a BinHTML API key so the artifact is saved to your workspace and plan limits can be applied.
What can MCP publish?
MCP can publish one complete HTML document with publish_html, update an existing artifact by passing artifactId, or publish several generated HTML files into one project with publish_project.
How do project links work?
Project links collect related unlisted artifacts into one unlisted project page. Project share links are available on Pro accounts and can be revoked.
What limits apply?
BinHTML applies the same publish limits through MCP as it does through the dashboard and API, including file size, retention, visibility, and publish-rate limits for your plan.
Why are artifact and project pages noindex?
Shared pages are meant for direct collaboration links, not search listings. BinHTML marks them noindex so generated work is not invited into search results by default.
Rendering
Published HTML is rendered in a sandboxed BinHTML viewer and can be managed from the dashboard.
Shared HTML renders inside a sandboxed iframe.
The iframe does not receive same-origin access to BinHTML.
Dashboard source downloads require the signed-in owner.
External resources referenced by the HTML may still load from their own origins.