diff --git a/docs.json b/docs.json index 45148ed..fddad90 100644 --- a/docs.json +++ b/docs.json @@ -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", diff --git a/integrations/overview.mdx b/integrations/overview.mdx index 5efd385..b009657 100644 --- a/integrations/overview.mdx +++ b/integrations/overview.mdx @@ -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 diff --git a/integrations/vercel/fx.mdx b/integrations/vercel/fx.mdx new file mode 100644 index 0000000..69cb961 --- /dev/null +++ b/integrations/vercel/fx.mdx @@ -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 + + + + Full setup steps, including headless auth + + + All tools the Kernel MCP server exposes + + + Run Playwright against a session + + diff --git a/integrations/vercel/overview.mdx b/integrations/vercel/overview.mdx index a1a524d..b42b31a 100644 --- a/integrations/vercel/overview.mdx +++ b/integrations/vercel/overview.mdx @@ -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: diff --git a/reference/mcp-server/clients/fx.mdx b/reference/mcp-server/clients/fx.mdx index 2740185..9cc5ae8 100644 --- a/reference/mcp-server/clients/fx.mdx +++ b/reference/mcp-server/clients/fx.mdx @@ -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" + } + } +} +``` + +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. + +Running `kernel mcp install --target fx` always writes the OAuth config above, so switch to `bearer_token_env` by hand for headless use.