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..939055e --- /dev/null +++ b/integrations/vercel/fx.mdx @@ -0,0 +1,44 @@ +--- +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. + +For setup, follow the [fx client guide](/reference/mcp-server/clients/fx) — it covers both the interactive OAuth path and the API-key path needed for headless runs (`fx ask`, `fx acp`, CI). + +## 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://news.ycombinator.com, return the titles of the top 5 articles, then delete the session." +``` + +fx searches its connected servers for the right capability, calls `manage_browsers` to create the session, `execute_playwright_code` to scrape the titles, and `manage_browsers` again to delete it. A run looked like this (front page changes, so yours will differ): + +``` +1. AnkiDroid: Google Play no longer allowing Open Collective donation link +2. Ask HN: Who is hiring? (September 2026) +3. Urban Congestion Pricing and the Response Times of Emergency Medical Services +4. 44% on ARC-AGI-1 in 67 cents +5. Io_uring Without Readahead +``` + +## 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..a03ed85 100644 --- a/reference/mcp-server/clients/fx.mdx +++ b/reference/mcp-server/clients/fx.mdx @@ -3,6 +3,18 @@ title: "fx" description: "Connect fx to the Kernel MCP server" --- + +OAuth currently fails for fx, interactively or otherwise, with: + +```text +MCP authentication for 'kernel' was rejected: expected issuer "https://mcp.onkernel.com" but +the authorization response returned issuer "https://clerk.onkernel.com". fx stopped before token +exchange. +``` + +Until it's resolved, [connect with an API key](#connect-with-an-api-key-workaround) instead of OAuth. + + ## Install with the Kernel CLI Run the following command: @@ -42,3 +54,30 @@ Then authenticate with Kernel: ``` Authorize access in the browser window that opens. You can then run `/mcp list` to verify that Kernel is connected. + +This is also the path that would otherwise be needed for headless or scripted use — `/mcp auth` needs a browser, so `fx ask`, `fx acp`, and CI can't complete it even once the OAuth issuer bug above is fixed. Use the API-key workaround below for those regardless. + +## Connect with an API key (workaround) + +Get a project-scoped Kernel API key from the [Kernel Dashboard](https://dashboard.onkernel.com/api-keys), export it, and reference it from `~/.fx/mcp.json` with `bearer_token_env` instead of `oauth`: + +```json +{ + "mcp": { + "kernel": { + "type": "http", + "url": "https://mcp.onkernel.com/mcp", + "bearer_token_env": "KERNEL_API_KEY" + } + } +} +``` + +```bash +export KERNEL_API_KEY='' +fx +``` + +This works for both interactive and headless/scripted sessions (`fx ask`, `fx acp`, CI). `kernel mcp install --target fx` always writes the OAuth config, so switch to `bearer_token_env` by hand. + +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. diff --git a/reference/mcp-server/troubleshooting.mdx b/reference/mcp-server/troubleshooting.mdx index 61b5702..7316e2f 100644 --- a/reference/mcp-server/troubleshooting.mdx +++ b/reference/mcp-server/troubleshooting.mdx @@ -7,3 +7,7 @@ description: "Fix connection and authentication issues with the Kernel MCP serve - **Clear saved auth and retry:** `rm -rf ~/.mcp-auth` - **Node.js version:** Ensure a recent Node.js version when using `npx mcp-remote`. - **Strict networks:** If behind strict networks, try stdio via `mcp-remote`, or explicitly set the transport your client supports. + +## OAuth issuer mismatch on strict clients + +If you have issues connecting with OAuth on a client that does strict [RFC 9207](https://www.rfc-editor.org/rfc/rfc9207) issuer verification — an error rejecting the flow before token exchange because the returned issuer doesn't match what discovery advertised — connect with an API key instead of OAuth. Get a project-scoped key from the [Kernel Dashboard](https://dashboard.onkernel.com/api-keys) and configure it the way your client expects a bearer token (e.g. fx's [`bearer_token_env`](/reference/mcp-server/clients/fx#connect-with-an-api-key-workaround)). See [Authentication](/reference/mcp-server/authentication#api-key-authentication) for the general API-key format.