MentionFox
FoxEdge Install

Install FoxEdge — 60 seconds, then ChatGPT, Claude, and Perplexity see your enhanced site.

Drop-in middleware for Cloudflare, Vercel, Next.js, and Express. Detects AI-agent visits, logs them, and (next week) serves them enhanced HTML — while humans and Googlebot see your site exactly as before.

What FoxEdge is NOT

Phase 1 (today): we log AI agent visits.

Right after install, every GPTBot / ClaudeBot / PerplexityBot visit lands in your bot_visits dashboard with timestamp, path, and bot key. No other behavior changes — your site responds exactly as before.

Phase 2 (next week): we serve enhanced HTML.

When MentionFox flips FOXEDGE_WIRE_ENABLED for your domain, the same middleware automatically starts serving rewritten HTML to AI agents — better citations, cleaner schema, more accurate facts. No re-install, no code change. Humans still see your unchanged site.

Cloudflare Worker

Best if your DNS is on Cloudflare. The worker sits in front of your origin globally; rollback is one click (delete the route).

1Create the worker

Cloudflare dashboard → Workers & Pages → Create application → Create Worker. Name it foxedge-mentionfox. Replace the default code with the snippet below.

// Download the full file at:
// https://mentionfox.com/foxedge/cloudflare-worker.js
//
// Or run:
//   curl https://mentionfox.com/foxedge/cloudflare-worker.js -o worker.js
//
// Then paste the file's contents into your Cloudflare Worker editor.
//
// Detects 20 LLM-bot User-Agents (GPTBot, ClaudeBot, PerplexityBot,
// Google-Extended, Bytespider, etc.). Logs visits to bot_visits.
// Phase 2 wire-up is automatic when MentionFox enables it for your
// domain. No re-install needed.

Download the full cloudflare-worker.js file →

2Set BOTSIGHT_TOKEN

Workers & Pages → foxedge-mentionfox → Settings → Variables and Secrets. Add a Secret named BOTSIGHT_TOKEN. Paste your token from the FoxEdge dashboard.

Where to get the token: /dashboard/geofixer → FoxEdge tab → Install token. (If you don't have one yet, the trial signup creates one.)
3Add a route

Workers & Pages → foxedge-mentionfox → Triggers → Routes. Add yourdomain.com/* (or *yourdomain.com/* for all subdomains).

4Verify
curl -A "GPTBot/1.0" -I https://yourdomain.com/
# Look for: x-edgeoptimize-request-id and x-edgeoptimize-bot-detected: 1

curl -A "Mozilla/5.0" -I https://yourdomain.com/
# Those headers should NOT appear — humans pass through unchanged.

Vercel Edge Middleware

For Vercel deployments without Next.js (Vite, Astro, plain static, SvelteKit). Same logic as the Cloudflare Worker, runs in Vercel Edge Runtime.

1Add middleware.ts

Save the file at your project root. If you already have a middleware.ts, see chaining instructions in the file header — do NOT overwrite.

// Download the full file at:
// https://mentionfox.com/foxedge/vercel-middleware.ts
//
// Save as middleware.ts at your project root (NOT inside pages/ or app/).
//
// Same LLM allowlist as the Cloudflare worker. Reads BOTSIGHT_TOKEN
// from process.env. Includes a runFoxEdge() helper for chaining
// with an existing middleware.ts.

Download the full vercel-middleware.ts file →

2Set BOTSIGHT_TOKEN

Vercel dashboard → your project → Settings → Environment Variables. Add BOTSIGHT_TOKEN for Production and Preview.

Where to get the token: /dashboard/geofixer → FoxEdge tab → Install token.
3Redeploy and verify
curl -A "GPTBot/1.0" -I https://yourdomain.com/
# Look for: x-edgeoptimize-request-id and x-edgeoptimize-bot-detected: 1

Next.js

npm package with auto-composing middleware.ts and an optional withFoxEdge() wrapper for next.config.js.

1Install the package
npm install @mentionfox/foxedge-middleware
2Add middleware.ts

At your project root (sibling of next.config.js):

import { foxEdgeMiddleware } from '@mentionfox/foxedge-middleware/next';

export const config = {
  matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],
};

export default foxEdgeMiddleware({
  token: process.env.BOTSIGHT_TOKEN!,
});
3Set BOTSIGHT_TOKEN env var

In your .env.local for dev, and in Vercel → Project Settings → Environment Variables for production.

Where to get the token: /dashboard/geofixer → FoxEdge tab → Install token.
4Verify
curl -A "GPTBot/1.0" -I https://yourdomain.com/
# Look for: x-edgeoptimize-request-id and x-edgeoptimize-bot-detected: 1

Express / Node.js

Standard Express middleware for Node.js apps not on Vercel or Cloudflare.

1Install the package
npm install @mentionfox/foxedge-middleware
2Wire it up

Mount BEFORE your routes. The middleware only intercepts requests that match the LLM allowlist; everything else passes through to next().

import express from 'express';
import { foxEdgeMiddleware } from '@mentionfox/foxedge-middleware/express';

const app = express();

// Mount BEFORE your routes:
app.use(foxEdgeMiddleware({
  token: process.env.BOTSIGHT_TOKEN!,
}));

// ... your routes below ...
app.get('/', (req, res) => res.send('<h1>hello</h1>'));

app.listen(3000);
3Set BOTSIGHT_TOKEN

Add to your .env (loaded via dotenv) or your hosting provider's env-var UI (Railway, Render, Fly, etc.).

Where to get the token: /dashboard/geofixer → FoxEdge tab → Install token.
4Verify
curl -A "GPTBot/1.0" -I https://yourdomain.com/
# Look for: x-edgeoptimize-request-id and x-edgeoptimize-bot-detected: 1

FoxEdge is included in GEOFixer Autopilot.

Pro / Agency / Enterprise · 5-day free trial regardless of tier.

See pricing Get my install token

Already a customer? Your token lives at /dashboard/geofixer → FoxEdge tab.