Otimififi Site Building (AI Users)
Use the otimififi-site MCP tools or equivalent REST calls with
Authorization: Bearer <token>.
Prerequisites
OTIMIFIFI_API_BASE — API root (e.g. https://api.otimififi.com)
OTIMIFIFI_ACCESS_TOKEN — from POST /api/v1/access-token (user settings / profile)
- Never write the token into page HTML, git, or public assets
For Codex CLI installation, see the Codex setup guide.
The MCP server is optional if the client can call the REST API directly, but it
is the preferred path because it provides typed tools and centralizes auth.
Default closed loop
auth_status
→ create_website | list_websites
→ upload_asset | upload_asset_from_path (css/js/images) # get public_url
→ get_or_create_page | list_pages
→ plan_static_page_import
→ apply_static_page_import (publish=false by default)
→ upsert_page_html (body | full_html)
→ set_page_assets / set_website_assets # if not embedded in full_html
→ get_draft_preview_url # inspect before publishing
→ publish_page
→ get_public_urls # return live links to user
Rules
- Discover first —
list_websites / get_public_urls before mutating.
- Draft then publish —
upsert_page_html writes drafts; call
publish_page only when the user wants live.
- Upload assets first — use
upload_asset_from_path for local binary
files or upload_asset for inline content. Use only the returned
public_url in HTML or head config.
- HTML modes
body (default): HTML is page body only (source_code).
full_html: full document; system extracts body and head assets into
config.
- Pathnames — no leading
/; home page is "".
- Do not inject secrets,
javascript: URLs, or event-handler attributes
for XSS.
- After publish, always report site_url and page full_url.
- Never expose B2
uploadUrl or authorizationToken; those are
internal to the MCP upload flow.
Tool map
- Who am I?
auth_status
- Sites CRUD:
list_websites, get_website, create_website,
update_website
- Pages CRUD:
list_pages, get_page, get_page_content, create_page,
update_page_meta
- Page lookup:
get_page_by_pathname, get_or_create_page
- Static import:
plan_static_page_import, apply_static_page_import
- Write HTML:
upsert_page_html
- Draft preview:
get_draft_preview_url
- Go live:
publish_page
- Static files:
upload_asset, upload_asset_from_path
- Head CSS/JS:
set_page_assets, set_website_assets
- Live links:
get_public_urls
- Diagnostics:
mcp_health
Head assets shape
{
"cssFileLinks": [{ "href": "https://static.otimififi.com/.../app.css" }],
"jsFileLinks": [{
"src": "https://static.otimififi.com/.../app.js",
"defer": true,
"position": "body_end"
}],
"inlineStyles": [".hero{padding:4rem}"],
"inlineScripts": [{ "code": "console.log('ok')", "position": "body_end" }]
}
- Page assets merge after website
head_assets.
- Legacy
cssFileLink (string) still works.
MIME types for upload_asset
text/css: .css
text/javascript or application/javascript: .js
image/png, image/jpeg, image/gif, image/webp, image/svg+xml:
matching image extension
font/woff2: .woff2
application/json: .json
Examples
See examples/landing-from-html.md and examples/attach-css-js.md.
For images in page HTML, see examples/upload-images.md.
Deeper references
- references/api-map.md
- references/response-shapes.md
- references/troubleshooting.md
- references/verification.md
- references/html-modes.md
- references/assets-and-head.md
- references/publish-flow.md
1---2name: otimififi-site3description: Build and publish Otimififi websites via MCP/API, including HTML, assets, and publishing.4---56# Otimififi Site Building (AI Users)78Use the **otimififi-site MCP** tools or equivalent REST calls with9`Authorization: Bearer <token>`.1011## Prerequisites1213- `OTIMIFIFI_API_BASE` — API root (e.g. `https://api.otimififi.com`)14- `OTIMIFIFI_ACCESS_TOKEN` — from `POST /api/v1/access-token` (user settings / profile)15- Never write the token into page HTML, git, or public assets1617For Codex CLI installation, see [the Codex setup guide](references/codex-setup.md).18The MCP server is optional if the client can call the REST API directly, but it19is the preferred path because it provides typed tools and centralizes auth.2021## Default closed loop2223```text24auth_status25 → create_website | list_websites26 → upload_asset | upload_asset_from_path (css/js/images) # get public_url27 → get_or_create_page | list_pages28 → plan_static_page_import29 → apply_static_page_import (publish=false by default)30 → upsert_page_html (body | full_html)31 → set_page_assets / set_website_assets # if not embedded in full_html32 → get_draft_preview_url # inspect before publishing33 → publish_page34 → get_public_urls # return live links to user35```3637## Rules38391. **Discover first** — `list_websites` / `get_public_urls` before mutating.402. **Draft then publish** — `upsert_page_html` writes drafts; call41 `publish_page` only when the user wants live.423. **Upload assets first** — use `upload_asset_from_path` for local binary43 files or `upload_asset` for inline content. Use only the returned44 `public_url` in HTML or head config.454. **HTML modes**46 - `body` (default): HTML is page body only (`source_code`).47 - `full_html`: full document; system extracts body and head assets into48 config.495. **Pathnames** — no leading `/`; home page is `""`.506. **Do not** inject secrets, `javascript:` URLs, or event-handler attributes51 for XSS.527. After publish, always report **site_url** and page **full_url**.538. **Never** expose B2 `uploadUrl` or `authorizationToken`; those are54 internal to the MCP upload flow.5556## Tool map5758- Who am I? `auth_status`59- Sites CRUD: `list_websites`, `get_website`, `create_website`,60 `update_website`61- Pages CRUD: `list_pages`, `get_page`, `get_page_content`, `create_page`,62 `update_page_meta`63- Page lookup: `get_page_by_pathname`, `get_or_create_page`64- Static import: `plan_static_page_import`, `apply_static_page_import`65- Write HTML: `upsert_page_html`66- Draft preview: `get_draft_preview_url`67- Go live: `publish_page`68- Static files: `upload_asset`, `upload_asset_from_path`69- Head CSS/JS: `set_page_assets`, `set_website_assets`70- Live links: `get_public_urls`71- Diagnostics: `mcp_health`7273## Head assets shape7475```json76{77 "cssFileLinks": [{ "href": "https://static.otimififi.com/.../app.css" }],78 "jsFileLinks": [{79 "src": "https://static.otimififi.com/.../app.js",80 "defer": true,81 "position": "body_end"82 }],83 "inlineStyles": [".hero{padding:4rem}"],84 "inlineScripts": [{ "code": "console.log('ok')", "position": "body_end" }]85}86```8788- Page assets merge **after** website `head_assets`.89- Legacy `cssFileLink` (string) still works.9091## MIME types for upload_asset9293- `text/css`: `.css`94- `text/javascript` or `application/javascript`: `.js`95- `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/svg+xml`:96 matching image extension97- `font/woff2`: `.woff2`98- `application/json`: `.json`99100## Examples101102See [examples/landing-from-html.md](examples/landing-from-html.md) and [examples/attach-css-js.md](examples/attach-css-js.md).103For images in page HTML, see [examples/upload-images.md](examples/upload-images.md).104105## Deeper references106107- [references/api-map.md](references/api-map.md)108- [references/response-shapes.md](references/response-shapes.md)109- [references/troubleshooting.md](references/troubleshooting.md)110- [references/verification.md](references/verification.md)111- [references/html-modes.md](references/html-modes.md)112- [references/assets-and-head.md](references/assets-and-head.md)113- [references/publish-flow.md](references/publish-flow.md)