概要
AI に Facebook と Instagram の広告を分析させます。キャンペーン、広告セット、広告、年齢、国、配置ごとの消化金額、リーチ、クリック、コンバージョンに加え、キャンペーン、クリエイティブ、オーディエンス、変更履歴を確認できます。確認のうえで、広告の一時停止や配信開始、予算の変更もできます。
ガイド付きセットアップ
Meta Ads を Microsoft Copilot に 2 分で接続
AnythingMCP Cloud の無料トライアルを始め、ガイド付きセットアップで Meta Ads を接続して、MCP URL を Microsoft Copilot に追加します。コードもサーバーの運用も不要です。
クレジットカード不要 · 7日間の試用 · セルフホストの選択肢あり
こう聞いてみよう
Meta Ads のサンプルプロンプト
プロンプトをクリックでコピー。Claude / ChatGPT / Cursor / Gemini / Copilot / OpenClaw に貼り付けて、このコネクターで実行できます。
Claude は AI のため誤ることがあります。回答をご確認ください。
💡 インストール不要? cloud.anythingmcp.com を直接利用してください。 サインインし、Connectors → Meta Ads をクリック、認証情報を貼り付け、MCP API キーを発行すれば完了です。Docker も
git cloneもローカルサーバーも不要。
Meta Ads + Microsoft Copilot
AI に Facebook と Instagram の広告を分析させます。キャンペーン、広告セット、広告、年齢、国、配置ごとの消化金額、リーチ、クリック、コンバージョンに加え、キャンペーン、クリエイティブ、オーディエンス、変更履歴を確認できます。確認のうえで、広告の一時停止や配信開始、予算の変更もできます。
前提条件
完全なセットアップ手順はコネクタ自体に組み込まれています (ストアでコネクタを選択すると表示)。必要な環境変数:
META_ADS_ACCESS_TOKEN, META_ADS_ACCOUNT_ID
ステップ 1 — 認証情報を取得
https://developers.facebook.com/apps/creation/を開き、ユースケース Create & manage ads with Marketing API でアプリを作成して、ビジネスポートフォリオに接続します。これでアプリにads_read、ads_management、business_managementの権限が追加されます。- おすすめは有効期限のないトークンです。Business Settings(
https://business.facebook.com/settings)で Users → System users を開き、システムユーザーを追加します(ロールは Admin、読み取り専用なら Employee)。Assign assets で広告アカウントを割り当てます(Manage campaigns、読み取り専用なら View performance)。Generate token をクリックしてアプリを選び、有効期限に Never を選んでads_readにチェックを入れます。ステータスや予算を変更する場合はads_managementも選びます。Meta から先にビジネスポートフォリオの認証(Business Settings → Security Center)を求められることがあります。それが済むまではステップ 3 のトークンを使ってください。 - テスト用のより手早い方法: Graph API Explorer(
https://developers.facebook.com/tools/explorer/)でアプリを選び、ads_readとads_managementを付けた User Token を取得します。このトークンは 1 から 2 時間で切れるため、Access Token Debugger(https://developers.facebook.com/tools/debug/accesstoken)で開いて Extend Access Token をクリックし、60 日間有効なトークンにします。 - トークンを
META_ADS_ACCESS_TOKENに貼り付けます(EAで始まります。Bearer という語は付けずに貼り付けてください)。広告アカウント ID はact_を付けてMETA_ADS_ACCOUNT_IDに入力します(例:act_1234567890)。番号は Ads Manager のアドレスバーに表示されます(act=1234567890)。 - コネクターをインストールし、
meta_ads_list_ad_accountsを実行します。トークンでアクセスできるすべての広告アカウントが、ステータス、通貨、タイムゾーンとともに表示されます。
アクセスレベル: 新しいアプリは Limited access(旧 Standard)です。自社ビジネスの広告アカウントにはこれで足りますが、レート制限が厳しくかかります。他社の広告アカウントには、App Review を経た Full access(旧 Advanced)が必要です。Require App Secret(App settings → Advanced)はオフのままにしてください。オンにすると、Meta がコネクターの呼び出しを拒否します。
必ず先に確認します: meta_ads_update_status はキャンペーン、広告セット、広告の一時停止や配信開始を行い、meta_ads_update_budget は 1 日の予算または通算予算を変更します。どちらもすぐに反映され、広告費に影響します。配信開始で費用が発生し始め、一時停止で配信が止まります。AI は対象(名前と ID)、現在の値と新しい値を示し、あなたの承認を待ちます。広告が配信されるのは、広告、その広告セット、そのキャンペーンがすべて ACTIVE のときだけです。予算はアカウント通貨の最小単位による整数です(2000 は 20.00 EUR)。JPY や KRW などの通貨には補助単位がありません。
読み取れるデータ: 広告アカウント、キャンペーン、ターゲティングを含む広告セット、配信されない理由付きの広告、クリエイティブ、カスタムオーディエンスと類似オーディエンス、変更履歴(誰がいつ何を変更したか)、パフォーマンスです。インサイトでは、アカウント全体または個別のキャンペーン、広告セット、広告について、過去 7 日間や先月などの定型期間、または最大 37 か月前までの任意の日付で、消化金額、リーチ、クリック、コンバージョンを確認でき、必要に応じて日別にし、年齢、性別、国、地域、配置ごとに分けられます。
よくあるエラー: 190: トークンが無効か期限切れです。新しいトークンを作成してください。10 または 200 から 299: 権限が不足しているか(294 は ads_management の不足)、トークンにこの広告アカウントへのアクセス権がありません。100: パラメーターが誤っています。サブコード 1487534 の場合はリクエストが大きすぎるので、期間を短くするか内訳を減らしてください。4、17、613、80000、80004 はレート制限です。数分待ってください。
このコネクターは何も作成しません。キャンペーン、広告セット、広告、クリエイティブ、オーディエンスの作成や編集、メディアのアップロード、リード獲得フォーム、ピクセル、Conversions API の管理は行いません。
ステップ 2 — アダプターをインストール
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
ステップ 3 — Microsoft Copilot にコネクタを追加
サーバーURL: AnythingMCP で MCP Servers を開き、このコネクタがあるサーバーを選んで URL(
https://cloud.anythingmcp.com/mcp/…)をコピーします。このガイドでYOUR_SERVER_IDと表示されている箇所に使ってください。
Microsoft Copilot は、Copilot Studio で作成したエージェントを通じて MCP サーバーを使います。AnythingMCP をツールとしてエージェントに追加し、そのエージェントを Microsoft 365 Copilot と Teams に公開します。Copilot Studio は Microsoft のクラウドから Streamable HTTP で接続し、AnythingMCP はこれに対応しています。
- Copilot Studio でエージェントを開き(または新規作成し)、Tools で Add a tool → New tool → Model Context Protocol を選びます。
- Server name(例:
AnythingMCP)、コネクタでできることを説明する Server description、Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_IDを入力します。Copilot Studio はこの説明をもとに、いつサーバーを呼び出すかを判断します。 - 認証で API key を選び、Type を Header、ヘッダー名を
X-API-Keyにして Create を選びます。 - Add tool で Create a new connection を選び、AnythingMCP の MCP API キー(MCP Servers → 対象のサーバー → API keys)を貼り付けて Add to agent を選びます。
- エージェントの Test ウィンドウで試します。
Meta Adsのツールが必要になる依頼をしてみましょう。 - Publish を選び、Channels → Microsoft 365 and Microsoft Teams で Make agent available in Microsoft Copilot を選択したまま Add channel を選びます。See agent in Teams で自分用にインストールされます。Microsoft 365 Copilot では @ を入力してエージェントを選びます。
ユーザーごとにサインインさせたい場合は、API キーの代わりに OAuth 2.0 → Dynamic discovery を選びます。各ユーザーは、エージェントが初めて呼び出すときに AnythingMCP にサインインします。
セルフホストの場合は、https://cloud.anythingmcp.com の代わりにインスタンスの公開 HTTPS アドレスを使ってください。Copilot Studio は Microsoft のクラウドから接続するため、localhost は使えません。
利用可能なツール
| Tool | What it does |
|---|---|
meta_ads_list_ad_accounts | List the ad accounts the token can reach, with id (act_...), name, account_status (1 active, 2 disabled, 3 unsettled, 7 pending risk… |
meta_ads_get_ad_account | Read the ad account in META_ADS_ACCOUNT_ID: name, status, currency, time zone, amount spent, balance, spend cap and minimum daily budget |
meta_ads_list_campaigns | List the campaigns of the ad account with name, status and effective_status, objective, daily or lifetime budget (minor currency unit), bid… |
meta_ads_get_campaign | Read one campaign by id: name, status, effective_status, objective, budgets, bid strategy, special ad categories and schedule |
meta_ads_list_ad_sets | List the ad sets of the ad account with campaign_id, status, budgets, bid strategy, billing event, optimization goal, targeting and schedule |
meta_ads_list_campaign_ad_sets | List the ad sets of one campaign with status, budgets, optimization goal, targeting and schedule |
meta_ads_get_ad_set | Read one ad set by id: campaign, status, budgets, bid strategy and amount, billing event, optimization goal, full targeting spec and… |
meta_ads_list_ads | List the ads of the ad account with ad set, campaign, status, effective_status, creative id and issues_info (why an ad does not deliver) |
meta_ads_list_ad_set_ads | List the ads of one ad set with status, effective_status, creative and issues_info |
meta_ads_get_ad | Read one ad by id: name, ad set, campaign, status, effective_status, creative and issues_info |
meta_ads_get_account_insights | Performance of the whole ad account for a period: impressions, reach, frequency, clicks, CTR, CPC, CPM, spend, actions (conversions by… |
meta_ads_get_insights | Performance of one campaign, ad set or ad for a period, with the same metrics, periods, breakdowns and levels as… |
meta_ads_list_ad_creatives | List the ad creatives of the ad account with name, title, body, call to action, link, image and thumbnail URLs, video id and the object… |
meta_ads_get_ad_creative | Read one ad creative by id (meta_ads_get_ad shows the creative id of an ad): texts, call to action, link, image and thumbnail, video and… |
meta_ads_list_custom_audiences | List the custom and lookalike audiences of the ad account with subtype (CUSTOM, WEBSITE, LOOKALIKE, ENGAGEMENT and others), approximate… |
meta_ads_list_account_activities | Change history of the ad account: who changed what and when (event_type such as update_campaign_run_status or update_ad_set_budget… |
meta_ads_update_status | Pause or activate a campaign, ad set or ad |
meta_ads_update_budget | Change the daily or lifetime budget of a campaign (with campaign budget) or of an ad set (with ad set budgets) |
プロンプトの例
- 「先月 Facebook と Instagram でいくら使いましたか。購入単価が最も低かったキャンペーンはどれですか。」
- 「過去 30 日間の消化金額とクリックを、年齢、性別、配置ごとに分けて見せてください。」
- 「今配信されていない広告はどれですか。その理由も教えてください。」
- 「成果が最も良いキャンペーンの 1 日の予算を 20% 上げてください。ただし変更する前に、現在の予算と新しい予算を見せてください。」
FAQ
どの Copilot が対象ですか? 職場で使う Microsoft 365 Copilot で、Copilot Studio のエージェントを通じて利用します。個人アカウント向けの Microsoft Copilot アプリでは、独自の MCP サーバーを追加できません。
何が必要ですか? エージェントを作成するために、Copilot Studio を利用できる職場アカウント(ライセンスまたは試用版)が必要です。Microsoft 365 Copilot や Teams でエージェントを使う人には、エージェントへのアクセス権が必要です。共有するか、管理者に組織向けに公開してもらってください。組織が Power Platform コネクタにデータ ポリシーを適用している場合は、MCP サーバーにも適用されます。
エージェントがツールを呼び出しません。 ヘッダー名が正確に X-API-Key であること、キーが URL と同じ MCP サーバーのものであることを確認し、Server description を具体的に書いてください。Copilot Studio はこの説明をもとにサーバーを呼び出すかどうかを判断します。変更のたびにエージェントを再公開し、開いているチャットでは "start over" と入力すると新しいバージョンになります。
次のステップ
このガイドは役に立ちましたか?