@goravjhabakh/openai-firecrawl
v1.1.0
Published
Local Windows-first orchestrator connecting ChatGPT to self-hosted Firecrawl via the official Firecrawl MCP server and OpenAI Secure MCP Tunnel.
Readme
openai-firecrawl
Connect ChatGPT to an existing self-hosted Firecrawl instance through the official Firecrawl MCP server and OpenAI Secure MCP Tunnel.
openai-firecrawl is a small, conservative local orchestrator. It does not reimplement Firecrawl or MCP, requires no Firecrawl Cloud API key for self-hosted instances, and never exposes public inbound ports on your machine.
Architecture
ChatGPT (Custom MCP Server, Connection: Tunnel)
│
▼
OpenAI Tunnel Service (https://api.openai.com/v1/tunnels/<tunnel_id>/*)
▲
│ Outbound-only HTTPS long-poll (authenticated via CONTROL_PLANE_API_KEY)
│
tunnel-client.exe (local background process)
├─ Loopback Health & Admin UI: http://127.0.0.1:<TUNNEL_HEALTH_PORT> (/readyz, /ui)
│
▼ Local Streamable HTTP MCP
Official firecrawl-mcp (http://localhost:<MCP_PORT>/mcp)
│
▼ Local HTTP API (FIRECRAWL_API_URL)
Self-hosted Firecrawl (http://localhost:3002)Supported Environment
- OS: Windows 11 (V1 target platform)
- Node.js:
>= 22.0.0 - Docker: Docker Desktop with Docker Compose v2
Prerequisites
- Self-hosted Firecrawl: An existing local Firecrawl checkout configured with Docker Compose (running or ready to start). See the official Firecrawl self-hosting guide if you have not set it up yet.
- OpenAI Secure MCP Tunnel (
tunnel-client.exe):- Download
tunnel-client-vX.Y.Z-windows-amd64.zipfrom OpenAI Platform Tunnels settings or GitHub Releases. - Place
tunnel-client.exeon your systemPATH, in%LOCALAPPDATA%\openai-firecrawl\bin\tunnel-client.exe, or pointTUNNEL_CLIENT_BINto it in%APPDATA%\openai-firecrawl\.env.
- Download
- ChatGPT & OpenAI Platform access: Support for custom MCP servers and OpenAI Secure MCP Tunnels.
Installation
Install the global CLI via npm:
npm install -g @goravjhabakh/openai-firecrawlQuick start:
openai-firecrawl init
openai-firecrawl doctor
openai-firecrawl start
openai-firecrawl stopUpgrading from v1.0.0 to v1.1.0
In v1.1.0, configuration and runtime ownership state moved from repository-local files to user-level Windows directories so the CLI works from any working directory:
- Config:
<repo>/.env→%APPDATA%\openai-firecrawl\.env - State:
<repo>/.openai-firecrawl-state.json→%LOCALAPPDATA%\openai-firecrawl\state.json
If you currently have a stack running under v1.0.0:
- Run
pnpm stopin yourv1.0.0repository checkout before upgrading so your previously managed processes are stopped cleanly using the old repo-local state file. - Install or upgrade to
v1.1.0(npm install -g @goravjhabakh/openai-firecrawl). - Run
openai-firecrawl initand copy your existing settings from<repo>/.envinto%APPDATA%\openai-firecrawl\.env.
OpenAI Tunnel Setup
Before running openai-firecrawl start for the first time:
- Create a Tunnel in OpenAI Platform:
- Open Platform Settings → Tunnels.
- Create a tunnel (requires Tunnels Read + Manage permissions) and link it to your target ChatGPT workspace.
- Copy the
tunnel_id(e.g.,tunnel_0123456789abcdef0123456789abcdef).
- Create a Runtime API Key:
- Open Platform Settings → API Keys.
- Create an API key with Tunnels Read + Use permissions.
Configuration (%APPDATA%\openai-firecrawl\.env)
Initialize your user configuration file:
openai-firecrawl initThis creates %APPDATA%\openai-firecrawl\.env (if it does not already exist):
FIRECRAWL_API_URL=http://localhost:3002
FIRECRAWL_HOME=C:/path/to/firecrawl
MCP_PORT=3000
# OpenAI Secure MCP Tunnel
CONTROL_PLANE_TUNNEL_ID=tunnel_0123456789abcdef0123456789abcdef
CONTROL_PLANE_API_KEY=sk-...
# Optional overrides:
# TUNNEL_CLIENT_BIN=C:/path/to/tunnel-client.exe
# TUNNEL_HEALTH_PORT=8080Configuration precedence is:
process environment
↓
%APPDATA%\openai-firecrawl\.env
↓
defaultsFIRECRAWL_HOMEis used to rundocker compose up -dwhen Firecrawl is not already running. If you manage Firecrawl externally and it is already running atFIRECRAWL_API_URL,FIRECRAWL_HOMEis optional.- No
FIRECRAWL_API_KEYis needed for self-hosted Firecrawl.
CLI Commands
openai-firecrawl init
Creates %APPDATA%\openai-firecrawl\.env with a safe template if missing. Never overwrites an existing configuration file.
openai-firecrawl start
Brings the full local stack to a verified ready state:
- Loads and validates configuration (
process.env>%APPDATA%\openai-firecrawl\.env> defaults). - Checks whether Firecrawl is already reachable at
FIRECRAWL_API_URL; if not, verifies Docker andFIRECRAWL_HOMEand starts the Firecrawl Docker Compose stack (docker compose up -d). - Starts (or reuses) the official
firecrawl-mcpserver in Streamable HTTP mode athttp://localhost:<MCP_PORT>/mcp. - Starts (or reuses)
tunnel-clientconnected tohttp://localhost:<MCP_PORT>/mcpand waits untilhttp://127.0.0.1:<TUNNEL_HEALTH_PORT>/readyzreports ready. - Records process ownership in
%LOCALAPPDATA%\openai-firecrawl\state.jsonand prints your ChatGPT connection details.
openai-firecrawl doctor
Runs non-destructive diagnostics across your setup:
- Configuration file & port validation
- Docker daemon & Compose availability
FIRECRAWL_HOME& Compose container status- Firecrawl API readiness probe
firecrawl-mcppackage resolution & MCP endpoint status- OpenAI tunnel credentials presence,
tunnel-clientbinary resolution, and health/preflight status - Process ownership state
openai-firecrawl stop
Safely stops services in reverse dependency order (Tunnel → MCP → Firecrawl):
- Only stops services that
openai-firecrawlactually started (owned: truein%LOCALAPPDATA%\openai-firecrawl\state.json). - Verifies Windows process identity (PID + command-line inspection via
Win32_Process) before terminatingtunnel-clientorfirecrawl-mcp. - Leaves any pre-existing external Firecrawl, MCP, or tunnel instances untouched.
openai-firecrawl --version / openai-firecrawl --help
Prints the installed package version or command usage and configured file paths.
(For local repository development, pnpm run init, pnpm start, pnpm run doctor, and pnpm stop route through the same CLI implementation.)
ChatGPT Custom MCP Setup
Once openai-firecrawl start reports SUCCESS:
- Open ChatGPT and navigate to Settings → Connectors (or Plugins) → Add custom MCP server.
- Set Connection to Tunnel.
- Select or paste your
CONTROL_PLANE_TUNNEL_ID. - Set Authentication to No authentication (your local
firecrawl-mcpruns in keyless self-hosted mode over the private tunnel). - Save/Create the connector.
Example Usage in ChatGPT
With the connector enabled in a ChatGPT conversation, try prompts such as:
- Scrape: "Use Firecrawl to scrape
https://example.comin markdown format and summarize the content." - Search: "Use Firecrawl to search the web for the latest Node.js LTS release notes."
- Map: "Use Firecrawl to map the URLs on
https://docs.firecrawl.dev." - Crawl: "Use Firecrawl to crawl
https://example.comwith a limit of 3 pages and check the crawl status."
You can monitor live tunnel state locally at http://127.0.0.1:8080/ui (or your configured TUNNEL_HEALTH_PORT).
Current Limitations
- Windows-first (V1): Process inspection and background spawning are built and tested specifically for Windows 11.
- User-managed prerequisites: This project does not install or configure the self-hosted Firecrawl Docker stack or auto-download
tunnel-client.exe. - Single user-level stack: Runtime ownership state is tracked per user in
%LOCALAPPDATA%\openai-firecrawl\state.json.
Documentation & Troubleshooting
- Troubleshooting Guide — solutions for Docker, Firecrawl readiness, port conflicts,
tunnel-client, and ChatGPT connection issues - Project Scope
- Architecture
- Development Guide
