Skip to content
Works today

Build a website with Grok

Grok can drive Kleap two ways: interactively from the Grok CLI, or as a bot that calls Kleap's tools through the xAI API. In both cases Kleap hosts and publishes the site, and Grok keeps improving it.

Through the Grok CLI and the xAI API, the two routes xAI documents.

What you can ask Grok to do

Kleap is an AI website builder. Your agent gives the instructions, Kleap builds, hosts and publishes.

  • Build a site from a sentence

    Your agent asks Kleap for a site. Kleap's AI builds it, with hosting, SSL and forms included, and returns a task the agent follows until it is done.

  • Edit what already exists

    Find a site by name, address or domain, read its files, change exactly what must change, and keep the rest untouched. Or describe the outcome and let Kleap's AI write it.

  • Publish with proof it is live

    A publish is reported as done only once the new version is actually serving at its URL. Your agent never hands you a dead link.

  • Improve SEO, once or on a schedule

    Read Google Search Console numbers, find the pages that deserve work, rewrite titles and copy, publish, and report. The same prompt can run every day.

  • Read leads and traffic

    Form submissions, visitors, pageviews and top pages come back as plain data your agent can summarise, answer or act on.

  • Domains, without surprise bills

    The agent can search and connect domains. Buying one always goes through a payment link that you pay yourself, so nothing is bought on its own.

Connect Kleap to Grok

xAI documents MCP for the Grok CLI and for its API. Those are the two routes below. Use the CLI to work with Grok yourself, the API for a bot that runs without you.

  1. Grok CLI: add the server

    Register Kleap as an HTTP MCP server. The same entry can live in ~/.grok/config.toml.

    Terminal
    grok mcp add --transport http kleap https://kleap.co/api/mcp
    ~/.grok/config.toml
    [mcp_servers.kleap]
    url = "https://kleap.co/api/mcp"
  2. Grok CLI: sign in

    xAI handles OAuth for you. The first time Grok calls a Kleap tool, a browser window opens so you can sign in to Kleap. You can also open /mcps in the Grok interface, select kleap and press i to authenticate.

  3. xAI API: create a Kleap key for the bot

    xAI's API tool takes a static credential, so a bot uses a Kleap API key instead of the browser sign-in. Create one at https://kleap.co/settings/api-key. Choose the narrowest preset: Read-only to inspect sites, Build to change and publish them. Keep it in an environment variable, never in a prompt.

  4. xAI API: give Grok the Kleap tools

    Add Kleap as a remote MCP tool in a Responses API request. The model name below is the one in xAI's docs; use any current Grok model that supports tools.

    curl
    curl https://api.x.ai/v1/responses \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer $XAI_API_KEY" \
      -d '{
        "model": "grok-4.7",
        "input": [{
          "role": "user",
          "content": "List my Kleap sites and tell me which one had the most visitors this month."
        }],
        "tools": [{
          "type": "mcp",
          "server_url": "https://kleap.co/api/mcp",
          "server_label": "kleap",
          "headers": { "Authorization": "Bearer '"$KLEAP_API_KEY"'" }
        }]
      }'

Prompts to try in Grok

Copy one, change the details to yours, and send it. Each one names what you want and what done looks like.

Build a landing page

Build a landing page for my podcast with Kleap: an episode list, subscribe buttons and a newsletter form. Publish it and give me the URL.

Read the numbers

Check my Kleap site's analytics for the last 7 days. Which pages get the traffic and where do visitors come from? Give me three concrete changes.

Add a section

Add a pricing section with three tiers to my Kleap site, matching its current style. Publish it and confirm the page is live.

Keep a site fresh

Look at my Kleap site's Google Search data, find one page that ranks between position 5 and 20, improve its title and copy for its main query, publish, and send me what you changed.

SEO on a schedule

A Grok bot that keeps a site improving

The xAI API answers requests; it does not run anything by itself. Put the request from step 4 in cron, a GitHub Actions workflow or any scheduler, with the prompt below as the input. Kleap's founder has a Grok bot that keeps improving his own site.

Scheduled prompt

Every morning, go through my Kleap sites one by one. For each site: 1. Read the last 28 days with get_search_console and get_analytics. 2. Pick the one page with the most impressions that still sits between position 5 and 20, or whose title does not match the query it ranks for. 3. Read that page with read_files and improve its title, meta description, H1, intro, internal links and FAQ so they answer that query better, in the site's own voice. 4. Push the change with write_files, then publish_app and confirm with get_publish_status. 5. Send me a summary: site, page, query, what changed. Never invent statistics or testimonials, never change a site's design, and touch at most two pages per site per run.

Google Search Console must be connected to the site for the search data. If it is not, Kleap hands the agent a consent link for you to open.

Good to know

  • xAI's documentation describes the API tool with a static credential and does not describe OAuth for it, which is why the bot route uses a Kleap API key.
  • We only describe the routes xAI documents. If the Grok app you use offers custom connectors, the same URL applies, but we have not verified that screen.
  • Domain purchases always go through a payment link that you pay yourself.

Official documentation: Remote MCP tools (xAI API docs), MCP servers in the Grok CLI (xAI docs).

Grok and Kleap: questions

Can Grok build a website?

Grok does not host sites. With Kleap's MCP server added, it can ask Kleap to build one, host it and publish it, then keep editing it. Kleap is the AI website builder, Grok is the agent driving it.

Grok CLI or xAI API: which one?

Use the Grok CLI when you work with Grok yourself and can sign in once in the browser. Use the xAI API when a bot has to run unattended, for example on a schedule.

How do I let a Grok bot update my site every day?

Call the xAI Responses API with Kleap as a remote MCP tool and a Kleap API key, from a scheduler such as cron or GitHub Actions, using the SEO prompt on this page. Start with a Read-only key to watch what it proposes, then move to Build.

Is it safe to give a bot an API key?

Create a key with the narrowest preset, keep it in an environment variable, and revoke it at any time from your Kleap settings. Keys can only touch your own Kleap sites, and buying a domain is never included by default.

Does it cost anything to connect Kleap?

Connecting is free. Building and AI edits draw on your Kleap usage, and the free plan includes some. If your agent writes the files itself with write_files, Kleap does not run its own AI for that step. Publishing on a Kleap address is free. See the pricing page for each plan.

Using another agent?

Same Kleap account, same sites. See all the agent guides or the MCP, CLI and skills reference.

Put Grok to work on your website

Connect once, then ask in plain words. Kleap builds, hosts and publishes, and your agent keeps the site improving.

Free to start. See pricing