Skip to main content
Glama

KAI MCP

Your AI writes it. KAI builds it.

Connect Claude, Cursor, ChatGPT, or any MCP-compatible agent to KAI. Your agent chooses a design architecture, writes the content, and calls KAI to produce a real, hosted website — without KAI running another AI model behind the scenes.

What is open source here?

This repository contains the MCP connector, protocol examples, and documentation. It does not contain KAI's website templates, compiler, private blueprint catalog, or application source code.

The connector is a small local bridge for MCP clients that need a stdio server:

Your AI / MCP client
        │ stdio
        ▼
  kai-mcp (this repo)
        │ HTTPS + your KAI bearer token
        ▼
KAI hosted MCP → private build engine → your hosted website

Clients with native Streamable HTTP support can connect directly to KAI and skip the local bridge entirely.

Related MCP server: Grok Bot MCP Bridge

Quick start

1. Create a KAI agent token

Open KAI, go to Connect agent, and create a scoped token. Copy it once and store it like a password.

2A. Connect directly with Streamable HTTP

Use this configuration in clients that support remote MCP servers:

{
  "mcpServers": {
    "kai": {
      "type": "http",
      "url": "https://kai-website-builder.pages.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KAI_AGENT_TOKEN"
      }
    }
  }
}

For Claude Code:

claude mcp add --transport http kai \
  https://kai-website-builder.pages.dev/mcp \
  --header "Authorization: Bearer YOUR_KAI_AGENT_TOKEN"

Do not commit a real token to a shared configuration file.

2B. Or use the local stdio bridge

From this repository:

npm install
export KAI_AGENT_TOKEN="your-token-from-kai"
npm run check

npm run check connects to KAI and prints the available tools. It never prints your token.

Then point your MCP client at the local connector:

{
  "mcpServers": {
    "kai": {
      "command": "node",
      "args": ["/absolute/path/to/kai-mcp/src/index.js"],
      "env": {
        "KAI_AGENT_TOKEN": "your-token-from-kai",
        "KAI_MCP_CLIENT_NAME": "claude-desktop"
      }
    }
  }
}

See examples/ for more configurations.

Try this prompt

Build a website for my independent architecture studio. Use KAI: search the available design architectures, read the template contract, write all of the website copy yourself, create the project, and give me the preview link.

Your agent should call KAI's tools in this order:

  1. kai_search_templates

  2. kai_get_template_contract

  3. kai_create_project

  4. Optionally kai_update_project and kai_export_project

Tools

Tool

What it does

kai_search_templates

Searches the live design catalog using deterministic matching.

kai_get_template_contract

Returns editable slots, character budgets, pages, and media guidance.

kai_create_project

Creates a site from an explicit architecture and caller-authored copy.

kai_get_project

Reads an owned project and its current version.

kai_list_projects

Lists only the authenticated user's projects.

kai_update_project

Applies caller-authored patches with optimistic version checks.

kai_export_project

Creates short-lived, owner-bound HTML or ZIP export links.

All agent tools run in external-agent mode with inference: "none". Your AI does the reasoning. KAI validates, compiles, hosts, and exports the result.

Does this expose KAI's template source?

No. This repository contains no template HTML, CSS, JavaScript, blueprint files, compiler code, or private catalog data.

At runtime, an authenticated agent receives public catalog metadata, preview URLs, and editable slot contracts so it can author content. KAI's private backend performs the build. Your agent does not need — and does not receive — the underlying template source.

Security model

  • The local connector reads KAI_AGENT_TOKEN from its environment.

  • The token is sent only in the Authorization header to the configured KAI MCP endpoint.

  • HTTPS is required, except for localhost development.

  • Credentials embedded in URLs are rejected.

  • The connector does not cache projects, template data, or tokens.

  • Projects and exports are owner-scoped by KAI.

  • Export links are signed and expire after 15 minutes.

Read SECURITY.md before reporting a vulnerability or deploying a modified connector. See the protocol reference for tool arguments, scopes, and retry behavior.

Development

Requirements: Node.js 18.17 or newer.

npm install
npm test
npm pack --dry-run

The integration tests start a local mock KAI MCP server, launch the stdio bridge, verify tool discovery and tool calls, and confirm that bearer authentication is forwarded without being logged.

License

Connector source code is available under the MIT License.

KAI's name, logos, product captures, and trailer media are brand assets, not MIT-licensed code. The trailer uses “Odd Beats 01” by Lily J under the Mixkit Stock Music Free License.


Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI agents with 220+ tools for building websites, sending email, managing contacts, invoicing, databases, automation, and more through a single secure connection. Features hardware-bound authentication and works with Claude Desktop, Claude Code, Cursor, and other MCP-compatible clients.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to discover and create agents, durably submit messages with verifiable replies, and search source-linked local memory. Exposes eight authenticated tools with owner-approved OAuth, transcript-backed verification, and explicit control over history import and embedding.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Connects web AI chats and local clients to your own machine through one OAuth-gated MCP endpoint, exposing 38 governed tools for files, shell commands, search, Git, SQLite, browser automation, DevTools, background tasks, localhost services, clipboard, notifications, ports, and Postman control. It lets assistants build and edit projects, inspect databases and local APIs, drive browser workflows, and manage long-running jobs without handing every client unrestricted shell access.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents to interact with the Data API, manage sites and content, and perform Designer-related operations through MCP tools. It supports both remote OAuth and local API-token configurations.
      547 npm
      MIT