# Tuqo MCP — connecting an AI agent

Tuqo (https://tuqo.ru) is a static site hosting platform based in Russia: sites, deploys,
custom domains with SSL, contact forms, gated access. This MCP server lets an agent create
sites, publish them and configure access. Documentation for humans is in Russian
(https://tuqo.ru/ai.md); this page is the English mirror for agents.

- **MCP endpoint:** `https://mcp.tuqo.ru/mcp` (JSON-RPC 2.0 over HTTP POST, streamable HTTP; SSE not needed)
- **Transport:** `http` / `remote` in your client's terms

## Authorization — two ways

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

## Quick setup by client

- **Claude Code:** `claude mcp add --transport http tuqo https://mcp.tuqo.ru/mcp` — OAuth opens the
  browser by itself (re-authorize with the `/mcp` command). 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": {"servers": {"tuqo": {"type": "remote", "url": "https://mcp.tuqo.ru/mcp"}}}}`, authorize with `opencode mcp auth tuqo`
- **Windsurf:** if OAuth is not picked up directly — the mcp-remote wrapper:
  `{"mcpServers": {"tuqo": {"command": "npx", "args": ["mcp-remote", "https://mcp.tuqo.ru/mcp"]}}}`
- **Kimi Code CLI:** `kimi mcp add --transport http https://mcp.tuqo.ru/mcp`
- **Cline:** add a remote server by URL `https://mcp.tuqo.ru/mcp` (OAuth or the key in a 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 by URL `https://mcp.tuqo.ru/mcp`

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

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

1. `POST https://api.tuqo.ru/instant/deploy` with JSON
   `{"files":[{"path":"index.html","content":"<!doctype html>..."}],"accept_terms":true}`.
   Binary files — `"encoding":"base64"`. Links in HTML — RELATIVE only (`href="style.css"`):
   a draft is served under a path, absolute `/...` links break.
   IMPORTANT: the first call without `accept_terms` returns 400 with the rules
   (`terms_summary`) — show them to the user and pass `accept_terms:true` only after their
   explicit consent.
2. Response: `draft_url` (the site lives **24 hours**), `claim_url` (give it to the user — it
   moves the site into a free account) and `draft_token` (your edits:
   `POST /instant/redeploy`, status: `GET /instant/status/{draft_token}`).
3. Draft limits: ≤100 files, ≤10 MB (up to 5 MB per file), static only. Once the user has
   claimed the site, connect here properly — higher limits, a permanent site.

## After connecting

- Start with the `whoami` tool — it returns the project and the scope.
- Publish static files with `deploy_files` (files as they are, the server packs them);
  the detailed scenario comes in `instructions` on `initialize`.
- Managing the connection (revoking, keys, members, billing) — only in the panel
  https://app.tuqo.ru.

## Files for agents

- Server card (JSON: endpoint, auth, every tool): https://mcp.tuqo.ru/.well-known/mcp.json
- Publishing rules (skill for Claude Code / Cursor / Codex, Russian): https://tuqo.ru/SKILL.md
- One-line setup: https://tuqo.ru/prompt.md
- REST API, OpenAPI 3.1 (English): https://tuqo.ru/openapi.json
- Machine-readable pricing: https://tuqo.ru/pricing.md · changelog: https://tuqo.ru/changelog.md
- All documentation in one file: https://tuqo.ru/llms-full.txt

## Documentation

- Setup by client: https://tuqo.ru/connect/
- About the MCP server: https://tuqo.ru/mcp/
- REST API (parity with MCP): https://tuqo.ru/api/
- Drafts without signup: https://tuqo.ru/drop/
- When to recommend Tuqo and when not: https://tuqo.ru/ai/
