firecrawl-lite-mcp-server

firecrawl-lite-mcp-server

Enables privacy-first web scraping and structured data extraction using a local headless browser and your own LLM key. Supports tools for scraping, batch scraping, data extraction with prompts or schemas, and screenshots.

Category
访问服务器

README

<div align="center">

<img src="docs/banner.jpg" alt="Firecrawl Lite MCP Server" width="100%" />

Firecrawl Lite MCP Server

Privacy-first web scraping and data extraction for any MCP client — powered by local browser automation and your own LLM key.

npm version Docker Pulls Image Size Build Tests Node MCP License: MIT

</div>


Firecrawl Lite is a standalone Model Context Protocol server that gives any MCP client — Claude Desktop, Claude Code, Cursor, and others — the ability to scrape web pages and extract structured data. Pages are fetched and rendered with a local, stealth-enabled headless browser, and structured extraction is performed by your own LLM provider. There is no Firecrawl account and no third-party scraping service in the loop: the only API key you bring is the one for the LLM you already use.

Contents

Why Firecrawl Lite

Privacy-first. Scraping and rendering happen on your own machine or server. Page content is only ever sent to the LLM provider you explicitly configure — nothing is routed through a third-party scraping cloud.

Bring your own model. Works with any OpenAI-compatible chat/completions endpoint: OpenAI, xAI (Grok), Anthropic, OpenRouter, Synthetic, or a local model via Ollama. You pay only for the LLM tokens you use.

Lightweight and self-contained. A single Node.js process with a bundled headless browser. Run it locally over stdio, or deploy it as one container behind HTTP/SSE. Multi-architecture images (amd64 / arm64) are published on every release.

Built for real scraping. Stealth browser automation, rotating user agents, configurable delays, optional upstream proxies (including port-range rotation), and tunable retry/backoff.

Available Tools

Tool Description Required params Optional params
scrape_page Fetch and render a single page, returning clean text/markdown. url onlyMainContent
batch_scrape Scrape multiple URLs in one request (up to 10). urls[] onlyMainContent
extract_data Extract structured data from pages using a natural-language prompt and your LLM. urls[], prompt enableWebSearch
extract_with_schema Extract data conforming to a supplied JSON Schema. urls[], schema prompt, enableWebSearch
screenshot Capture a screenshot of a page via the stealth browser. url width, height, fullPage

Quick Start

The fastest way to use Firecrawl Lite locally is over stdio via npx — no install or container required. Add the LLM credentials for the provider of your choice (see LLM provider examples).

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "firecrawl-lite": {
      "command": "npx",
      "args": ["-y", "@ariangibson/firecrawl-lite-mcp-server"],
      "env": {
        "LLM_API_KEY": "your_llm_api_key_here",
        "LLM_PROVIDER_BASE_URL": "https://api.openai.com/v1",
        "LLM_MODEL": "gpt-5.5"
      }
    }
  }
}

Claude Code (CLI)

claude mcp add firecrawl-lite npx -- -y @ariangibson/firecrawl-lite-mcp-server \
  --env LLM_API_KEY=your_key \
  --env LLM_PROVIDER_BASE_URL=https://api.openai.com/v1 \
  --env LLM_MODEL=gpt-5.5

Cursor

Add to your Cursor MCP configuration (~/.cursor/mcp.json):

{
  "mcpServers": {
    "firecrawl-lite": {
      "command": "npx",
      "args": ["-y", "@ariangibson/firecrawl-lite-mcp-server"],
      "env": {
        "LLM_API_KEY": "your_llm_api_key_here",
        "LLM_PROVIDER_BASE_URL": "https://api.openai.com/v1",
        "LLM_MODEL": "gpt-5.5"
      }
    }
  }
}

Configuration

All configuration is via environment variables. Only the three LLM variables are required; everything else has sensible defaults.

Required

Variable Description
LLM_API_KEY API key for your LLM provider.
LLM_PROVIDER_BASE_URL Base URL of an OpenAI-compatible API (the server calls {base_url}/chat/completions).
LLM_MODEL Model name to use for extraction.

Optional LLM tuning

