Skip to content
Open
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
3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@
"integrations/vercel/ai-sdk",
"integrations/vercel/marketplace",
"integrations/vercel/eve-extension",
"integrations/vercel/foreman"
"integrations/vercel/foreman",
"integrations/vercel/fx"
]
},
"integrations/vibium",
Expand Down
1 change: 1 addition & 0 deletions integrations/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This approach works with any computer use model, including Anthropic Claude, Ope
Kernel provides detailed guides for popular agent frameworks:

- **[Agent Browser](/integrations/vercel/agent-browser)** - Browser automation CLI for AI agents
- **[fx](/integrations/vercel/fx)** - Give Vercel's fx coding agent a Kernel cloud browser via MCP
- **[Browser Use](/integrations/browser-use)** - AI browser agent framework
- **[Hermes Agent](/integrations/hermes-agent)** - Run Hermes browser tools on Kernel cloud browsers
- **[Claude Code and Desktop](/integrations/claude/claude-code-and-desktop)** - Give the Claude apps a Kernel browser via the marketplace plugin or MCP
Expand Down
45 changes: 45 additions & 0 deletions integrations/vercel/fx.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "fx"
description: "Give Vercel's fx coding agent a Kernel cloud browser via MCP"
---

## Overview

[fx](https://github.com/vercel-labs/fx) is Vercel Labs' native CLI coding agent — a minimalist, terminal-first agent with a small built-in tool surface and first-class MCP support. Instead of loading every connected server's full tool list up front, fx searches for the right capability on demand and only pulls in the tool it needs, which keeps context usage low even with several MCP servers connected.

Connecting Kernel's [MCP server](/reference/mcp-server) gives fx a real cloud browser: it can create a session, drive it with Playwright via [`execute_playwright_code`](/reference/mcp-server/tools/execute-playwright-code), and tear it down — the same toolset described in the [MCP server reference](/reference/mcp-server), including managed auth, profiles, proxies, and replays.

## Setup

Follow the [fx client guide](/reference/mcp-server/clients/fx) to add Kernel to `~/.fx/mcp.json`. Two paths, depending on how you run fx:

- **Interactive session (recommended)** — `kernel mcp install --target fx`, then `/mcp reload` and `/mcp auth kernel --open` to authorize via OAuth in a browser.
- **Headless or scripted (`fx ask`, `fx acp`, CI)** — OAuth needs a browser, so it doesn't work outside an interactive session. Use a Kernel API key with `bearer_token_env` instead; see [Headless and scripted use](/reference/mcp-server/clients/fx#headless-and-scripted-use) for the config.

## Example

With Kernel connected, fx can drive a browser from a single prompt:

```bash
fx ask "Using the kernel MCP server, create a browser session, navigate to https://example.com, return the page title, then delete the session."
```

fx searches its connected servers for the right capability, calls `manage_browsers` to create the session, `execute_playwright_code` to read the title, and `manage_browsers` again to delete it:

```
Example Domain
```

## Related

<CardGroup cols={3}>
<Card title="fx MCP client guide" icon="terminal" href="/reference/mcp-server/clients/fx">
Full setup steps, including headless auth
</Card>
<Card title="MCP Server" icon="server" href="/reference/mcp-server">
All tools the Kernel MCP server exposes
</Card>
<Card title="execute_playwright_code" icon="code" href="/reference/mcp-server/tools/execute-playwright-code">
Run Playwright against a session
</Card>
</CardGroup>
6 changes: 6 additions & 0 deletions integrations/vercel/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Kernel and Vercel have partnered to provide seamless browser automation capabili

[Learn more about Agent Browser →](/integrations/vercel/agent-browser)

### fx

[fx](https://github.com/vercel-labs/fx) is Vercel Labs' native CLI coding agent. Connect it to Kernel's MCP server and it can create a cloud browser session, drive it with Playwright, and tear it down as part of its normal tool use.

[Learn more about fx →](/integrations/vercel/fx)

### AI SDK Tool for Browser Automation

The `@onkernel/ai-sdk` package provides a Vercel AI SDK-compatible tool that enables AI agents to execute Playwright code on Kernel remote browsers. This tool integrates seamlessly with:
Expand Down
26 changes: 26 additions & 0 deletions reference/mcp-server/clients/fx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,29 @@ Then authenticate with Kernel:
```

Authorize access in the browser window that opens. You can then run `/mcp list` to verify that Kernel is connected.

## Headless and scripted use

`/mcp auth` needs a browser, so it only works in an interactive `fx` session. Non-interactive runs — `fx ask`, `fx acp`, CI — can't complete it: fx returns `Run /mcp auth for this server in an interactive fx session` and the Kernel tools aren't discoverable.

For these, authenticate with a Kernel API key instead of OAuth. Get one from the [Kernel Dashboard](https://dashboard.onkernel.com/api-keys), export it, and reference it from `~/.fx/mcp.json` with `bearer_token_env`:

```bash
export KERNEL_API_KEY="sk_..."
```

```json
{
"mcp": {
"kernel": {
"type": "http",
"url": "https://mcp.onkernel.com/mcp",
"bearer_token_env": "KERNEL_API_KEY"
}
}
}
```

<Note>fx rejects a literal `Authorization` header in a static `headers` field (the format other MCP clients use for API-key auth) to keep credentials out of the profile file. `bearer_token_env` is the fx-specific equivalent — it points at an environment variable instead of embedding the token.</Note>

Running `kernel mcp install --target fx` always writes the OAuth config above, so switch to `bearer_token_env` by hand for headless use.
Loading