feat(setup): configure Amp, Grok Build and Zed with setup mcp
Adds Amp, Grok Build and Zed as firecrawl setup mcp targets, so users of those clients no longer hand-edit config to follow the docs quickstarts. Bumps the version to 1.26.17, on top of the 1.26.16 in https://github.com/firecrawl/cli/pull/339.
What it writes
Each client gets the hosted entry (https://mcp.firecrawl.dev/v2/mcp) in its user settings, following that client's documented format:
| Client | --agent values | File | Entry |
|---|---|---|---|
| Amp | amp, ampcode, amp-code | ~/.config/amp/settings.json (or settings.jsonc when only that exists) | "amp.mcpServers".firecrawl = { url, headers? } |
| Grok Build | grok, grok-build, grok-cli | ~/.grok/config.toml | [mcp_servers.firecrawl] with url and optional headers |
| Zed | zed | ~/.config/zed/settings.json ($XDG_CONFIG_HOME/zed on Linux, %APPDATA%\Zed on Windows) | context_servers.firecrawl = { url } |
Sources:
- Amp: https://ampcode.com/docs/customize/mcp (
amp.mcpServers,url/headers,${VAR_NAME}expansion) and https://ampcode.com/docs/cli/settings (settings file locations) - Grok Build: https://docs.x.ai/build/features/mcp-servers (
[mcp_servers.<name>]in~/.grok/config.toml;${VAR}expands inurl,command,args,envandheaders) - Zed: https://zed.dev/docs/ai/mcp (
context_serverswithurl/headers) and https://zed.dev/faq (~/.config/zed/settings.json)
Key handling
The rules match the existing targets. A stored key is never written. With FIRECRAWL_API_KEY exported, Amp and Grok Build get Authorization: Bearer ${FIRECRAWL_API_KEY}, which both clients expand when they load the file. Zed does not expand environment variables in MCP headers (https://github.com/zed-industries/zed/issues/60459). So Zed takes the keyless entry only: with an exported key, --agent zed fails with the same "no verified environment-variable syntax" error unknown clients get, and --agent all skips it, as it already does for Antigravity. --keyless includes it.
Editing existing files
- Amp and Zed settings are JSONC. The entry is set with
jsonc-parser'smodify, so comments, trailing commas, formatting and other servers are kept. A file that does not parse is left alone and reported. - In Grok's
config.toml, the existing[mcp_servers.firecrawl]table and its subtables are replaced in place, and every other line, comments included, is kept. The result is checked withsmol-tomlbefore anything is written. Invalid TOML, or a firecrawl entry defined inline where setup cannot replace it, is reported and the file is not changed. - I wrote these files directly instead of going through
add-mcp.add-mcp@1.14.0has no Amp or Grok Build target, and it writes Zed to~/Library/Application Support/Zed/settings.jsonon macOS, while Zed reads~/.config/zed/settings.json. - The three clients are user settings only:
--agent amp|grok|zed --projectis rejected, and--agent all --project(keyless) skips them with a reason.
New runtime dependencies: jsonc-parser and smol-toml, both with no dependencies of their own.
Testing
- New unit tests in
setup.test.ts, each with a tempHOME, for every client. They cover the env-backed and keyless entries, keeping existing settings and comments, idempotent reruns,settings.jsoncfallback, replacing an old Grok firecrawl table, refusing invalid or unreplaceable TOML,XDG_CONFIG_HOMEfor Zed, rejecting stored keys and--project, and--agent allwith and without an exported key. - Built CLI on a clean temp home:
setup mcp --agent ampand--agent grokwith an exported key wrote env references only (no literal key anywhere under the home).--agent zedwith a key exited 1.--agent zed --keylessadded the entry and kept the existing comments. - Real clients read the written files:
amp mcp listshowsfirecrawl url https://mcp.firecrawl.dev/v2/mcpfrom~/.config/amp/settings.json, andgrok mcp list --json(Grok 1.0.62, run with a placeholder key) shows the firecrawl server with the header expanded from the environment. pnpm test,pnpm type-check,pnpm format:check,pnpm build.
Merge order
Merge after https://github.com/firecrawl/cli/pull/339. 336 and 338 are merged. This branch has 339 merged in to settle the overlapping lines in package.json and the setup.ts imports, so until 339 merges its diff also shows its changes. It ships in 1.26.17.
Summary by cubic
Adds Amp, Grok Build, and Zed as firecrawl setup mcp targets so users no longer hand-edit config to follow the docs quickstarts. Bumps the firecrawl SDK to 4.50.0 and the CLI to 1.26.17.
Each client gets the hosted MCP entry in its user settings: ~/.config/amp/settings.json (or an existing settings.jsonc when there's no settings.json for Amp), ~/.grok/config.toml, and ~/.config/zed/settings.json ($XDG_CONFIG_HOME/zed on Linux when set, %APPDATA%\Zed on Windows). A stored key is never written: Amp and Grok Build get a Bearer ${FIRECRAWL_API_KEY} header their clients expand at load time, while Zed is skipped when a key is exported since it cannot expand env vars in headers. All three are user-settings-only, so --project is rejected. Existing files keep comments and unrelated servers via jsonc-parser and smol-toml; Grok's config.toml is preserved byte for byte outside the replaced [mcp_servers.firecrawl] table. Aliases ampcode, amp-code, grok, grok-build, and grok-cli map to the same targets.
Found by Wildfire, Firecrawl's integration testing: the cli-setup-mcp check warned that Amp, Grok Build and Zed were documented but never configured.