firecrawl-harness
Local web-research integration for DeepSeek Harness: self-hosted Firecrawl + SearXNG.
Local web-research integration for DeepSeek Harness (DSH): the self-hosted Firecrawl stack on your machine (http://127.0.0.1:3002, auth-free) fused with your self-hosted SearXNG instance (configured via SEARXNG_URL — the public repo ships placeholders only, never anyone's personal endpoint). No cloud API keys, no fork of Firecrawl — glue lives entirely here. Environment/config: SEARXNG_URL is required — your own SearXNG's JSON endpoint (?q=x&format=json must return a results list).
Summary extracted from the README.
firecrawl-harness
Local web-research integration for DeepSeek Harness (DSH): the self-hosted
Firecrawl stack on your machine (http://127.0.0.1:3002, auth-free) fused
with your self-hosted SearXNG instance (configured via SEARXNG_URL —
the public repo ships placeholders only, never anyone's personal endpoint).
No cloud API keys, no fork of Firecrawl — glue lives entirely here.
About this build. This entire integration — architecture, code, tests, and deployment wiring — was conceived and executed autonomously by qwen3.8-flash-next served on a single NVIDIA DGX Spark (GB10 Grace Blackwell, 128 GB unified memory), driving DeepSeek Harness end to end: from plan-mode exploration through acceptance testing to live MCP-tool validation. One small inference node, one agent, zero cloud APIs.
- Purpose: give agent sessions first-class local tools to search (SearXNG),
read (Firecrawl scrape), recon (map), and collect (crawl) the web;
/v1/searchon self-hosted Firecrawl needs Google keys, so SearXNG covers search at this layer instead. - Status: active (created 2026-09-17, verified against stack build
2343d7b). - Provenance: adapts
https://github.com/firecrawl/firecrawl(upstream container kept as-is;firecrawl-mcpofficial server pin3.24.0).
Important files
| Path | Role |
|---|---|
scripts/fc_client.py |
Shared stdlib client: transport, retries, envelopes, job polling, env config |
scripts/fc_research.py |
SearXNG → Firecrawl research fusion digest (the marquee tool) |
scripts/fc_scrape.py |
One-URL scrape → markdown (/v1/scrape) |
scripts/fc_map.py |
URL discovery (/v1/map) |
scripts/fc_crawl.py |
Small polite async crawls (/v1/crawl), caps: pages ≤ 50, depth ≤ 3 |
scripts/healthcheck.py |
PASS/FAIL gate incl. scrape+search canaries; run after reboots/incidents |
assets/blacklist.txt |
Domain filter for research digests (suffix match) |
skill/SKILL.md |
DSH skill manifest; symlinked as ~/.agents/skills/firecrawl |
tests/smoke.sh |
Codified acceptance run (6 checks incl. degradation exit code) |
docs/ARCHITECTURE.md |
How it fits together; transport/API facts pinned by probe; DSH patch-grammar lesson |
docs/OPERATIONS.md |
Install, runbook, failure→fix table, rollback, dated verification log |
.cache/ |
Generated digests/crawl output (gitignored) |
Common commands
python3 scripts/healthcheck.py # all green?
./tests/smoke.sh # acceptance suite
python3 scripts/fc_research.py "some topic" --scrape 3
python3 scripts/fc_scrape.py https://example.com --only-main-content
python3 scripts/fc_map.py https://docs.example.org --limit 30
python3 scripts/fc_crawl.py https://docs.example.org/guide --limit 10 --max-depth 2
Environment/config: SEARXNG_URL is required — your own SearXNG's JSON
endpoint (<url>?q=x&format=json must return a results list). Resolution
order: env → repo .env (cp .env.example .env) →
~/.config/firecrawl-harness/config (KEY=VALUE lines; env wins). Unconfigured
scripts fail fast with a clear hint. FIRECRAWL_API_URL (default
http://127.0.0.1:3002; guarded to loopback unless FC_ALLOW_REMOTE_API=1).
Exit codes: 2 SearXNG down, 3 Firecrawl down, 4 timeout, 5 job/validation failure.
DSH wiring
- Skill —
ln -s ~/projects/firecrawl-harness/skill ~/.agents/skills/firecrawl(already in place). New sessions listfirecrawlin the skill catalog. - Native MCP tools — one id-less
insert:list in~/.dsh/profiles/web/cordis.patch.ymladds the@deepseek-ai/dsh-mcp-clientrow (a plain- id: … name: … config:in a patch only retargets existing rows and warnspatch: entry … not found; new rows must be inserted — learned live from the compiledcordis-plugin-includeand confirmed bydsh --profile web --dump-config). Runs the official MCP server over stdio:npx -y firecrawl-mcp@3.24.0withFIRECRAWL_API_URLset; tools appear asmcp__firecrawl__firecrawl_<tool>(the npm server's raw tool names are alreadyfirecrawl_*, so the bridge's namespacing doubles the prefix — verified live: 27 tools registered, but the callable set in practice ismcp__firecrawl__firecrawl_scrape|map|crawl|check_crawl_status; bare names likefirecrawl_searchare not registered in any session (unknown tool), and the tools behindfirecrawl_search(needs Google keys) plus the cloud-onlymonitor_*/research_*/agent/interact/parse/developer_search/extracterror against this stack by design — search goes throughscripts/fc_research.py/SearXNG, never those tools).failOnStartupError: falsekeeps DSH bootable if npx/registry is unavailable. Remove that single hunk to roll back — the profile'spatchReload: livehot-applies patch edits, so the original (broken) patch was ignored live and this corrected row took effect with no service restart. The host~/.npmcache contains root-owned files (pre-existing npm bug fallout), so the entry injectsnpm_config_cache=…/.npm-cache— a repo-local scratch cache proven to cold-install the pin (achown -R 1000:1001 ~/.npmfixes the host cache globally if ever desired).
Related links
- Firecrawl repo / docs: https://github.com/firecrawl/firecrawl · https://docs.firecrawl.dev
- Firecrawl MCP server:
firecrawl-mcpon npm (pinned 3.24.0) - Stack check:
docker ps | grep firecrawl(api/redis/rabbitmq/postgres/playwright) - Sibling skill (raw search):
~/.agents/skills/local-web-search
Notes
- Verified response envelope for async jobs:
{success, status, completed, total, data:[{markdown, metadata}]}; unknown interim statuses keep polling. /v1/extractdeliberately unwrapped: needs an LLM service the compose doesn't configure (possible future twist: point it at the DGX Spark OpenAI-compat endpoint).- One retry (2 s backoff) on connection errors/timeouts/5xx only; 4xx never retried. A retried POST can duplicate a scrape job server-side — accepted.
- Respect robots: delegated to Firecrawl defaults; blocked pages surface as visible scrape errors, never bypassed.
Next actions
- Done 2026-09-17: skill symlinked + smoke suite green;
mcp-firecrawlrow composed (dump-config clean) and serving live viapatchReload: livehot-apply — stdio child treedsh → npm exec firecrawl-mcpsteady, MCP handshake previously verified directly (27 tools). No service restart was ever actually required. - Watch: per-request token weight of the 27-tool schema; trim by removing the hunk if it stings (skill scripts are independent of it).
- Optional:
chown -R 1000:1001 ~/.npmto retire the cache workaround; a deployment note in your own ops-notes location.