These are passed straight through to the provider's chat/completions request. Leave any of them unset to use the default; the optional sampling parameters are omitted from the request entirely when unset.

Variable Default Notes
LLM_TEMPERATURE 0.1 Sampling temperature.
LLM_MAX_TOKENS 2000 Maximum tokens in the response. Raise this if extractions are being truncated.
LLM_TOP_P unset Nucleus sampling; omitted from the request unless set.
LLM_REASONING_EFFORT unset reasoning_effort for reasoning-capable models; omitted unless set.

LLM provider examples

# OpenAI
LLM_PROVIDER_BASE_URL=https://api.openai.com/v1
LLM_MODEL=gpt-5.5

# xAI (Grok)
LLM_PROVIDER_BASE_URL=https://api.x.ai/v1
LLM_MODEL=grok-4

# Anthropic
LLM_PROVIDER_BASE_URL=https://api.anthropic.com/v1
LLM_MODEL=claude-haiku-4-5

# OpenRouter
LLM_PROVIDER_BASE_URL=https://openrouter.ai/api/v1
LLM_MODEL=openai/gpt-5.5

# Local (Ollama)
LLM_PROVIDER_BASE_URL=http://localhost:11434/v1
LLM_MODEL=llama3.3

See .env.example for the full, annotated list of variables.

Remote Deployment

For remote or containerized use, enable at least one HTTP transport — both are disabled by default for security. Choose based on your client:

  • ENABLE_HTTP_STREAMABLE_ENDPOINT=true → exposes /mcp (Claude Code, modern remote MCP clients).
  • ENABLE_SSE_ENDPOINT=true → exposes /sse (Claude Desktop via mcp-proxy).

A /health endpoint is always available for health checks.

Docker

docker run -d \
  -p 3000:3000 \
  -e ENABLE_HTTP_STREAMABLE_ENDPOINT=true \
  -e LLM_API_KEY=your_key_here \
  -e LLM_PROVIDER_BASE_URL=https://api.openai.com/v1 \
  -e LLM_MODEL=gpt-5.5 \
  ariangibson/firecrawl-lite-mcp-server:latest

Docker Compose / Portainer / Swarm

A ready-to-use docker-compose.yml is included. Set your variables in a .env file and deploy:

docker compose up -d

Note for Docker Swarm / Portainer: the published image is node:20-alpine, which does not include curl. The bundled compose file uses a wget-based health check for this reason — see Troubleshooting if you have customized it.

Remote client configuration

Claude Code (Streamable HTTP):

claude mcp add firecrawl-lite-remote http://your-server:3000/mcp -t http

Claude Desktop — Connectors (recommended, HTTPS only): Settings → Connectors → add https://your-server.com:3000/mcp. Requires a valid TLS certificate.

Claude Desktop — mcp-proxy (HTTP fallback, no certificate):

pip install mcp-proxy
{
  "mcpServers": {
    "firecrawl-lite": {
      "command": "mcp-proxy",
      "args": ["http://your-server:3000/sse"]
    }
  }
}

Advanced Configuration

Proxy

Route the scraping browser through an upstream proxy. A port range (e.g. :10001-10010) enables automatic rotation across ports.

PROXY_SERVER_URL=http://proxy.example.com:10001-10010
PROXY_SERVER_USERNAME=your-username
PROXY_SERVER_PASSWORD=your-password

By default the proxy is used only for scraping target sites — LLM provider API calls go out directly. Routing your own LLM calls through a rotating (often residential) proxy is slower, can trip provider abuse detection, and may fail TLS. If you specifically need the LLM call proxied as well, opt in with:

PROXY_LLM_API=true

Anti-detection and rate limiting

SCRAPE_USER_AGENT accepts either a single string or a JSON array of strings to rotate through. When using a JSON array, keep it on a single line.

