Skip copy and paste: publish Claude Code and Codex output with MCP
Connect the HTML2WEB Remote MCP to Claude Code or Codex and publish agent-generated HTML or Markdown to a temporary URL with one request.

You do not have to copy and upload every HTML file produced by Claude Code or Codex. Register HTML2WEB’s public Remote MCP address once, then ask the agent to “publish this file as a one-hour link.” It can call the publishing tool and return the URL. The public Free endpoint needs neither an API key nor a bearer token.
MCP in one sentence
The Model Context Protocol lets an AI client discover and call tools offered by
an external service. The official MCP Tools
specification
defines how a server provides tool names, descriptions, and input schemas, and
how a client executes them through tools/call.
HTML2WEB uses that protocol for publish, update, and delete tools. Connecting a server does not publish files automatically. A tool runs when the user requests publication and the client’s approval policy permits it.
Connect HTML2WEB to Claude Code
Run this command in a terminal:
claude mcp add --transport http --scope user html2web https://html2web.iill.dev/mcp
--transport http selects the Streamable HTTP transport used by the Remote MCP.
--scope user makes the connection available across projects. Keep the default
or use --scope local when only one project needs it.
Check the connection:
claude mcp list
You can also inspect it from the /mcp menu in a Claude Code session. Confirm
current options in the official Claude Code MCP
documentation.
A request to use in Claude Code
Publish report.html with HTML2WEB.
- Expiration: 24 hours
- Password: none
- Before publishing, scan for API keys, tokens, connection strings,
personal information, customer data, internal hostnames, and local asset paths.
- If you find any, do not publish. Report only the file location and reason.
- On success, show only the share URL and expiration time in the public response.
- Never print the management token in a public response or chat channel.
Connect HTML2WEB to Codex
The current Codex CLI command is:
codex mcp add html2web --url https://html2web.iill.dev/mcp
List registered servers with:
codex mcp list
The Codex app, CLI, and IDE extension may share MCP settings for the same Codex host. If a client has been running for a long time, restart it after adding the server or begin a new session so it refreshes the tool list.
A request to use in Codex
Publish docs/audit.md as Markdown through HTML2WEB.
- Expiration: one hour
- Scan for secrets and personal information before publishing.
- Stop if it contains an internal server address or customer data.
- Use the publish_markdown tool.
- On success, report only the share URL and expiration time.
- Do not include the management token in a public message.
Tools provided by the HTML2WEB MCP
The current public tools listed in the HTML2WEB MCP documentation are:
| Tool | Purpose |
|---|---|
publish_html |
Publish an HTML string and return a URL |
publish_markdown |
Render and publish a Markdown string |
publish_html_file |
Publish a Base64-encoded HTML or Markdown file |
update_share |
Replace content at the same share with a management token |
delete_share |
Delete a share immediately |
set_password |
Add, change, or remove the viewing password |
set_expiry |
Change expiration within the current plan |
get_share_status |
Check status without returning the body |
The public Free endpoint accepts files up to 1MB. Expiration must be 30m,
1h, or 24h, defaults to 1h, and is subject to fair-use limits.
Require a scan before publication
Automation removes a step where a person might otherwise see the file. Include the scan in the publishing request:
Before publishing, find and report:
1. Secret patterns such as sk-, ghp_, AKIA, and Bearer tokens
2. Keys, secrets, and database connection strings copied from .env
3. Real names, email addresses, phone numbers, employee IDs, and customer names
4. Internal IP addresses, domains, and staging URLs
5. Local-only paths such as file://, localhost, and ./assets
If you find any item, do not call the publishing tool. Stop.
Pattern matching is not complete. On the first day you connect the MCP, check the same file in the manual HTML-to-URL interface so you understand the published result, expiration, and password behaviour.
A management token is not the viewing URL
The publish response may include a management token that can update or delete the share. It is the ownership key for that share, even though it is not an API key.
- Send the share URL to recipients.
- Keep the management token and management link with the author.
- Do not paste the full response JSON into Slack, an issue, or a PR.
- Losing the token may make the share difficult to manage before it expires.
The token is not required to view the link.
Troubleshooting
HTML2WEB is absent from the tool list
Run claude mcp list or codex mcp list to confirm registration. Restart the
client. In Claude Code, also check whether the registered scope applies to the
current project.
The file exceeds 1MB
Base64-encoded inline images are a common cause. Reduce them, or replace simple charts with inline SVG and tables.
The expiration value is rejected
The public Free endpoint accepts only 30m, 1h, and 24h.
It works locally but breaks after publishing
Separate CSS, JavaScript, and image files do not follow the document. Ask the agent to create “one self-contained HTML file with no external dependencies.”
The endpoint reports a quota error
Wait until the reset time in the response, or follow the upgrade flow in the official documentation from a browser. Do not append checkout URLs or arbitrary tokens to the MCP setting.
When manual upload is better
- You will publish the file only once.
- You need to inspect the rendered result before publishing.
- Company policy prohibits external MCP connections.
- The file is too sensitive to enter an agent context.
- You prefer to select expiration and password in the interface.
Automation is valuable for repeated work. It does not need to replace every manual publication from the start.
The boundary between a temporary link and production
MCP automation does not change the result’s lifecycle. It remains a review link
for up to 24 hours with noindex by default. Move to maintained hosting when
you need a stable domain, search visibility, continuous updates, and monitoring.
A password does not justify publishing sensitive information. A recipient can still save or forward the content.
Frequently asked questions
Does the public MCP really require no sign-in?
The current Free endpoint at https://html2web.iill.dev/mcp connects without an
API key or bearer token. Fair-use limits still apply.
Can an agent upload files without my permission?
Tool calls follow the user’s request and the client’s approval policy. Start by requiring confirmation for write tools until you understand the flow.
Do I register it separately in Claude Code and Codex?
Yes. They use separate client settings, so connect each one once. Both then use the same HTML2WEB tools and limits.
Can I update content at the same address?
If you kept the management token, update_share can replace the content. Never
include the management token in a public message.