fbdl-mcp
fbdl-mcp
MetaのFBDL(Facebook Developer Language)用MCPサーバー。AIエージェントがMetaのバグ報奨金プログラム(MMBRC)で使用されるFBDLスクリプトを生成、検証、探索できるようにします。
認証は不要です。FBDLはテキスト形式です。このサーバーはローカルで実行され、Metaのインフラストラクチャと通信することはありません。
機能
validate_fbdl -- FBDLスクリプトを解析および検証します。未知のエンティティ/アクション、必須パラメータの欠落、無効な列挙値、不正な構文を検出します。
list_entities -- すべてのセットアップエンティティタイプ(User、Page、Group、Album、Friendship、Business、App、Event)をパラメータと例とともに閲覧します。
list_actions -- 70以上のすべてのFBDLアクションをシグネチャ、パラメータ、例とともに閲覧します。名前やカテゴリでフィルタリング可能です。
explain_fbdl -- FBDLスクリプトを平易な英語のステップバイステップの説明に変換します。
generate_fbdl (prompt) -- 呼び出し元のLLMに完全なFBDL文法を提供し、自然言語から有効なスクリプトを生成できるようにするプロンプトテンプレートです。
Related MCP server: mcp-meta-marketing
Claude Codeスキル(MCPサーバー不要)
このリポジトリには、MCPサーバーなしで動作するスタンドアロンのClaude Codeスキルが含まれています。.claude/skills/ディレクトリを任意のプロジェクトにコピーしてください:
cp -r /path/to/fbdl-mcp/.claude/skills/ your-project/.claude/skills/利用可能なスキル:
/generate-fbdl-- 自然言語からFBDLスクリプトを生成します。完全な文法リファレンスを埋め込んでいるため、Claudeは直接有効なスクリプトを作成できます。/validate-fbdl-- 文法に基づいてFBDLスクリプトを検証します。構造、エンティティ、アクション、参照チェックの完全なチェックリストが含まれています。
これらのスキルはFBDL仕様全体をプロンプトコンテキストとして埋め込むため、サーバー、依存関係、ビルドステップは不要です。
インストール
git clone <repo-url> && cd fbdl-mcp
npm install
npm run buildすべてが動作することを確認します:
npm run check # typecheck + lint + format + testsClaude Codeでのセットアップ
Claude CodeのMCP設定(~/.claude/settings.json またはプロジェクトの .claude/settings.json)に追加します:
{
"mcpServers": {
"fbdl": {
"command": "node",
"args": ["/absolute/path/to/fbdl-mcp/dist/server.js"]
}
}
}その後、Claude Codeで以下のように指示できます:
"Generate an FBDL script where two users are friends, one owns a page, the other posts a photo and gets blocked"
"Validate this FBDL script: [setup] User UserOne Page PageOne with {owner: UserOne}"
"What FBDL actions are available for groups?"
OpenAI Codex / エージェントでのセットアップ
CodexやMCP互換のエージェントの場合は、サーバーバイナリを指定します:
node /absolute/path/to/fbdl-mcp/dist/server.jsサーバーはMCPプロトコルを使用してstdio経由で通信します。以下を公開します:
4つのツール:
validate_fbdl,list_entities,list_actions,explain_fbdl1つのリソース:
fbdl://reference(Markdown形式の完全な言語仕様)1つのプロンプト:
generate_fbdl(NL-to-FBDLプロンプトテンプレート)
AGENTS.md スニペット
エージェントフレームワークがツール検出に AGENTS.md を使用している場合は、以下を追加してください:
## FBDL MCP Server
Tools for working with Meta's FBDL (Facebook Developer Language) scripts:
- Use `validate_fbdl` after generating a script to check it for errors
- Use `list_entities` and `list_actions` to discover available FBDL constructs
- Use `explain_fbdl` to understand what an existing script does
- Use the `generate_fbdl` prompt to produce scripts from natural language
The server runs on stdio. Start with: `node /path/to/fbdl-mcp/dist/server.js`ワークフロー例
エージェントが「ページ管理者がグループメンバーをブロックするテストシナリオを作成して」という指示を受け取る
エージェントが
list_entitiesを呼び出し、必要なセットアップを確認するエージェントが
category: "block"を指定してlist_actionsを呼び出し、適切なアクションを見つけるエージェントが
generate_fbdlプロンプトを使用して以下を生成する:
[setup] User OwnerOne User MemberOne Page PageOne with {owner: OwnerOne} Group GroupOne with {owner: OwnerOne, privacy: private, members: [MemberOne]}
OwnerOne as PageOne block MemberOneエージェントが
validate_fbdlを呼び出し、スクリプトが正しいことを確認する研究者がスクリプトをMetaのMMBRCプラットフォームに貼り付ける
FBDLクイックリファレンス
セットアップブロック
[setup] Type Label [with {key: value, ...}] [Type Label ...]エンティティタイプ: User, Page, Group, Album, Friendship, Business, App, Event
アクション行
Subject [as VoiceSwitcher] action_name Label [with {key: value, ...}]ボイススイッチャー (as) を使用すると、ユーザーは自分が所有するページとして行動できます。
ルール
すべてのエンティティは、アクションで使用する前にセットアップで作成する必要があります
セットアップブロックは
[setup]で始まる1行です各アクションは独立した行に記述します
ラベルはPascalCaseであり、一意である必要があります
開発
npm run build # compile TypeScript
npm run test # run tests
npm run lint # eslint with strict TypeScript rules
npm run format # prettier
npm run check # all of the aboveプロジェクト構造
src/
schema.ts # FBDL language spec as typed data (entities + actions)
validator.ts # FBDL script parser and validator
server.ts # MCP server (tools, resources, prompts)
__tests__/
schema.test.ts # Schema integrity tests
validator.test.ts # Validator correctness tests
server.test.ts # MCP tool integration testsThis server cannot be deployed
Maintenance
Related MCP Connectors
Official DevSpeak MCP server — translate technical text into formal specs from any AI IDE or agent
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceUnofficial MCP server implementation for Facebook Business API. Enables LLMs to manage ad campaigns and ads via natural language.2MIT
- FlicenseAqualityDmaintenanceMCP server that wraps the Meta Marketing API (Graph API v25.0) as semantic tools for LLM agents.181-
- AlicenseNot gradedqualityDmaintenanceMulti-language SAST and AI-powered fuzzing MCP server for Claude Code integration, enabling static and dynamic security analysis of code.MIT
- FlicenseAqualityCmaintenanceMCP server that wraps Meta's Messenger Platform, Instagram Messaging, and comment moderation APIs as semantic tools for LLM agents to read inbox, reply, and moderate comments.16-