Skip to main content
Glama
README.md
# KMPilot for coding agents

Build a real **Kotlin Multiplatform** app — Android and iOS from one `commonMain`, plus a browser
preview — from a plain-language description, without leaving your agent. Your agent drives the
hosted KMPilot conductor over MCP, watches the build, and hands you back links you can open.

KMPilot is **invite-only**. You need an account and an access token; see _Getting a token_ below.

## Claude Code

```
claude plugin marketplace add kmpilot-dev/kmpilot-mcp-server
claude plugin install kmpilot@kmpilot
```

That is the whole install: the MCP server and four skills. You are prompted for your access token
during install — nothing to paste into a config file.

Then `/kmpilot:build-app`, `/kmpilot:review-spec`, `/kmpilot:watch-build`, `/kmpilot:show-app`, or
just ask in your own words: the skills carry their own triggers.

## Codex, Cursor, and the other Agent Skills hosts

```
codex mcp add kmpilot -- npx -y github:kmpilot-dev/kmpilot-mcp-server
npx skills add kmpilot-dev/kmpilot-mcp-server
```

The first adds the MCP server; the second installs the same four skills in the open Agent Skills
format, into `.agents/skills`, which Codex, Cursor and the other hosts the `skills` CLI supports
read from. Set `KMPILOT_TOKEN` in the server's environment.

## Any other MCP client

The conductor speaks JSON-RPC 2.0 over a single `POST`. Point your client at it directly:

```jsonc
{
  "mcpServers": {
    "kmpilot": {
      "type": "http",
      "url": "https://api.kmpilot.dev/mcp",
      "headers": { "Authorization": "Bearer kmp_…" },
    },
  },
}
```

Or run the bridge over stdio, for a client that installs an MCP server by command rather than by
URL: `npx -y github:kmpilot-dev/kmpilot-mcp-server`, with `KMPILOT_TOKEN` set (and `KMPILOT_URL` if
you are pointing at a conductor of your own). This repository _is_ that package; it is not on npm
yet, so install it from here rather than by name.

## Getting a token

kmpilot.dev → **Account → Agents** → name it after where it will live ("claude code on the laptop")
→ Create token.

**The secret is shown once.** It is generated in your browser and never sent anywhere; the platform
stores only its SHA-256, so there is no copy for anyone to give back to you. Lost it? Revoke and
mint another.

A token acts as you and carries your invite: minting needs an invited session, and **every use
re-checks the allow-list**, so a token cannot outlive the invite behind it.

## What the agent can do

|                       |                                                                                        |
| --------------------- | -------------------------------------------------------------------------------------- |
| `list_apps`           | every app you have, with its build status                                              |
| `create_app`          | an app from a prompt; returns its id. Not built yet                                    |
| `propose_spec`        | reads a prompt into archetype + stories + acceptance criteria. Costs model calls       |
| `accept_spec`         | persists the spec the app is built against                                             |
| `start_build`         | starts the build and returns immediately                                               |
| `app_status`          | `new`, `spec_ready`, `building`, `built`, `failed`, `interrupted`                      |
| `app_spec`            | the accepted spec: the stories and criteria this app was built against                 |
| `stop_build`          | asks a running build to stop at its next yield point                                   |
| `app_links`           | **every way to open the app**, as absolute links, each saying where it works from      |
| `preview_url`         | the browser preview as a conductor-relative path                                       |
| `sync_to_github`      | a private repo in your account, CI secrets, and the push that starts the device builds |
| `ci_status`           | the iOS and Android runs, plus the Appetize URLs that run the app on a device          |
| `rerun_device_builds` | re-runs both device builds with no code change                                         |
| `install_link`        | a signed, expiring APK URL for a phone to scan — on the conductor's own network        |

The usual order: `create_app` → `propose_spec` → `accept_spec` → `start_build` → poll `app_status`
→ `app_links`.

**A build takes 23–37 minutes.** Every tool returns immediately and none of them blocks on a build,
so an agent watches with `app_status` rather than waiting. The skills in this plugin already know
that; it is the single thing an agent gets wrong without them.

## Opening the app when it is done

`app_links` is the one call that answers with absolute, clickable URLs and says where each is
reachable from:

- **browser preview** — anywhere the conductor is reachable. The default link to share.
- **Appetize (iOS / Android)** — anywhere. Appetize hosts the device, so this works for someone on
  another network, and it is the device path for a hosted conductor.
- **APK install link** — the conductor's own network only; a dev-mode sideload for a phone on the
  same Wi-Fi.

Anything missing comes back in `unavailable` **with its reason** — "not synced to GitHub" and "pass
a GitHub token" are different problems, and the agent is told which.

The last four tools need **your own GitHub token**, passed on each call. The repo, its Actions runs
and its APK all live in your account, and the conductor stores no token for anyone — it uses what
you pass, for that call only. A fine-grained PAT with repo and Actions access is enough.

## What this endpoint does not do

Said here rather than left for a client to discover: no SSE response stream, no `Mcp-Session-Id`, no
server-initiated messages, no resources and no prompts. The spec permits a JSON response to a POST,
so a client that only calls tools works today; one that requires the streaming half does not.

**No tool writes files.** An agent starts and watches work; it does not get a writable repo. The
gated core is the only thing that changes code in your app. `sync_to_github` is not an exception: it
pushes the app that core already built, to a repo in your own account, with a token you passed in.

## This repository

It is generated. The source of truth is the KMPilot product repo; the skills here are rendered from
one shared copy, and the plugin and the portable `skills/` tree are byte-identical by construction.
Open an issue rather than a pull request against a rendered file.