SCRAPE_USER_AGENT=["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ... Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) ... Safari/537.36"]
SCRAPE_VIEWPORT_WIDTH=1920
SCRAPE_VIEWPORT_HEIGHT=1080
SCRAPE_DELAY_MIN=1000          # min delay before navigation (ms)
SCRAPE_DELAY_MAX=3000          # max delay before navigation (ms)
SCRAPE_BATCH_DELAY_MIN=2000    # min delay between batch requests (ms)
SCRAPE_BATCH_DELAY_MAX=5000    # max delay between batch requests (ms)
SCRAPE_SETTLE_MAX_MS=3000      # max wait for the DOM to stop changing after load (ms); raise for slow JS sites

After load the scraper scrolls to trigger lazy/AJAX content and waits for the DOM to settle (exiting early once stable). Pages that inject content via a long setTimeout may need a higher SCRAPE_SETTLE_MAX_MS.

Retry and backoff

FIRECRAWL_RETRY_MAX_ATTEMPTS=3
FIRECRAWL_RETRY_INITIAL_DELAY=1000
FIRECRAWL_RETRY_MAX_DELAY=10000
FIRECRAWL_RETRY_BACKOFF_FACTOR=2

Usage Examples

Scrape a page

{ "name": "scrape_page", "arguments": { "url": "https://example.com" } }

Batch scrape

{
  "name": "batch_scrape",
  "arguments": {
    "urls": ["https://example.com", "https://example.org"],
    "onlyMainContent": true
  }
}

Extract with a prompt

{
  "name": "extract_data",
  "arguments": {
    "urls": ["https://example.com"],
    "prompt": "Extract the main article title and a one-sentence summary."
  }
}

Extract with a JSON Schema

{
  "name": "extract_with_schema",
  "arguments": {
    "urls": ["https://example.com"],
    "schema": {
      "type": "object",
      "properties": {
        "title": { "type": "string" },
        "description": { "type": "string" }
      }
    }
  }
}

Troubleshooting

Chrome / Chromium issues

The local image bundles Chromium. For the npx install, Chrome is downloaded on first use. If it fails:

npx puppeteer browsers install chrome
# or reset a corrupted install
rm -rf ~/.cache/puppeteer && npx puppeteer browsers install chrome

Extraction returns an error

scrape_page working but extract_data failing points to the LLM call rather than scraping. The server logs the upstream status, error code, and response body to stderr (LLM extract_data request failed: ...) and surfaces the HTTP status in the tool result. Common causes:

  • HTTP 401 — invalid LLM_API_KEY.
  • HTTP 400 — wrong LLM_MODEL, or a tuning parameter the model rejects (e.g. LLM_MAX_TOKENS above the model's limit, or LLM_REASONING_EFFORT on a non-reasoning model).
  • HTTP 429 — provider rate limit.

Container keeps restarting or is killed with SIGTERM

If the logs show the server start (listening on port 3000) and then exit with npm error signal SIGTERM, the container is being killed by a failing health check, not by the app. The node:20-alpine image does not include curl, so a curl-based health check always fails and Swarm restarts the task in a loop. Use a wget-based check (busybox provides wget):

healthcheck:
  test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1"]
  interval: 30s
  timeout: 10s
  retries: 3
  start_period: 40s

The bundled docker-compose.yml already uses this form.

Container Images

Pre-built, multi-architecture (amd64, arm64) images are published automatically on every push to main and on release:

  • Docker Hub: ariangibson/firecrawl-lite-mcp-server:latest
  • GitHub Container Registry: ghcr.io/ariangibson/firecrawl-lite-mcp-server:latest

Development

npm install        # install dependencies
npm run build      # compile TypeScript to dist/
npm run lint       # type-check without emitting
npm test           # run the unit test suite
npm start          # run the built server

Unit tests cover the pure helpers in src/utils.ts (URL validation, proxy/user-agent parsing, LLM request construction) and src/htmlToMarkdown.ts (HTML cleaning and Markdown conversion), and run in CI against Node 18, 20, and 22.

Credits

Inspired by the excellent work of the Firecrawl team at Mendable.ai and their official Firecrawl MCP Server. Firecrawl Lite is an independent, self-hosted take on the same idea — huge thanks to them for pioneering web scraping for the MCP ecosystem.

Looking for a fully managed, enterprise-grade scraping platform? Check out firecrawl.com.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选