Kleap

io.github.kleaphq由 GitHub 帳號 kleaphq 發布v1.1.0更新於 Nov 9, 2026

Build, edit, publish, and manage websites and web apps with Kleap hosting, domains, and analytics.

已驗證Streamable HTTP可網頁執行資料庫雲端與基礎設施開發者工具

概覽

AI 產生的概覽

Kleap 讓助理建立、編輯、發布並管理代管的網站與網頁應用,涵蓋檔案、網域、分析與 Postgres 資料庫。

可以做什麼
  • 用提示詞建立與修改網站,查看或重試建置任務,列出應用並依位址解析站點
  • 列出、讀取、寫入、編輯與刪除站點原始檔案,並為站點生成圖片
  • 發布並做上線驗證,讀取發布報告,重新命名應用,截圖,喚醒休眠的預覽
  • 搜尋、購買與連接網域,檢查 DNS 狀態
  • 讀取表單提交、流量分析與 Google Search Console 資料
  • 檢視應用的 Postgres 結構,讀取、插入、更新、刪除資料列並執行 SQL
適用情境
適合讓助理端到端產出真正上線的網站:生成或手寫程式碼、部署、綁定網域,再回報流量、名單與搜尋表現。也適合依位址修改既有的 Kleap 站點,而不必整份重寫檔案。
執行需求
遠端端點位於 kleap.co,透過 OAuth 登入連接,無需金鑰。本機 CLI 方式需要 Node 18 或以上版本,以及瀏覽器登入或 KLEAP_API_KEY 值。需要 Kleap 帳號;資料庫與結帳工具需要 database 與 domains:checkout 權限範圍。
安裝前請注意
建置與修改會消耗 Kleap 點數,付費方案、網域購買與升級都透過需使用者自行開啟並付款的結帳連結完成。檔案編輯、發布、網域連接與資料庫寫入會改動線上站點,刪除資料列是永久性的。金鑰有權限範圍,僅供檢視的助理宜使用唯讀金鑰。表單提交與分析屬於使用者自己的站點資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Kleap,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.kleaphq%2Fkleap/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "kleap": {
      "type": "http",
      "url": "https://kleap.co/api/mcp"
    }
  }
}

README

Kleap — website infrastructure for AI agents

[CI] [CLI] [MCP] [33 tools] [license]

Your agent builds. Kleap ships it live. Let any AI agent — Claude, ChatGPT, Cursor, or a bash-tool agent like Claude Code — build, edit and publish real, live websites for you. Hosting, database, auth and domains included.

An alternative to Lovable / v0 / Bolt — except it's driven by your agent, and every publish comes with the verified-live guarantee: a site is only ever reported online once it is provably serving — never a hallucinated dead link.

This package is both a CLI (kleap create "…", kleap publish 42, …) and an MCP server (kleap mcp / no args) — same account, same ~/.kleap/config.json auth, same underlying /api/v1 REST API. Pick whichever fits your agent: a shell/bash-tool agent (Claude Code, a cron script, CI) wants the CLI — one compact line per call, no JSON-RPC framing. An MCP-native client (Claude Desktop, Cursor, ChatGPT connectors) wants the MCP server, which this package also is, unchanged.

[A real, unedited run: an agent writes a page with write_files, publishes, and it is live and serving in seconds.]

Above: a real run — your agent writes the code with write_files, publish_app builds & deploys it, and the page is live in seconds. Or just ask Kleap's AI in plain English.

No secrets live in this package — it reads your own KLEAP_API_KEY (or the token saved by kleap auth login) and talks only to kleap.co.


CLI (for agent shells — Claude Code, Codex, scripts)

If your agent drives a bash tool rather than MCP, use the CLI directly. Output is 1-3 lines by default (token-efficient — built for an agent reading its own tool output, not a human terminal), clean exit codes (0/1), and a --json flag whenever you want the full structured response.

bash
npx -y kleap-cli auth login              # opens your browser once, no key to paste# — or, for CI / non-interactive: npx -y kleap-cli auth key kleap_live_sk_...
npx -y kleap-cli create "a one-page site for my bakery, warm palette"# ✓ created app 4821 — https://warm-bakery-fold.kleap.io
npx -y kleap-cli edit 4821 "change the headline to 'Roasted slow'"# ✓ edited app 4821 — https://warm-bakery-fold.kleap.io
npx -y kleap-cli publish 4821# ✓ published https://warm-bakery-fold.kleap.io
npx -y kleap-cli status warm-bakery-fold.kleap.io   # by id, slug, kleap.io URL, or connected custom domain# ✓ Bakery (4821) — live: https://warm-bakery-fold.kleap.io

Commands

