Skip to main content
Glama
tkorkmazeth

toolgate-firecrawl-mcp

by tkorkmazeth

toolgate-firecrawl-mcp

A recoverable Firecrawl MCP server powered by Toolgate.

Every paid scrape goes through a full lifecycle: balance check → execute → charge → trace. If it fails, you get a refund or fallback — never a silent loss.


What happens when you scrape

Agent calls scrape_url
  → Toolgate checks idempotency (duplicate? return cached)
  → Toolgate checks balance (enough? deduct $0.10)
  → Firecrawl scrapes the URL (JS-rendered, clean markdown)
  → On success: charge confirmed, trace saved
  → On failure: refund issued, trace saved with reason
  → On no balance: fallback (fetch+cheerio metadata) returned free

Related MCP server: webcrawl-mcp

Quick Start

Install & run (demo mode — no API key needed)

npm install
npm run dev

Demo mode uses fetch+cheerio as the scraping backend. scrape_url and balance tools work out of the box. No Firecrawl credits consumed.

Claude Desktop — demo mode

{
  "mcpServers": {
    "toolgate-firecrawl": {
      "command": "node",
      "args": ["/path/to/toolgate-firecrawl-mcp/dist/server.js"],
      "env": {
        "TOOLGATE_DEMO_MODE": "true"
      }
    }
  }
}

Claude Desktop — production (real Firecrawl)

{
  "mcpServers": {
    "toolgate-firecrawl": {
      "command": "node",
      "args": ["/path/to/toolgate-firecrawl-mcp/dist/server.js"],
      "env": {
        "FIRECRAWL_API_KEY": "fc-your-key-here"
      }
    }
  }
}

Tools

Tool

Price

Description

scrape_url

$0.10/call

Scrape a URL → clean markdown. Fallback: basic metadata free.

web_search

$0.01/result (min $0.05)

Web search via Firecrawl. Requires API key.

extract_data

$0.15/call

Structured JSON extraction with schema. Requires API key.

check_balance

free

Check your current Toolgate balance.

add_balance

free

Add demo balance (demo mode only).

view_traces

free

View recent execution traces with decisions and charge status.


Demo

npm run scenario

Example output:

{
  "passed": 6,
  "failed": 0,
  "skipped": 2,
  "scenarios": [
    { "name": "url_validation_ssrf", "passed": true },
    { "name": "payment_missing_fallback", "passed": true },
    { "name": "credit_balance", "passed": true },
    { "name": "paid_scrape", "passed": true },
    { "name": "duplicate_request", "passed": true },
    { "name": "unreachable_url", "skipped": true, "reason": "network" },
    { "name": "free_tier_not_applicable", "passed": true },
    { "name": "trace_output", "passed": true }
  ]
}

How Toolgate works here

Toolgate wraps every Firecrawl call with a payment lifecycle. Each call gets an idempotency key — retrying with the same key returns the cached result at no extra cost. If the Firecrawl call fails after payment was deducted, the charge is automatically refunded. Every decision is recorded in a queryable execution trace.


Environment Variables

Variable

Default

Description

FIRECRAWL_API_KEY

Firecrawl API key. Omit for demo mode.

FIRECRAWL_API_URL

https://api.firecrawl.dev

Firecrawl API base URL.

TOOLGATE_PUBLISHER_KEY

tg_firecrawl_demo

Toolgate publisher key.

TOOLGATE_DEMO_MODE

true if no API key

Force demo mode.

TOOLGATE_PRELOAD_BALANCE

1.0 (demo only)

USD pre-loaded in demo mode.

SCRAPE_TIMEOUT_MS

15000

Timeout for scrape requests.

MAX_RESPONSE_BYTES

5242880 (5MB)

Max response size.


Built with


License

MIT

Available Tools

4 tools
add_balanceA

Add demo balance to your Toolgate account (demo mode only).

