Documentation / Remote and local MCP

AIfra MCP: publish a prebuilt static site for 48 hours

A ready HTML/CSS/JS directory becomes a public HTTPS review link. AIfra is a temporary preview SaaS; it does not build your project or run its backend.

Public uploads are enabled. Client: 0.2.0-beta.2, MIT, Node.js 24.

Connect from a web chat

No AIfra account, existing hosted project or API key is required for a new preview. Add this endpoint in a client that supports custom remote MCP, using Streamable HTTP and no authentication. No npm install is needed.

https://api.aifra.ru/mcp

Six tools should appear. Read get_deploy_instructions, then obtain explicit terms acceptance before preparing files. The user must open approval_url and confirm; the agent polls get_operation_status for the actual URL. See the ChatGPT and Claude walkthrough (Russian). For a local project directory, use the npm instructions below.

1. Install in a trusted project

Prepare your static output locally, with index.html at its root. Open a terminal in the project and install the exact published version. No install scripts are required.

npm install --save-dev --save-exact --ignore-scripts --no-audit --no-fund aifra@0.2.0-beta.2

2. Generate connection settings

node node_modules/aifra/aifra.cjs setup --api-origin https://api.aifra.ru

This writes a new aifra-setup folder with resolved Node.js, package and project paths. It does not edit existing client settings or upload files. Keep this folder outside your published dist. An existing output folder is refused; choose a new --output directory if needed.

Review claude-cursor.json and merge only its aifra entry into project .mcp.json for Claude Code or .cursor/mcp.json for Cursor. For Codex, merge the blocks from codex.toml. Keep existing tools and restart the connection. Five AIfra tools should appear.

Manual JSON alternative: replace both absolute paths
{
  "mcpServers": {
    "aifra": {
      "command": "node",
      "args": [
        "/absolute/path/to/project/node_modules/aifra/aifra.cjs",
        "mcp"
      ],
      "env": {
        "AI_DEPLOY_API_ORIGIN": "https://api.aifra.ru",
        "AIFRA_PROJECT_ROOT": "/absolute/path/to/project"
      }
    }
  }
}
Manual Codex TOML alternative: replace both absolute paths
[mcp_servers.aifra]
command = "node"
args = ["/absolute/path/to/project/node_modules/aifra/aifra.cjs", "mcp"]

[mcp_servers.aifra.env]
AI_DEPLOY_API_ORIGIN = "https://api.aifra.ru"
AIFRA_PROJECT_ROOT = "/absolute/path/to/project"

Official client references: Codex, Claude Code, Cursor.

3. Ask for a preview, then explicitly consent

Ask your agent to check the ready dist, explain the public exposure and terms, and request your approval. Installing or connecting the client does not grant upload permission.

get_deploy_instructions({})
# Only after explicit user acceptance:
create_preview({"directory":"dist","accept_terms":true})
update_preview({"directory":"dist","accept_terms":true})
get_preview_status({"preview_id":"<ID from result>"})
# Only after confirmation to delete this preview:
delete_preview({"confirm_delete":true})

The agent returns the viewer URL and expires_at. Management tokens stay in private local state outside the uploaded directory and are never tool arguments or results. One preview association is kept per project/API pair. CLI state and MCP state are separate.

Limits, privacy and recovery

48-hour server-enforced expiry; updates never extend it. Up to 3 active previews per source IP, 50 MiB uploaded and extracted per preview, 150 MiB active content per IP. No registration or payment in this beta.

Static sites, HTML presentations and static reports are suitable. Backend, SSR, functions, databases, server builds, login forms and permanent hosting are not supported. Noindex does not make a public URL private. Keep confidential and personal data out of previews.

Do not retry an uncertain create automatically. It might have succeeded. Check local state and status first. Respect server rate limits; do not rotate VPN addresses to bypass quotas. An expired preview is not silently recreated. Confirm removing the old association, then separately consent to a new preview.

Can I upload directly from a normal web chat?

This package provides local stdio MCP with access to the configured project. A separate remote Streamable HTTP endpoint is now enabled at https://api.aifra.ru/mcp, without OAuth. Add it only in a client that supports custom remote MCP. Its six tools accept static files (files, up to 1 MiB) or archive_base64 (up to 50 MiB decoded ZIP); provider URL downloads remain disabled. After explicit user acceptance, create/update/delete return an approval_url. The user must open it and confirm in their browser; the agent polls get_operation_status. Pending files expire after 10 minutes, request metadata after 1 hour, with cleanup on the next worker pass. The private management key stays in that browser. Public SDK and desktop/mobile browser checks passed on 18 September 2026; the owner reported successful publication through a ChatGPT connector; Claude consumer UI verification remains open.

Can I convert PowerPoint or publish a live dashboard?

No conversion or live backend runs on the service. Export a browser-only result locally first, or choose another hosting model.

What has actually been checked

On 18 September 2026, a clean npm installation of beta.2 and its generated configuration completed create/update/status/delete against the public API. The original expiry was preserved, HTTPS/noindex and separate viewer/content origins were checked, and the owned fixture was deleted.

Four separate local Codex evaluations covered a static page, HTML slides, an ambiguous request without consent and an unsupported backend request. Claude Code/Cursor application-level tests remain open. This is not an availability guarantee or a claim that agents recommend AIfra automatically.

Try the HTML slides example or static report example. They contain no real user data.