# Fbc Guard

> Fbc Guard is an open-source MCP server for marketing and seo. Static checks for Meta fbclid and _fbc cookie code that cause modified click ID warnings. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://adsandcode.com/en/open-source/fbc-guard/
- **Repository:** https://github.com/adsandcode/fbc-guard
- **MCP Registry name:** io.github.adsandcode/fbc-guard
- **Categories:** marketing and SEO, developer tools
- **Listing updated:** 2026-11-15

## About

One wrong line in landing-page cookie code can send a conversion to the wrong ad. This checker reads source text only, runs nothing and sends nothing to Meta, then tests it against seven rules, each tagged as stated by Meta, derived, or observed in practice.

The rules: a new fbclid must overwrite an older _fbc cookie; do not decode, lowercase or truncate the click ID; creationTime for _fbc and _fbp must be milliseconds, not seconds; and subdomainIndex should not be hard-coded, which is a warning only. Results are pass, fail, unknown or not_applicable, with exit codes for CI.

Two tools exist: check_fbc_code for pasted code and check_fbc_url, which fetches a public page plus its same-origin scripts. The README is candid that a pass means no known mistake was found in recognised shapes. Minified or runtime-built code can hide problems, and Meta does not document what triggers the diagnostic. MIT licensed, Node 18+.

## Features

- **Seven rules:** Cover overwrite, decoding, case, truncation, units and index.
- **URL checking:** Fetches a page and same-origin scripts.
- **Cites basis:** Each rule says whether Meta states it.
- **CI exit codes:** Usable before a deploy.
- **Startup selftest:** Refuses to run if its controls fail.
- **Library export:** Importable without starting the server.

## Good for

- Review tracking code an assistant just wrote
- Diagnose a modified fbclid warning
- Gate deploys on click ID handling
- Check a landing page and its scripts

## Install

### Claude Code (Terminal)

```sh
claude mcp add fbc-guard -- npx -y mcp-server-fbc-guard
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "fbc-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-fbc-guard"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "fbc-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-fbc-guard"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "fbc-guard": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-fbc-guard"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "fbc-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-fbc-guard"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "fbc-guard": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-server-fbc-guard"
      ]
    }
  }
}
```

## Tools

- `check_fbc_code`: Runs every rule on HTML or JavaScript you pass.
- `check_fbc_url`: Fetches a page and same-origin scripts, then runs every rule.

## FAQ

### Does it run my code?

No, it is static analysis of source text.

### Does a pass mean the code is correct?

No, only that known mistakes were not found.

### Does it contact Meta?

No.

### What does it need?

Node.js 18 or later.

### Is Fbc Guard free?

Yes. Fbc Guard is open source, so you can use and self-host it for free.

### How do I add Fbc Guard to Claude Code?

Run this command in your terminal: claude mcp add fbc-guard -- npx -y mcp-server-fbc-guard

### What are the best alternatives to Fbc Guard?

The closest alternatives to Fbc Guard are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.

---
Source: https://ai-powered.com/mcp/fbc-guard