ParametersJSON Schema
NameRequiredDescriptionDefault
amountYesAmount in USD to add (e.g. 1.0)

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It discloses the mutating action and the demo mode constraint. It could detail side effects or return behavior, but for a straightforward addition, this is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, no extraneous words, front-loaded with key action and constraint. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers purpose and constraint. No output schema exists, but for a simple add operation, return is implicit. Minor gap: could state if it returns new balance or success, but not essential.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% (amount parameter has a clear description). The tool description adds no further parameter details, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Add', the resource 'demo balance', and the context 'to your Toolgate account (demo mode only)'. It distinguishes from sibling tools like check_balance, scrape_url, and view_traces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly limits usage to 'demo mode only', guiding the agent to use it only in that context. It doesn't mention alternatives or when not to use, but for a simple, single-purpose tool this is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_balanceA

Check your current Toolgate balance for this MCP session.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description only states it checks balance, which implies read-only behavior. Could mention idempotency or no side effects for completeness.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded with key info, no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Simple tool with no output schema; description fully explains what it does—check current balance for the session.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist; schema coverage is 100%. Baseline score of 4 per guidelines for 0-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states verb 'check' and resource 'balance', distinguishing it from siblings: add_balance (modify), scrape_url (external fetch), view_traces (logs).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternatives, but the purpose is straightforward and implicit from the tool name and siblings. Not misleading.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

scrape_urlA

Scrape a URL and return its markdown content. Paid via Toolgate — includes idempotency, fallback, and refund on failure. [Pricing: $0.1/call] [Has free basic mode]

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to scrape (must be a public http/https URL).
requestIdNoOptional stable idempotency key. Re-using the same requestId returns the cached result without a new charge.

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses payment model, idempotency key, fallback, and refund on failure. No annotations exist, so description carries full burden; covers key behaviors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with main purpose, pricing in brackets. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema, but description clarifies output is markdown content. Covers pricing and idempotency. Could mention return format or errors but adequate for a simple tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions. Description adds meaning: explains requestId as idempotency key that caches and avoids charge, url as public HTTP/HTTPS.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states verb (scrape), resource (URL), and output (markdown content). Distinct from siblings which are financial tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides pricing, idempotency, fallback, and refund info. Does not explicitly state when to use vs alternatives, but siblings are unrelated, so context is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

view_tracesA

View recent Toolgate execution traces for this session (lifecycle, decisions, charge status).

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMax traces to return (default 20)
caller_idNoFilter by caller ID

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so description must disclose behavioral traits. It does not state that the tool is read-only or has no side effects. It only lists what is shown, leaving the agent to infer safety.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with front-loaded action. No unnecessary words or repetition. Efficient for agent parsing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read tool with two optional parameters and no output schema, description is adequate but could be more complete. It does not mention return format or if output is structured, leaving some ambiguity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description adds no extra meaning beyond schema; it does not explain caller_id context or retrieval method. Baseline is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description uses specific verb 'View' and resource 'recent Toolgate execution traces', with scope 'for this session' and includes fields 'lifecycle, decisions, charge status'. It clearly distinguishes from siblings (add_balance, check_balance, scrape_url) which have unrelated purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description implies usage ('for this session') but does not explicitly state when to use or when not to use. No alternatives or exclusions are mentioned. Siblings are distinct, but guidance on context is missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0-alpha.0
    • First observedadd_balance
    • First observedcheck_balance
    • First observedscrape_url
    • First observedview_traces

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a distinct purpose: adding demo balance, checking balance, scraping URLs, and viewing traces. No overlaps or ambiguous boundaries.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (add_balance, check_balance, scrape_url, view_traces), making them predictable and easy to understand.

Tool Count5/5

With 4 tools covering balance management, scraping, and tracing, the count is well-scoped for a focused MCP server without unnecessary bloat.

Completeness4/5

The tool set covers core operations (balance add/check, scrape, view traces). Minor gap: no tool for configuring or resetting the session, but not critical for the demo purpose.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tkorkmazeth/toolgate-firecrawl-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server