MCP & remote tools

Give an MCP server a fetch tool that cannot reach your cloud

An MCP server is a request executor for clients you do not control. The moment one of its tools takes a URL from the model, that URL is attacker input — Backfire keeps the fetch bounded, attributable and logged.

Where it goes wrong

Tool definitions are quick to write and hard to make safe: check the scheme, resolve the host, reject private ranges, cap the body, enforce a timeout, then repeat all of it for every redirect. Most servers skip half of that and ship a thin fetch() wrapper instead.

What Backfire handles

  • One tool covers JSON APIs, feeds, HTML and binary downloads.
  • Private, loopback, link-local and cloud-metadata ranges are refused before a socket opens.
  • Redirects come back with their location header, so the server cannot be walked into an internal service.
  • Every tool call lands in an activity log with target, status, byte counts and duration.

The request

example
// one tool, one guarded outbound path
async function fetchUrl(args) {
  const res = await fetch('https://backfireapi.base44.app/functions/forward', {
    method: 'POST',
    headers: {
      Authorization: `Bearer ${process.env.BACKFIRE_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ url: args.url, method: 'GET', timeout_ms: 8000 }),
  });

  const envelope = await res.json();
  if (!envelope.ok) return { isError: true, code: envelope.error.code };
  return { content: [{ type: 'text', text: JSON.stringify(envelope.body) }] };
}

All use cases

Questions about this

Keep reading

Try it with 5,000 free trips.

No card, no subscription, and the balance never expires.