Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ Authenticate through Vercel Connect — no key touches your app, env, or the mod
pnpm add @onkernel/eve-extension
```

**2. Create and attach the Kernel connector** in Vercel Connect — name it `eve-extension` so the snippet below works unedited:
**2. Create and attach the Kernel connector** in Vercel Connect — name it `kernel-mcp` so the snippet below works unedited:

```bash
vercel connect create mcp.onkernel.com --name eve-extension
vercel connect attach mcp.onkernel.com/eve-extension
vercel connect create kernel --name kernel-mcp --connection-method mcp
vercel connect attach kernel/kernel-mcp
```

(or add it from the dashboard → Connectors → "Browse all" → Kernel). Confirm the UID with `vercel connect list`.
`kernel` is Kernel's entry in Vercel's connector registry, so Vercel fills in the MCP URL and branding and opens your browser for the authorization step. `--connection-method mcp` is the part that matters: the registry entry also offers `api-key`, and only `mcp` gives you the per-user OAuth this extension expects. Omit the flag and the CLI prompts you to choose. (Or add it from the dashboard → Connectors → "Browse all" → Kernel.) Confirm the UID with `vercel connect list`.

**3. Mount the extension** — one line, passing the connector UID:

```ts
// agent/extensions/kernel.ts
import kernel from "@onkernel/eve-extension";

export default kernel({ connect: "mcp.onkernel.com/eve-extension" });
export default kernel({ connect: "kernel/kernel-mcp" });
```

**4. Run it:**
Expand All @@ -42,6 +42,8 @@ npx eve dev # or: npx eve deploy

Leave `KERNEL_API_KEY` unset. The first time a user drives the browser, eve surfaces a Connect consent prompt; they approve once, and it's cached from then on (persists across threads and sessions). Each user authenticates as themselves — a good fit for Kernel's per-user managed auth.

Already have a connector from before Kernel was in the registry? It keeps working — leave it alone and point `connect` at whatever UID `vercel connect list` prints for it (e.g. `mcp.onkernel.com/eve-extension`).

## What you get

Once mounted, the agent has (namespaced under your mount, e.g. `kernel__browser__*` — discover exact names via `connection_search`):
Expand All @@ -67,7 +69,7 @@ Both are one-line mounts — no override needed:

| Model | Mount | Consent behavior |
| --- | --- | --- |
| **Per-user via Vercel Connect** (recommended; each person authenticates as themselves) | `kernel({ connect: "mcp.onkernel.com/<name>" })` | Each user consents **once, ever**; the grant persists across threads/sessions. No key in your app or env. |
| **Per-user via Vercel Connect** (recommended; each person authenticates as themselves) | `kernel({ connect: "kernel/<name>" })` | Each user consents **once, ever**; the grant persists across threads/sessions. No key in your app or env. |
| **Shared API key** ([bottom section](#authenticate-with-an-api-key-instead)) | `kernel({ apiKey })` or set `KERNEL_API_KEY` | One key for everyone, no prompts, no connector setup. |

## Overriding the connection
Expand All @@ -76,7 +78,7 @@ You only need this for **advanced** customization — widening the tool allowlis

```
agent/extensions/kernel/
extension.ts # export default kernel({ connect: "mcp.onkernel.com/eve-extension" })
extension.ts # export default kernel({ connect: "kernel/kernel-mcp" })
connections/browser.ts # shadows the extension's "browser" connection
```

Expand All @@ -89,7 +91,7 @@ import { always } from "eve/tools/approval";
export default defineMcpClientConnection({
url: "https://mcp.onkernel.com/mcp",
description: "Kernel cloud browser.",
auth: connect("mcp.onkernel.com/eve-extension"), // or { getToken: async () => ({ token: process.env.KERNEL_API_KEY! }) }
auth: connect("kernel/kernel-mcp"), // or { getToken: async () => ({ token: process.env.KERNEL_API_KEY! }) }
tools: {
allow: [
"manage_browsers",
Expand All @@ -114,6 +116,7 @@ export default defineMcpClientConnection({
- **Node 24+**
- **eve `>= 0.25`** in the consuming agent — extensions need it. Older eve silently ignores `agent/extensions/` (you'll see a "discover/unsupported-directory" warning and nothing mounts). The extension declares `eve` as a peer dependency floored at `>=0.25`, so the consumer's installed eve is the one that runs.
- A **Kernel account** — a Vercel Connect Kernel connector (above) or a Kernel API key (below).
- For the Connect path, **Vercel CLI `>= 58.8.0`** — `--connection-method` landed there. Older CLIs reject the flag.
- `@vercel/connect` ships as a dependency of this extension (used for the Connect path) — no separate install.

## Authenticate with an API key instead
Expand Down
5 changes: 3 additions & 2 deletions extension/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { z } from "zod";
// plus the read -> act -> observe loop as a skill. Pick auth at the mount:
//
// // Vercel Connect, per-user (recommended) — no API key:
// export default kernel({ connect: "mcp.onkernel.com/<your-connector>" });
// export default kernel({ connect: "kernel/<your-connector>" }); // --connection-method mcp
//
// // Static API key (or omit and set KERNEL_API_KEY in the env):
// export default kernel({ apiKey: process.env.KERNEL_API_KEY });
Expand All @@ -18,7 +18,8 @@ export default defineExtension({
// `connect` is unset) the connection falls back to the KERNEL_API_KEY env var.
apiKey: z.string().optional(),
// Authenticate through Vercel Connect instead of an API key: pass the
// connector UID, brokered per-user (interactive consent). Uses `@vercel/connect`.
// connector UID (e.g. "kernel/kernel-mcp"), brokered per-user (interactive
// consent). Uses `@vercel/connect`.
connect: z.string().optional(),
}),
});
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onkernel/eve-extension",
"version": "0.1.3",
"version": "0.1.4",
"description": "Kernel cloud browser extension for Vercel eve agents — mount one line and get session management, Playwright execution, and human-like computer controls as kernel__* tools.",
"type": "module",
"license": "MIT",
Expand Down
Loading