CommandWhat it does
kleap auth loginSign in via browser (OAuth, PKCE loopback) — no key to copy
kleap auth key <KEY>Store a kleap_live_sk_... key instead (CI / non-interactive)
kleap auth logout / kleap auth statusClear / show current auth
kleap create "<prompt>" [--visibility public|personal] [--webhook <url>] [--no-wait] [--json]Create a site, wait for the build (~5-15 min), print the live URL
kleap edit <app> "<prompt>" [--webhook <url>] [--no-wait] [--json]Ask Kleap's AI to change a site, wait for it to redeploy
kleap publish <app> [--no-wait] [--json]Publish/redeploy with the verified-live guarantee
kleap status <app> [--json]One-line status: name, id, live URL or "not published"
kleap list [--limit N] [--q text] [--json]Your apps, one tab-separated row each: id name url
kleap domains search <query> [--tlds .com,.io] [--json]Available domains, one per line
kleap domains connect <domain> <app> [--json]Connect a domain you own; prints the A record to set
kleap screenshot <app>Capture a preview screenshot, print its URL
kleap task <task_id> [--wait] / kleap task retry <task_id> [--wait]A create/edit task's status (long-poll with --wait) / resume a failed one
kleap rename <app> <name> · kleap wake <app> · kleap messages <app> · kleap creditsRename (URL unchanged) · wake a preview sandbox · chat history · credit balance + plan
kleap files ls <app> · files cat <app> <path...>List source paths · print file contents
kleap files write <app> <path> --file <local> | --stdin | --content "<text>"Write a file (binary extensions go base64 automatically, 512 KB max) → then publish
kleap files edit <app> <path> --find "<old>" --replace "<new>" [--all]Replace text inside a file
kleap files rm <app> <path...>Delete pages/assets (live until the next publish)
kleap image <app> <public/name.webp> "<prompt>" [--hd]Generate an image into the site → then publish
kleap forms <app> [--since ISO] [--limit N]Form submissions (leads), newest first; --json is flattened
kleap analytics <app> [--period 7d|30d|90d]Visitors, pageviews, top pages
kleap search-console <app> · search-console connect <app>Google Search numbers · the consent link the user opens
kleap db schema <app>Tables, row counts, columns of the app's Postgres
kleap db rows <app> <table> [--where json] [--limit] [--offset] [--order-by col --order asc|desc]Read rows (one JSON object per line)
kleap db insert <app> <table> '<json>'|--file rows.jsonInsert one object or an array (chunked at 500)
kleap db update <app> <table> --where json --set json · db delete <app> <table> --where json--where is mandatory and non-empty
kleap db sql <app> "<sql>" [--params json]One SQL statement with $1..$n params (owner-level: needs database:write even for SELECT; 500 rows / 5 MB cap)
kleap domains buy <domain> [--years N] [--app <app>]Creates a Stripe checkout link the user pays — never bought until they do
kleap domains check <domain>DNS / connection status (also: did the paid domain get registered?)
kleap mcpRun the MCP stdio server explicitly (same as no args)

<app> accepts a numeric app id, a slug.kleap.io URL, a bare slug, or a connected custom domain — resolved server-side in one call (GET /apps/resolve), same as the MCP find_app tool.

Example: a Claude Code / bash-tool agent

bash
# One-shot: build it, publish it, hand back a URL a human can click.url=$(npx -y kleap-cli create "a landing page for my podcast" --json | node -e \  'let d="";process.stdin.on("data",c=>d+=c).on("end",()=>console.log(JSON.parse(d).url))')echo "Live: $url"
# Non-blocking flow (agent does other work while it builds):npx -y kleap-cli create "a landing page for my podcast" --no-wait --json   # → { task_id, app_id, ... }# ... later ...npx -y kleap-cli status 4821

Exit codes are always clean: 0 on success, 1 on any failure, with a single ✗ <reason> line on stderr (or {"error":{"message":...}} with --json) — safe to check with $? / try/except subprocess.run(..., check=True) without scraping prose.

Install once (optional — npx -y above needs no install)

bash
npm i -g kleap-clikleap auth loginkleap create "a one-page site for my bakery"

MCP server (for MCP-native clients — Claude Desktop, Cursor, ChatGPT)

Same package, same account, same ~/.kleap/config.json auth — just a different transport for clients that speak MCP instead of a bash tool.

Easiest — connect with OAuth, no key

Add the hosted connector and sign in. Nothing to generate, nothing to paste — you authorize Kleap in your browser like any other app. Works in Claude Desktop, ChatGPT and Cursor.

https://kleap.co/api/mcp
  • Claude Desktop — Settings → Connectors → Add custom connector → paste the URL → Connect → sign in to Kleap.
  • ChatGPT — Settings → Connectors → add the URL → authorize with OAuth.
  • Cursor — Settings → MCP → Add server → paste the URL → authorize.

