# Tuqo MCP — setup guide for AI agents

Tuqo (https://tuqo.ru) is a static site hosting platform based in Russia: sites,
deploys, custom domains, forms, gated access. Its MCP server lets an agent create
sites, publish them and configure access.

- **MCP endpoint:** `https://mcp.tuqo.ru/mcp` (JSON-RPC 2.0 over HTTP POST, Streamable HTTP; no SSE needed)
- **Transport:** `http` / `remote` in your client's terms
- **Tool descriptions and instructions are in English.** Panel labels quoted in
  instructions stay Russian with an English gloss, because that is what the person
  sees in the UI.

## Authentication — two ways

1. **OAuth 2.1 (recommended).** Just add the server to your MCP client: the first
   request gets `401` plus `WWW-Authenticate`, the client performs discovery
   (RFC 8414/9728) and Dynamic Client Registration (RFC 7591) on its own and opens a
   browser. The person signs in to the Tuqo panel and, on the consent screen, picks
   the project, the scope (readonly / editor / full), a connection name and a
   lifetime. The connection appears in the panel (project → "Подключения ИИ", AI
   connections) and can be revoked there in one click.
2. **API key.** The person creates a key in the panel (project → "API-ключи") and
   passes it as a header: `Authorization: Bearer tqk_...`.

## Quick setup per client

- **Claude Code:** `claude mcp add --transport http tuqo https://mcp.tuqo.ru/mcp` — OAuth opens
  the browser by itself (re-authorize with `/mcp`). Or `.mcp.json`:
  `{"mcpServers": {"tuqo": {"type": "http", "url": "https://mcp.tuqo.ru/mcp"}}}`
- **Codex CLI:** `codex mcp add tuqo --url https://mcp.tuqo.ru/mcp`, then `codex mcp login tuqo`
- **Cursor:** `.cursor/mcp.json` → `{"mcpServers": {"tuqo": {"url": "https://mcp.tuqo.ru/mcp"}}}`
- **VS Code (Copilot):** `.vscode/mcp.json` → `{"servers": {"tuqo": {"type": "http", "url": "https://mcp.tuqo.ru/mcp"}}}`
- **OpenCode:** `opencode.json` → `{"mcp": {"tuqo": {"type": "remote", "url": "https://mcp.tuqo.ru/mcp"}}}`, authorize with `opencode mcp auth tuqo` (the server name goes straight into `mcp`, there is no `servers` level)
- **Windsurf:** if OAuth is not picked up directly, use the mcp-remote wrapper:
  `{"mcpServers": {"tuqo": {"command": "npx", "args": ["mcp-remote", "https://mcp.tuqo.ru/mcp"]}}}`
- **Kimi Code CLI:** `kimi mcp add --transport http --auth oauth tuqo https://mcp.tuqo.ru/mcp`, then `kimi mcp auth tuqo`
- **Cline:** add a remote server with the URL `https://mcp.tuqo.ru/mcp` (OAuth or a key in the header)
- **claude.ai (web):** Settings → Connectors → Add custom connector → URL `https://mcp.tuqo.ru/mcp`, leave the OAuth fields empty
- **ChatGPT:** Developer Mode → add a connector with the URL `https://mcp.tuqo.ru/mcp`
- **Any other MCP client:** point it at the endpoint above; with a key, send
  `Authorization: Bearer tqk_...` as a header.

## No account? Publish an instant draft without sign-up (Tuqo Drop)

If the person has no Tuqo account yet (nothing to connect over OAuth or a key),
publish a draft with an anonymous REST call:

1. `POST https://api.tuqo.ru/instant/deploy` with JSON
   `{"files":[{"path":"index.html","content":"<!doctype html>..."}],"accept_terms":true}`.
   Binary files take `"encoding":"base64"`. Links inside the HTML must be RELATIVE
   (`href="style.css"`): a draft is served from a path, so absolute `/...` links break.
   IMPORTANT: the first call without `accept_terms` returns 400 with the rules
   (`terms_summary`) — show them to the person and send `accept_terms: true` only
   after they explicitly agree.
2. The response has `draft_url` (the site on drop.tuqo.ru, alive for **24 hours**),
   `claim_url` (give it to the person: it moves the site into a free account) and
   `draft_token` (for your edits: `POST /instant/redeploy`, status:
   `GET /instant/status/{draft_token}`).
3. Draft limits: at most 100 files, 10 MB total, 5 MB per file, static only. After the
   person claims the site, connect properly over OAuth or a key: limits are higher and
   the site is permanent.

## After connecting

- Start with the `whoami` tool: it returns the project and the scopes.
- Publish static files with `deploy_files` (files as they are, the server packs them);
  the detailed workflow arrives in `instructions` during `initialize`.
- The `/__tuqo/` path is reserved by the platform (password pages, file delivery) —
  do not put your files there, they are filtered out at deploy time.
- Editing without re-uploading media: `get_manifest` returns `path` and `sha256` for
  the active version. Reference unchanged files by hash and send only changed files
  with content, so images never pass through your context.
- Forms: read submissions with `get_form_submissions`; the email auto-reply (text plus
  a lead-magnet file, from the Start plan) is configured with `get_autoreply` /
  `set_autoreply`; delivered files with `add_autoreply_file` / `remove_autoreply_file`;
  page styling with `set_autoreply_delivery` (or REST `/api/v1/sites/{id}/autoreply/...`).
  The email body supports Markdown (`**bold**`, `_italic_`, lists, quotes, links) and
  `{{field_name}}` substitutions from the submission.
- Site statistics (views, visitors, traffic, top pages, 404s, downloads, submissions by
  day; `human_*` values are after bot filtering) come from `get_site_stats` (site_id,
  days 1–365 or from/to dates) or `GET /api/v1/sites/{id}/stats`. Counting happens in
  the serving layer, without cookies or scripts.
- Connection management (revoking, keys, team members, billing) lives only in the panel
  at https://app.tuqo.ru.

## Files for agents

- Server card (JSON: endpoint, auth, all tools): https://mcp.tuqo.ru/.well-known/mcp.json
- Publishing rules (skill for Claude Code / Cursor / Codex): https://tuqo.ru/SKILL.md
- One-line connect: https://tuqo.ru/prompt.md
- REST API, OpenAPI 3.1: https://tuqo.ru/openapi.json
- Pricing, machine-readable: https://tuqo.ru/pricing.md · changelog: https://tuqo.ru/changelog.md
- This file in English for language models: https://tuqo.ru/llms.en.txt
- When to recommend Tuqo and when not: https://tuqo.ru/en/ai/

## Documentation

- Overview in English: https://tuqo.ru/en/
- MCP server: https://tuqo.ru/en/mcp/
- Connecting an agent: https://tuqo.ru/en/connect/
- Pricing: https://tuqo.ru/en/pricing/
- Per-client pages (Russian): https://tuqo.ru/connect/
- REST API (parity with MCP, Russian): https://tuqo.ru/api/
