firecrawl / firecrawl/cli

Windows: setup mcp fails with path quoting (C:\Program not recognized, v1.20.0)

Open
#188 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
631
Forks
100
Avg merge
5h 9m
Merged PRs (30d)
25

Description

## Summary
`firecrawl setup mcp` (firecrawl-cli **v1.20.0** on Windows) fails when spawning `npx.cmd` through `cmd.exe` because a spaced path is not quoted correctly:

```
'"C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Error: Failed to configure Firecrawl MCP.
```

This reproduces for a single agent (`-a cursor`) and for `--agent all`. It is a CLI defect in `runClientCommand` / `escapeCmdArg` (see `dist/commands/setup.js`), not a user config issue.

## Environment
- OS: Windows 11
- firecrawl-cli: 1.20.0 (latest per `firecrawl doctor`)
- Node: v24.19.0 under `C:\Program Files\nodejs\` (path contains a space)
- Shell: PowerShell

## Steps to reproduce
1. `npm i -g firecrawl-cli@1.20.0`
2. `firecrawl setup mcp -g -a cursor -y --keyless`
3. Observe the `'"C:\Program' is not recognized` error

## Workaround (verified)
Bypass firecrawl's wrapper and call `add-mcp` directly from PowerShell/Node (which quotes `Program Files` correctly):

```
npx -y add-mcp@1.14.0 https://mcp.firecrawl.dev/v2/mcp --name firecrawl --transport http --global --all --yes
```

This successfully registered `https://mcp.firecrawl.dev/v2/mcp` on Cursor, Claude Code, Codex, Gemini CLI, VS Code/GitHub Copilot, Continue (manual YAML), and other detected agents.

## Expected
`firecrawl setup mcp` should configure the hosted MCP URL on Windows even when Node/npm live under `C:\Program Files\...`.

## Notes
`firecrawl doctor --query ...` could not file this via `/v2/support/ask` here because no API key is present in this shell (`Not authenticated`). Opening this issue instead.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in dist/commands/setup.js, focusing on runClientCommand and escapeCmdArg, then reproduce firecrawl setup mcp on Windows with Node under C:\Program Files\. Done means the command configures the hosted MCP URL for the requested agents without splitting the spaced executable path.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.