That's it — all 34 hosted tools (the 33 listed below plus upgrade_plan) are available after OAuth sign-in. Skip straight to step 3.


Or — local CLI, sign in with your browser (no key)

Prefer a local stdio process? Sign in once — no key to generate or paste:

npx kleap-cli auth login

This opens your browser, you authorize Kleap, and the token is saved to ~/.kleap/config.json. After that, npx -y kleap-cli just works. (kleap auth logout / kleap auth status are there too.) Then add a keyless stdio entry to your client, e.g. Claude Desktop claude_desktop_config.json:

json
{ "mcpServers": { "kleap": { "command": "npx", "args": ["-y", "kleap"] } } }

Or — local CLI with an API key

Prefer a key (e.g. for CI or scripting the REST API directly)?

1. Get an API key — open kleap.co/settings/api-key and click Create my API key (kleap_live_sk_...).

2. Add Kleap to your AI client:

Claude Desktop — claude_desktop_config.json
json
{  "mcpServers": {    "kleap": {      "command": "npx",      "args": ["-y", "kleap"],      "env": { "KLEAP_API_KEY": "kleap_live_sk_..." }    }  }}
Cursor — .cursor/mcp.json
json
{  "mcpServers": {    "kleap": {      "command": "npx",      "args": ["-y", "kleap"],      "env": { "KLEAP_API_KEY": "kleap_live_sk_..." }    }  }}
Claude Code — one command
bash
claude mcp add kleap -e KLEAP_API_KEY=kleap_live_sk_... -- npx -y kleap-cli
Cline / Roo (VS Code) — cline_mcp_settings.json
json
{  "mcpServers": {    "kleap": {      "command": "npx",      "args": ["-y", "kleap"],      "env": { "KLEAP_API_KEY": "kleap_live_sk_..." }    }  }}
Windsurf — ~/.codeium/windsurf/mcp_config.json
json
{  "mcpServers": {    "kleap": {      "command": "npx",      "args": ["-y", "kleap"],      "env": { "KLEAP_API_KEY": "kleap_live_sk_..." }    }  }}
ChatGPT & hosted agents — no local process

Add the hosted connector at https://kleap.co/api/mcp and authorize with OAuth (or paste your kleap_live_sk_ key). Same tools, no install.

Every stdio config is identical — npx -y kleap-cli + a KLEAP_API_KEY env var — so any MCP client works.

Least-privilege keys: when you generate a key, pick a scope — Read-only (inspect sites, no changes), Build, or Full. Buying domains is never included by default. Give a read-only agent a read-only key.

3. Restart the client and just ask:

"Build me a one-page site for my bakery, publish it, and give me the live URL." "Add a contact form to my site and redeploy." "Change the headline to 'Roasted slow' and publish."

Works with any MCP-compatible agent: Claude · ChatGPT · Cursor · Claude Code · Codex.


Tools

Find & build — find_app · create_app · modify_app · check_task · retry_task · rename_app · get_screenshot · wake_app Files — list_app_files · read_files · write_files · edit_files · delete_files · generate_image Publish & domains — publish_app · get_publish_status · search_domains · buy_domain · check_domain · connect_domain Leads, traffic, SEO — get_form_submissions · get_analytics · get_search_console · connect_search_console Database — get_database_schema · query_database_rows · insert_database_rows · update_database_rows · delete_database_rows · run_database_sql Account — list_apps · get_app · get_credits

ToolWhat it does
find_appResolve a domain / URL / slug → app_id in one call
create_app / modify_appBuild a site from a prompt / ask its AI for a change → returns a task (auto-deploys live)
check_task / retry_taskLong-poll a task (wait up to 50s) / resume a failed one (new task_id)
read_files → edit_files / write_files / delete_filesRead current contents, then change exactly what must change (base64 for binaries) → publish_app
generate_imageGenerate a real image into public/ without sending bytes
publish_app / get_publish_statusPublish with verified-live; confirm it + read the post-deploy report
search_domains / buy_domainFind domains / create a checkout link the user pays (nothing is bought by the agent)
connect_domain / check_domainConnect a domain the user owns / its DNS status
get_form_submissionsThe site's leads, newest first (since for only new ones)
get_analytics / get_search_console / connect_search_consoleTraffic / Google Search numbers / consent link for Search Console
get_database_schema … run_database_sqlThe app's Postgres: schema, row CRUD (where required for update/delete), SQL
rename_app / get_screenshot / wake_appRename (URL unchanged) / screenshot URL / wake a preview sandbox
list_apps / get_app / get_creditsYour apps, one app's details, credit balance + plan

Database and checkout tools need the database:* / domains:checkout scopes: a key created before they existed gets 403 INSUFFICIENT_SCOPE — create a new key with the Full preset.

App arguments are snake_case: app_id, task_id, prompt, message, visibility.

Recipes

Two ways to put code on a site — pick per task:

  • write_files (deterministic): your model writes the exact file contents; you push them and Kleap builds + deploys as-is. No Kleap-AI step → no Kleap credits, never stalls. Then publish_app. Unlike Lovable/v0/Bolt, your agent can write the code itself.
  • modify_app (Kleap's AI): describe the outcome in plain English and Kleap's AI writes it. Like Lovable's message-passing — kept for when you'd rather it figure out the change.

Either way Kleap hosts it (build, deploy, SSL, DB, auth, domains, verified-live).

  • Edit existing files SAFELY (don't rewrite blind) — list_app_files(app_id) → read_files(app_id, ["src/components/Header.astro"]) → edit only what must change with your own model → write_files(app_id, [{ path, content }]) → publish_app(app_id). This read→edit→write loop is the reliable way to fix headers/footers, wrong phone numbers, broken links or dead forms without breaking the rest of the site.
  • Edit a site named by its address — find_app("mysite.ch") → read_files(...) → write_files(...) → publish_app(...), or modify_app(app_id, "…") → check_task(task_id, wait=45).
  • Many pages (programmatic SEO) — BEST: generate a dynamic route + a data file with your own model and push them in one write_files, then publish_app:

    write_files(app_id, [{ path: "src/pages/[service]/[city].astro", content: … }, { path: "src/data/locations.json", content: … }]) → publish_app(app_id) Deterministic, scales to thousands, no stall, no credits. (Or ask Kleap's AI to do the same in one modify_app — never loop one call per page.)

  • Don't babysit a 5-15 min build — check_task long-polls (default wait=45), or pass a webhook_url to create_app / modify_app for a fully hands-off flow.
  • A build failed — TASK_TIMEOUT/STALE_TASK = transient, call retry_task; it returns a new task_id — poll that one. TASK_FAILED = read the message, retry once.

The verified-live guarantee

Most tools tell the agent "it's online" the moment a deploy is requested. Kleap reports a site as published only once the new version is provably serving at its live URL — otherwise it rolls back and reports "not confirmed live." Your agent can never hand a user a dead link.

If check_task reports failed (a transient generation stall), call retry_task with that task_id to resume from where it stopped — it returns a new task_id to poll, and partial work is kept. Or skip the AI entirely and write_files the exact code yourself, then publish_app.

FAQ

Do I need an API key? No. The easiest path is the OAuth connector (https://kleap.co/api/mcp) — you sign in with your browser and never copy a key. An API key is only needed for the local CLI / direct REST use.

Is it safe? Yes. Whether you connect with OAuth or an API key, an agent can only ever touch your own Kleap apps. OAuth tokens and kleap_live_sk_ keys are scoped, sent only over HTTPS, and revocable anytime in https://kleap.co/settings/api-key. Credentials from kleap auth login / kleap auth key are stored in ~/.kleap/config.json (permissions 0600); kleap auth logout deletes that file. A stored OAuth login is bound to the origin that issued it — if KLEAP_API_URL points anywhere else, the CLI refuses to send the token (CREDENTIAL_ORIGIN_MISMATCH) so a malicious/typo'd endpoint can't capture it. For custom endpoints (e.g. staging), use KLEAP_API_KEY or kleap auth key — an explicit secret you provide is sent where you point it. Details in SECURITY.md.

How much does it cost? Connecting is free. Builds and edits use Kleap credits (get_credits reports your balance) — see pricing.

Which agents work? Any MCP client: Claude Desktop, Claude Code, Cursor, ChatGPT (hosted connector), and others.

Requirements & run

Node ≥ 18. Run it directly:

bash
KLEAP_API_KEY=kleap_live_sk_... npx -y kleap-cli# → [kleap-mcp] ready (stdio) → https://kleap.co. Tools: list_apps, ...

Override the API base with KLEAP_API_URL (default https://kleap.co). Missing key → the server exits with a clear message. Note: a stored OAuth login only works against the origin it was issued by — with a custom KLEAP_API_URL, authenticate via KLEAP_API_KEY or kleap auth key instead (see SECURITY.md).

Links

Maintained by the Kleap team. MIT © Kleap.

來源:README.md,提交 a0c55eb

工具

35

create_app

Create Website

Use this when the user wants a complete, hosted website or web app built from a text description (e.g. 'build me a website for X'). Kleap's AI builds AND auto-deploys the whole site; this takes a few minutes (typically 5 to 15 min). Returns a build_url instantly so the user can watch it build live. In a widget client (ChatGPT Apps) the preview above shows real-time progress and reveals the final live URL by itself, so you do NOT need to block or keep polling check_task. With NO widget (CLI, script, scheduled or one-shot run) nobody sees that preview and the site does not exist yet: call check_task with the returned task_id about every 30 seconds and stop only on completed (deployment_status deployed) or failed, then get_app for the live URL. Prefer this over write_files for full-site creation.

輸入參數prompt必填context必填visibility

modify_app

Modify Website

Use this when the user wants to change or update an existing website. The AI can overwrite or remove existing content and automatically publishes the result to the live site. This uses Kleap usage. Needs the app_id — if the user named the site by its address (e.g. 'mysite.ch'), call find_app first to get the app_id.

輸入參數app_id必填context必填message必填

write_files

Write Files Directly

Write WHOLE files DIRECTLY — YOUR model generates the code, Kleap stores, builds and deploys it as-is. To change something in a file that ALREADY EXISTS, use edit_files instead (read_files → edit_files): it replaces just the lines you name, while write_files makes you retype the entire file and silently drops whatever you leave out — on a 30KB shared layout that is how headers and footers get wiped. No Kleap-AI step, so what ships is byte-for-byte what you wrote — the right choice when a phrase, a URL or a schema must be exact. Publishing still audits the result (see publish_app). Best for scaffolding exact pages/components — e.g. programmatic-SEO routes. Astro paths (src/pages/*.astro, src/data/*.json, src/components/*.astro, public/*). Overwrites by path. NPM PACKAGES: do not write package.json (the build replaces it) — the build installs whatever your code IMPORTS, so `import { jsPDF } from "jspdf";` is all it takes. Supported on import: @tiptap/*, jspdf, pdf-lib, html2canvas, papaparse, file-saver, jszip, @ffmpeg/*, howler, wavesurfer.js, browser-image-compression, react-dropzone, recharts, chart.js, d3, @tanstack/*, react-hook-form, three, @react-three/*, leaflet, maplibre-gl, gsap, framer-motion, zustand, date-fns, react-markdown, axios, socket.io-client, radix-ui/*, next-themes, lucide-react, @tabler/*, openai, @ai-sdk/*; anything else is refused at build with a message naming it. A client-side router is never the answer — a route is a FILE (src/pages/about.astro → /about). IMAGES AND BINARIES: set encoding:"base64" on the file and send the bytes — that is how you put a logo, a photo, an OG image, a favicon or a font on the site (png/jpg/webp/svg/ico/mp4/woff2/pdf, 512KB max each decoded). Without it you can only write text, and a site with no images looks unfinished. To ADD an image from a text prompt WITHOUT sending any bytes (a real photo's base64 is too big to emit reliably), use generate_image — Kleap generates it and stores it for you. To REMOVE a page

輸入參數files必填app_id必填context必填

edit_files

Edit Files In Place

Change PART of a file without resending it — the counterpart to write_files. Give `old_string` (exact text as in the file today) and `new_string`; Kleap reads, replaces, stores. Nothing else moves. Use it whenever the file exists and only a line, block or URL changes: resending a 30KB layout to fix one line wastes tokens and risks corrupting the rest. read_files first, copy the text EXACTLY. `old_string` must appear once — otherwise the error names the count; add context or pass replace_all:true. Edits are validated together: if any is invalid, nothing is written. Across files the writes are sequential — a late failure names what was already applied. new_string "" deletes the match. Not for new files or binaries. Then publish_app.

輸入參數edits必填app_id必填context必填

generate_image

Generate Image

Put a REAL photo or illustration on the site by describing it — no image bytes to send. Give a vivid `prompt` and a `public/` `path` (e.g. public/hero.jpg); Kleap generates it with Cloudflare FLUX.2 and stores it as a proper binary asset, exactly like write_files with encoding:"base64" but with NO base64 to transmit (a real image's base64 is too big for a model to emit reliably — this is the ONLY dependable way to add a generated picture). Use it for hero photos, section illustrations, onboarding images, OG images, or to replace a broken/ugly image. Square 768×768 by default; pass width/height (256–1440) for other ratios; hd:true uses the premium model (sharper, slower). ⚠️ To REPLACE an existing image, generate to a NEW filename (e.g. hero-2.jpg) and point the markup at it — overwriting the same path can be served stale from CDN/R2 cache. After it returns, call publish_app to deploy it live.

輸入參數hdpath必填widthapp_id必填heightprompt必填context必填

delete_files

Delete Files

Remove pages, components or assets from a site — the counterpart to write_files. Use it when a page should no longer exist: a wrong route, a duplicate, an outdated landing page, an image nobody references. Do NOT overwrite the file with empty content instead: that leaves a URL answering 200 with nothing, which is worse for SEO than a clean 404. Deleting a binary also removes its stored bytes. Paths Kleap owns (astro.config.mjs, package.json, tsconfig.json…) are refused — the build lays its own copy back down, so removing them changes nothing. The homepage (src/pages/index.astro) is refused too: a site with no homepage is broken — write a new one instead, writing replaces it. Returns which paths were actually deleted and which did not exist. The pages STAY LIVE until you call publish_app.

輸入參數paths必填app_id必填context必填

list_app_files

List App Files

List the source file PATHS of an app (names only, no contents). See the project structure, then read_files to get contents before editing. Astro: src/pages/*.astro, src/data/*.json, src/components/*.astro, public/*.

輸入參數app_id必填context必填

read_files

Read File Contents

Read existing file contents so you can edit them SAFELY instead of rewriting blind (which risks breaking shared components/homepages). Loop: list_app_files → read_files → edit_files (change just the lines that must change) → publish_app; use write_files instead only when you are writing a whole new file. Use it to fix headers/footers, wrong phone numbers, broken links, dead forms. Works with a Read-only key. Returns { files: [{ path, content, type, bytes, truncated?, returned_bytes? }], missing }. Text is capped at 256 KiB per file and 1 MiB per call; truncated files are explicitly marked, and files beyond the call budget must be read separately.

輸入參數paths必填app_id必填context必填

list_apps

List My Websites

Use this when the user wants to see all their websites with name, slug, preview URL, and production URL.

輸入參數limitoffsetcontext必填

get_app

Get Website Details

Show a website to the user: its screenshot, name and live address. This is the ONE tool that renders the finished-site card, so call it once after a build or edit has finished and deployed (check_task says deployment_status deployed) — that is what lets the user SEE what was built. Also use it for plain details: name, slug, URLs, creation date, status, published_at (when the live version went up, null = never published) and has_unpublished_changes (true = some file was edited after the last publish, so publish_app would ship it; call this BEFORE publishing work you did not write; a file deleted since the last publish is not detected; null = cannot be told for a legacy Next.js app). ADDRESS TO SHOW: site_url. If custom_domain is set, the owner connected that domain and it IS their site's address — never hand them the {slug}.kleap.io host instead, they did not choose it. Never call this while a build is still running: it would show the previous version as if it were the new one.

輸入參數app_id必填context必填

seo_audit

SEO Audit

Free SEO check of ONE public website URL, on Kleap or not (no app_id, no usage consumed, no AI call). Reads up to 12 pages plus sitemap.xml and robots.txt and checks title, meta description, h1, canonical, viewport, lang, og:image, JSON-LD, image alt, thin content, noindex and dead internal links. Returns score.percent out of 100 (a Kleap checklist, not a Google metric), top3 fixes and every finding with its page, impact (1-10) and fix. For a Kleap site apply fixes with read_files, edit_files, publish_app, then run it again.

輸入參數url必填context必填max_pages

find_app

Find Website by Address

Resolve a website the user refers to by its ADDRESS — a custom domain ('mysite.ch'), a kleap.io URL ('mysite.kleap.io'), or a slug — to its app_id. Use this FIRST whenever the user names a site by its address instead of an app_id (e.g. 'edit mysite.ch'), then pass the returned app_id to get_app / modify_app / publish_app. ADDRESS TO SHOW THE USER: site_url. When the owner has connected a domain, custom_domain is set and site_url is that domain — say THAT, never the {slug}.kleap.io host, which is the internal address they did not choose.

輸入參數query必填context必填

rename_app

Rename Website

Rename an app's display name. Does NOT change the URL — the live address ({slug}.kleap.io) and any links to it stay intact. (There is no tool to delete the entire app; delete_files removes selected source files.)

輸入參數name必填app_id必填context必填

get_screenshot

Screenshot Website

Use this when the user wants to see a visual screenshot of their website. Rate-limited to 1/min per app. The returned image_url is a PNG on the asset host — render it as an image (![preview](image_url)) and nothing else. It is NOT the website's address, so never present it to the user as their site link, and never open, fetch or web-search it: the site's own address is production_url from get_app / find_app.

輸入參數app_id必填context必填

check_task

Check Build Status

Check a create/modify task. Returns quickly with the CURRENT status — report it to the user rather than calling again in the same turn; a build takes 5-15 min, so the answer to 'is it ready?' is usually 'still building, here is the progress'. EXCEPTION: in a headless or one-shot run with nobody to answer (CLI, script, scheduled agent), do not stop at 'still building': call it again about every 30 seconds and stop only on completed (deployment_status deployed) or failed. The optional `wait` can shorten the hold but cannot exceed the server cap (8 seconds by default). status is one of: queued, processing, completed, failed, unknown_task (the id is unknown or aged out — that is an answer, not a failure: check the site itself with get_publish_status). On 'completed' the FILES are written; check deployment_status — 'pending' means the site is going live right now and production_url is still the PREVIOUS version, so say 'built, going live' and check once more in about a minute rather than reporting it stuck. 'deployed' means it is genuinely live. On 'failed': TASK_TIMEOUT/STALE_TASK = transient stall → retry_task (returns a NEW task_id to poll); TASK_FAILED = read error.message, retry once. (Running out of usage is not a task failure — create/modify reject up front with 402 INSUFFICIENT_CREDITS.)

輸入參數waitcontext必填task_id必填

retry_task

Retry Build

Resume a failed or stalled create/modify task from where it stopped — partial files are preserved. Use this when check_task reports 'failed' instead of starting a brand-new create_app. Returns a NEW task_id — poll check_task on that NEW id (not the original). Budget: retry TASK_TIMEOUT/STALE_TASK up to TWICE; retry TASK_FAILED only ONCE; then stop and tell the user. NEVER retry a non-transient error (402 INSUFFICIENT_CREDITS = out of usage, a rejected prompt).

輸入參數context必填task_id必填

get_credits

Check usage

Use this when the user asks how much usage they have left or about their plan status.

輸入參數context必填

upgrade_plan

Upgrade Plan

Use this when the user wants a paid Kleap plan, runs out of usage, or needs a feature that requires one (custom domain, more usage). Returns an upgrade_url the USER must open and pay — nothing is charged before that, so never say they are subscribed. plan: 'monthly' (default) or 'annual'; 'credits' (legacy name) buys extra usage for users who already have a paid plan. Do not quote a price: the page shows it in the user's currency.

輸入參數planapp_idcontext必填

wake_app

Wake Website

Use this when the user's website preview is sleeping (sandboxes auto-stop after 15 min). Takes ~30-60s to restart.

輸入參數app_id必填context必填

publish_app

Publish Website

Use this to take a website LIVE at its public URL. Publishing is VERIFIED-LIVE: the app is only reported published once the new version is provably serving — otherwise it reports 'not confirmed live', never a false 'it is online'. Publishing also AUDITS the built site: every internal link on every page (menu entries to a page never written are the #1 case), pages whose content contradicts the link leading to them, and JSON-LD/sitemap/robots coverage. Most deploys land in under a minute, so this call WAITS a bounded time and returns that `report` here when it does — read it before calling the launch a success, and if it lists findings, FIX THEM (write the missing page, or remove the dead link) before you answer, as you would a build error. On a slower deploy it returns 'publishing' with no report; then do not poll get_publish_status in a loop inside one turn — check once when the user asks again.

輸入參數app_id必填context必填

get_publish_status

Check Publish Status

Use this to check whether a website is actually published and live. Returns the published state, the live production URL, and — once a publish has run — the PUBLISH REPORT of what Kleap checked on the site it just built: broken_links (existing pages that fail), dead_nav_links (menu entries pointing at a page that was never written — 90% of real dead links, /contact most often), incoherent_pages (a page answering 200 with content that contradicts the link leading to it), checks (source findings that did NOT block the publish, each with a category and a plain sentence: forms that submit into the void, islands with no client directive so buttons do nothing, broken images, hand-rolled auth or unguarded database access, dead API routes), design_gate (was the rendered homepage looked at), live_verified (was the NEW version confirmed serving), and SEO coverage (JSON-LD pages, sitemap URL count, robots, llms.txt). report.checked:true means the audit RAN, so empty lists mean nothing was found, not that nothing was looked at. If finding_count is above zero, tell the user what was found — in the report's own words, not the rule slugs — and offer to fix it. Do NOT describe a publish as clean when the report lists findings: a site can be live, pretty and still take no leads. status is one of: published, deploying, not_published, unknown_app. Returns the state at THIS instant — report it and end the turn; publishing takes minutes, so calling it repeatedly in one turn only burns the turn.

輸入參數app_id必填context必填

search_domains

Search Domains

Search for available domains for a site (e.g. 'mybakery'). Returns available names across TLDs. To buy one, call buy_domain — it returns a checkout link the user pays. Use connect_domain for a domain the user already owns.

輸入參數tldsquery必填context必填

check_domain

Check Domain

Check a domain's connection / DNS status for a Kleap app.

輸入參數domain必填context必填

connect_domain

Connect Domain

Connect a domain the user ALREADY OWNS to a live Kleap app (routing + automatic TLS). The app must be live first — a create_app/modify_app with deployment_status deployed already counts as published, so you do NOT need publish_app first. The user points the domain's A record to Kleap. Does not buy anything.

輸入參數app_id必填domain必填context必填

get_form_submissions

Get Form Submissions

Use this when the user asks who filled out their contact form, or wants to see/export leads from their live site. Returns submissions from any <form> built with KleapForm on the app, newest first. Empty list is normal for a brand new site with no visitors yet. Requires the forms:read scope (submissions contain visitor PII) — sessions connected BEFORE this tool shipped don't have it: on a 403 INSUFFICIENT_SCOPE error, tell the user to disconnect and reconnect the Kleap integration (re-authorize) to grant the scope.

輸入參數limitsinceapp_id必填context必填

get_analytics

Get Site Analytics

Use this when the user asks about traffic, visitors, or which pages/referrers are performing on their PUBLISHED site. Backed by the same analytics as the Kleap dashboard's Visitors view. Returns zeroed data with configured:false if the app has never been published (analytics is set up automatically on publish). Requires the analytics:read scope — sessions connected BEFORE this tool shipped don't have it: on a 403 INSUFFICIENT_SCOPE error, tell the user to disconnect and reconnect the Kleap integration (re-authorize) to grant the scope.

輸入參數app_id必填periodcontext必填

get_search_console

Get Google Search Performance

Use this when the user asks how their site is doing IN GOOGLE SEARCH — keywords/queries they rank for, impressions, clicks from search, CTR, or average position. Backed by their own Google Search Console property (connected per site in Kleap's options), so it is the real Google data, not an estimate. Returns totals plus the top queries and top pages that produced them. Search Console lags real traffic by ~2 days — the newest days are always incomplete, say so rather than reporting a drop. If connected is false or site_selected is false, the site simply has no Search Console hooked up: call connect_search_console(app_id) — it returns a consent_url to hand the user, and that is the whole setup. Do NOT send them hunting through Kleap's settings for it. For visitors and pageviews on the site itself (all sources, not just Google), use get_analytics instead. Requires the analytics:read scope — on a 403 INSUFFICIENT_SCOPE error, tell the user to disconnect and reconnect the Kleap integration (re-authorize).

輸入參數app_id必填periodcontext必填

connect_search_console

Connect Google Search Console

Use this when the user wants to connect (or reconnect) Google Search Console for a site — typically right after get_search_console reported connected:false. Returns a consent_url: give it to the user as a link and ask them to open it and approve access with the Google account that owns the domain in Search Console. That one approval MUST happen in a browser — Google does not allow it any other way, so never claim you can do it for them. Nothing else is needed afterwards: the Search Console property is bound to the site's custom domain automatically, and get_search_console starts answering. If requires_custom_domain is true the site has no custom domain yet: connecting Google would grant access to nothing, so connect a domain first (connect_domain) and publish. If it reports the site is already connected, do not send anyone through consent again — just read the numbers.

輸入參數app_id必填context必填

get_database_schema

Get Database Schema

The app's Kleap Database (Postgres): its tables, row counts and columns. Call it before reading or writing rows. provisioned:false means the app has no database yet — create one with modify_app (describe the data to store).

輸入參數app_id必填context必填

query_database_rows

Query Database Rows

Read rows from one table of the app's database. where = exact matches, e.g. {"status":"new"}. Max 500 rows per call; page with offset while has_more is true.

輸入參數limitordertable必填whereapp_id必填offsetcontext必填order_by

insert_database_rows

Insert Database Rows

Insert up to 500 rows into one table of the app's database. Returns the inserted rows (with generated ids/defaults).

輸入參數rows必填table必填app_id必填context必填

update_database_rows

Update Database Rows

Update the rows matching where (required, non-empty, exact matches, e.g. {"id":42}) with the values in set. Returns the updated rows.

輸入參數set必填table必填where必填app_id必填context必填

delete_database_rows

Delete Database Rows

Delete the rows matching where (required, non-empty, exact matches, e.g. {"id":42}). Permanent. Returns how many were deleted.

輸入參數table必填where必填app_id必填context必填

run_database_sql

Run Database SQL

Run SQL on the app's database (owner-level, needs database:write), values as $1, $2 in params. Rows capped at 500 / 5 MB. A table left without row-level security is rolled back (RLS_REQUIRED). To just read rows, prefer query_database_rows.

輸入參數sql必填app_id必填paramscontext必填

buy_domain

Buy Domain

Start buying a domain: returns a Stripe checkout_url (valid 30 min) that the USER must open and pay. Nothing is bought until they complete checkout — give them the link, never say it is purchased. With app_id it is connected to that app after payment.

輸入參數yearsapp_iddomain必填context必填registrant

版本歷史

1
  1. v1.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分