Skip to content

feat(setup): configure Amp, Grok Build and Zed with setup mcp - #340

Merged
erikengervall merged 1 commit into
mainfrom
capy/setup-mcp-amp-grok-zed
Oct 20, 2026
Merged

erikengervall merged 1 commit into
mainfrom
capy/setup-mcp-amp-grok-zed

Conversation

@erikengervall

@erikengervall erikengervall commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

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 #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:

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 (zed-industries/zed#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's modify, 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 with smol-toml before 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.0 has no Amp or Grok Build target, and it writes Zed to ~/Library/Application Support/Zed/settings.json on macOS, while Zed reads ~/.config/zed/settings.json.
  • The three clients are user settings only: --agent amp|grok|zed --project is 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 temp HOME, for every client. They cover the env-backed and keyless entries, keeping existing settings and comments, idempotent reruns, settings.jsonc fallback, replacing an old Grok firecrawl table, refusing invalid or unreplaceable TOML, XDG_CONFIG_HOME for Zed, rejecting stored keys and --project, and --agent all with and without an exported key.
  • Built CLI on a clean temp home: setup mcp --agent amp and --agent grok with an exported key wrote env references only (no literal key anywhere under the home). --agent zed with a key exited 1. --agent zed --keyless added the entry and kept the existing comments.
  • Real clients read the written files: amp mcp list shows firecrawl url https://mcp.firecrawl.dev/v2/mcp from ~/.config/amp/settings.json, and grok 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 #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.

Open in Capy


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.

Written for commit 7f47606. Summary will update on new commits.

View guided diff Turn on auto-fix

Found by Wildfire, Firecrawl's integration testing: the cli-setup-mcp check warned that Amp, Grok Build and Zed were documented but never configured.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 5 files

Shadow auto-approve: would not auto-approve because issues were found.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/__tests__/commands/setup.test.ts
Comment thread src/commands/setup.ts Outdated
Comment thread src/commands/setup.ts Outdated
Comment thread src/__tests__/commands/setup.test.ts

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 2 files (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would require human review. Adds Amp, Grok Build, and Zed as config-file targets for firecrawl setup mcp, with new jsonc/toml dependencies and tests. The core file-writing and key-handling implementation is truncated, so the behavior could not be verified end-to-end.

View guided diff | Turn on auto-fix | Re-trigger cubic

@capy-ai

capy-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@capy-ai[bot] I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 32 files

Shadow auto-approve: would auto-approve with 1 open P3 issue. Adds setup mcp targets for Amp, Grok Build, and Zed via user-settings config writing, plus an env-configurable integration tag; the feature is well-tested, key-safe, and bounded to CLI tooling.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread README.md Outdated
@capy-ai

capy-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@capy-ai[bot] I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 32 files

Shadow auto-approve: would auto-approve with 1 open P3 issue. Adds Amp, Grok Build, and Zed as firecrawl setup mcp targets via key-safe user-config writes, plus an opt-in FIRECRAWL_INTEGRATION tag; well-tested and bounded to CLI tooling, with only a README/docs change since the prior approval.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread README.md Outdated

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 1 file (changes from recent commits).

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would require human review. Adds Amp/Grok/Zed config-file MCP targets plus an integration-tag feature, init step reorder, and SDK/dependency bumps. The core config-writing and key-handling implementation in setup.ts is truncated and unverifiable, so the security-relevant behavior needs human sign-off.

View guided diff | Turn on auto-fix | Re-trigger cubic

@wildfire-smoke
wildfire-smoke force-pushed the capy/skip-unavailable-clients-in branch from be477ff to f97b63d Compare October 19, 2026 21:16
Base automatically changed from capy/skip-unavailable-clients-in to main October 19, 2026 23:47
@capy-ai

capy-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@capy-ai[bot] I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 11 files

Shadow auto-approve: would not auto-approve because issues were found.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/commands/setup.ts Outdated
Comment thread README.md Outdated
@capy-ai

capy-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@capy-ai[bot] I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 11 files

Shadow auto-approve: would not auto-approve because issues were found.

View guided diff | Turn on auto-fix | Re-trigger cubic

Comment thread src/__tests__/commands/setup.test.ts Outdated
@capy-ai

capy-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review

@capy-ai[bot] I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 11 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Shadow auto-approve: would require human review. Adds Amp, Grok Build, and Zed as setup mcp config-file targets plus prompt/init non-interactive refactors; the new user-config writes and a dismissed comment-only-settings edge case are unresolved behavior decisions.

View guided diff | Turn on auto-fix | Re-trigger cubic

Squashed onto main 82229b1. The branch's merged-in work from #326, #336, #337, #338 and #339 is already on main; this commit holds only the Amp, Grok Build and Zed setup mcp change and the bump to 1.26.17.
@erikengervall
erikengervall force-pushed the capy/setup-mcp-amp-grok-zed branch from 2eabf9d to 7f47606 Compare October 20, 2026 18:59
@erikengervall
erikengervall merged commit bacbadc into main Oct 20, 2026
8 checks passed
@erikengervall
erikengervall deleted the capy/setup-mcp-amp-grok-zed branch October 20, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant