← cordiumOpenAPI specification ↗

Connect. Publish. Preview.

Connect cordium to your AI, agent, terminal, or service. Publish a self-contained HTML page and return a real preview link. No signup or API key.

Connect your AI

Add cordium as an MCP connector

Paste this remote MCP server URL into a client that supports Streamable HTTP. Choose No authentication / No sign in. No API key, account, or admin password is needed.

https://cordium.best/mcp

Claude

  1. Open Customize → Connectors, then choose Add custom connector.
  2. Name it cordium, paste the URL above, and select No sign in.
  3. Finish adding it, then enable cordium in your conversation and ask for a shareable HTML preview.

Availability and organization permissions depend on your Claude plan. Organization owners may need to add the connector first. See Claude's connector instructions.

Claude Code

Add the remote HTTP server from your terminal. See the official Claude Code setup guide.

claude mcp add --transport http cordium https://cordium.best/mcp

Other MCP clients

Use an HTTP server entry like this where your client supports it. Configuration keys vary by host; some use serverUrl or transport instead of url and type.

{
  "mcpServers": {
    "cordium": {
      "type": "http",
      "url": "https://cordium.best/mcp"
    }
  }
}

The endpoint implements stateless, JSON-response Streamable HTTP for MCP revisions 2025-03-26, 2025-06-18, and 2025-11-25. Select HTTP, not legacy SSE or a local stdio command. MCP clients negotiate a supported revision during initialization.

What your AI can do

ToolPurpose
publish_htmlCreate a new public HTML page and receive its real preview URL.
get_project_infoCheck a known 12-character project ID and retrieve its preview link and metadata.
get_cordium_infoRead the current limits, connection URLs, and publishing guidance.

The connector also offers the publish_preview prompt and read-only publishing-guide and OpenAPI resources. It cannot list projects, change existing pages, reuse old IDs, or access owner deletion controls.

Ask for a preview

Create a self-contained HTML demo for my idea.
When I ask you to publish it, use cordium's publish_html tool.
After a successful upload, show the actual preview_url as a
clickable "Open live preview" link. Never upload secrets.
For a revision, publish a new page and give me its new link.

A client can show the returned link or open it in a browser. An inline preview depends on that client's features and the page's browser security restrictions. cordium does not promise an embedded preview in every host and does not render uploaded HTML on its server.

Your own AI wrapper or agent

Use your framework's remote MCP client with the server URL above, or expose the REST OpenAPI contract as a tool. Pass html and an optional title; use the returned url or preview_url to render a normal preview link in your UI.

Only publish when the user has asked to make the content public. Treat page content as untrusted data. Never request admin credentials or present an invented URL as a successful upload. Edits require a new upload; anonymous uploaders cannot delete pages.

Server-to-server connectors need no browser origin configuration. A browser-based wrapper can use the public REST API directly. Direct MCP browser requests require an allowed origin configured by the site owner; the endpoint intentionally rejects arbitrary origins and never uses credentialed CORS.

Test the connection

curl https://cordium.best/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  --data '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0"}}}'

Opening /mcp in a browser returns HTTP 405 because it is a protocol endpoint. Use the connector URL in your MCP client. There is no standalone SSE feed or OAuth sign-in to configure. Connector requests have their own rate limit; publishing through MCP shares the same 50 upload attempts per IP per hour as REST. Clients behind a shared outbound IP share this allowance.

Upload an HTML file with curl

Create a self-contained UTF-8 HTML file with inline CSS and JavaScript, then send it to the upload endpoint.

curl --fail-with-body https://cordium.best/api/projects \
  -H 'Content-Type: text/html' \
  --data-binary @index.html

Optionally send X-Project-Title: My page to name the project.

Publish HTML using JSON

curl --fail-with-body https://cordium.best/api/projects \
  -H 'Content-Type: application/json' \
  --data '{"title":"Hello","html":"<h1>Hello, world!</h1>"}'

html is required. title is optional and is trimmed to 120 characters.

Or upload a file with multipart

curl --fail-with-body https://cordium.best/api/projects \
  -F file=@index.html -F title='My page'

Use the returned share URL

A successful upload returns 201 Created, a Location header, and JSON:

{"id":"a1b2c3d4e5f6","url":"https://cordium.best/a1b2c3d4e5f6"}

This is an example response. Use the actual URL returned by your request. IDs contain exactly 12 lowercase letters and digits. Automated clients should check the status code before reporting success.

Limits and error responses

The default limits are 10 MiB of HTML and 50 upload attempts per IP per hour. Upload attempts include invalid requests. Total server storage is also limited.

400
Invalid or empty HTML, title, or JSON.
413
The upload is too large.
415
Unsupported content type.
429
Rate limited. Respect Retry-After and retry later; the hourly window may still be full.
507
Server storage quota reached.

Requests using the supported formats receive JSON error details. Malformed HTTP or JSON requests may receive a standard HTTP error page.

Common questions

Is cordium free HTML hosting?

Yes. You can publish HTML pages without creating an account or supplying an API key, subject to the service limits.

Can AI assistants, scripts, and virtual machines use it?

Yes. Any client that can make HTTPS requests can use the API. Browser execution, cookies, and JavaScript are not required for API uploads. See the AI instructions and OpenAPI contract.

Can I edit or delete a published page?

Upload a new page to make changes. Anonymous uploaders cannot edit or delete published projects. Only the administrator can remove a project. Keep your original HTML file; continued availability is not guaranteed.

Can I upload multiple files or run a backend?

cordium hosts one HTML file per project. Inline your CSS and JavaScript or link to HTTPS assets. ZIP archives, separate project directories, server-side code, and custom project slugs are not supported.

Are projects private?

No. Anyone with a link can open and share the page, and it may be discovered externally. Never publish secrets or private data. Pages are sandboxed without same-origin privileges, so browser storage and some third-party integrations may not work.