Metaads MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Metaads MCP or direct API to create campaigns, pull ad performance data, update budgets, and generate custom reports through natural language.

Metaads logoMetaads
Oauth2Api Key

Metaads is Meta's official Ads API that lets you manage, analyze, and optimize your Facebook and Instagram ad campaigns. Streamline ad operations and gain deeper insights with robust automation.

93 Tools

Try Metaads now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Metaads
Try asking
TOOLS

Supported Tools

Every Metaads action and event your agent gets out of the box.

Copy Ad Object

Copy a Meta Campaign, Ad Set, or Ad while explicitly selecting its resource type and supported copy options.

Create Ad

Create a new ad within an ad set using the Meta Marketing API, with image, video, or carousel creative content.

Create Ad Creative

Create a new ad creative using the Meta Marketing API.

Create Ad Set

Create a new ad set within a campaign using the Meta Marketing API.

Create Ad Study

Create a Meta A/B test or other ad study under a business, including its cells and tested ad entities.

Create Ad Video

Upload an ad video asset; Meta may keep processing it after returning its ID.

Create Campaign

Create a new advertising campaign using the Meta Marketing API.

Create Custom Audience

Create a new custom audience using the Meta Marketing API.

Create Custom Conversion

Create a persistent custom-conversion definition in a Meta ad account and return its ID.

Create Lead Form

Create a persistent lead-generation form owned by a Facebook Page and return its ID.

Delete Ad Object

Delete an Ad Set, Ad, or Ad Creative by ID; the supplied object type is not verified, so the ID determines the object targeted.

Delete Campaign

Delete an advertising campaign using the Meta Marketing API.

Estimate Ad Delivery

Estimate monthly audience delivery for targeting and optimization settings in a Meta ad account.

Estimate Targeting Reach

Estimate the audience-size range for a Meta ad account and structured targeting specification containing at least one country.

Generate Ad Previews

Render previews for a provider-native creative specification in a Meta ad account and return the generated HTML bodies.

Get Ad Accounts

Retrieve one page of directly assigned ad accounts for the authenticated user, including account IDs, names, and other requested account details.

Get Ad Creative

Get Ad Creative

Get Ad Preview

Render a placement-specific preview for an existing Meta Ad or Ad Creative.

Get Ad Study

Get one Meta ad study by ID, including projected cells and timing.

Get Current Meta App

Return selected metadata for the Meta application associated with the connected access token.

Get Insights

Get insights data for a Meta Ads object (ad account, campaign, ad set, or ad) using the Meta Marketing API.

Get Multiple Meta Objects

Retrieve selected fields for up to 50 distinct Meta Marketing API objects.

Get Meta Object

Retrieve data for a Meta Marketing API object by numeric ID, an act_-prefixed numeric ID, or me.

Get Page Accounts

Retrieve pages managed by the authenticated user, including page access tokens when requested.

Get Pixel Event Stats

Read recent Pixel event-count and processing statistics, optionally restricted to server events and one event name, to verify aggregate ingestion.

Get User

Tool to retrieve information about the authenticated user from Meta (Facebook) Graph API.

List Activities

List activity history for a Meta ad account or ad set.

List Ad Account Pixels

List the Pixels and consolidated datasets associated with an ad account so a usable data-source ID can be selected for Conversions API events.

List Ad Account Recommendations

Return one page of Meta recommendations for an advertising account.

List Ad Creatives

List one page of ad creatives under a Meta Ads account to view or analyze creative assets.

List Ad Images

List one page of image assets in a Meta ad account, optionally restricted to exact image hashes.

List Ad Network Analytics

Tool to retrieve ad network analytics for a Meta Business using the Meta Marketing API.

List Ad Network Analytics Results

Tool to retrieve ad network analytics results for Facebook Audience Network.

List Ad Rule History

Return one page of historical changes and executions for a Meta Automated Rule.

List Ads

List a page of ads under a Meta ad account, with optional selection of returned fields.

List Ad Studies

List one page of A/B tests and other ad studies owned by a Meta business, including projected cells.

List Ad Videos

List one page of video assets in a Meta ad account, optionally filtered by title, dimensions, duration, or aspect ratio.

List Agencies

Tool to retrieve agencies associated with a Meta Business or Ad Account.

List Assigned Pages

Tool to retrieve Facebook Pages assigned to a business user via Meta Marketing API.

List Assigned Users

Tool to list users assigned to a Facebook Page or Ad Account within a specific business context.

List Business Ad Accounts

Retrieve a page of ad accounts owned by a specific Business Manager, including account IDs, names, and status.

List Businesses

List a page of Business Managers accessible to the authenticated Meta principal via /me/businesses.

List Business Invoices

Tool to retrieve business invoices from Meta Marketing API.

List Business Users

List active human users associated with a Meta Business Manager.

List Campaigns

List one page of campaigns belonging to a Meta ad account.

List Catalog Products

Return one filtered page of products from a Meta product catalog.

List Catalog Product Sets

Return one filtered page of product sets from a Meta product catalog.

List Client Ad Accounts

List one page of client ad accounts shared with a Meta Business Manager.

List Client Apps

Tool to retrieve client apps associated with a Meta Business using the Marketing API.

List Client Instagram Assets

Tool to retrieve Instagram assets that are shared with a business as a client using the Meta Marketing API.

List Client Offsite Signal Container Business Objects

Retrieve one page of client offsite signal container business objects for a business using the Meta Marketing API.

List Client Pages

Tool to retrieve client pages associated with a Meta business.

List Clients

Tool to retrieve client businesses associated with a Meta Business Manager.

List Collaborative Ads Collaboration Requests

Tool to retrieve collaborative ads collaboration requests for a Meta Business using the Marketing API.

List Collaborative Ads Suggested Partners

Tool to retrieve collaborative ads suggested partners for a business from Meta Marketing API.

List Comments

Return one page from the comments edge of a Page-owned post, photo, video, comment, or reply.

List Custom Audiences

List one page of custom audiences in a Meta ad account, with field projection and optional business, primary-audience, or Pixel constraints.

List Custom Conversions

List one page of custom-conversion definitions in a Meta ad account, with field projection and opaque cursor pagination.

List Initiated Audience Sharing Requests

Tool to retrieve initiated audience sharing requests for a business using the Meta Marketing API.

List Leads

List one page of leads belonging to a Meta Ad or Leadgen Form.

List Managed Partner Ads Funding Source Details

Tool to retrieve managed partner ads funding source details for a Meta Business.

List Owned Apps

Tool to retrieve apps owned by a business from Meta Marketing API.

List Owned Businesses

Tool to retrieve businesses owned by a parent Business Manager from Meta Marketing API.

List Owned Instagram Assets

Tool to list Instagram accounts/assets owned by a Meta Business.

List Owned Offsite Signal Container Business Objects

Retrieve one page of owned offsite signal container business objects associated with a specific business ID from the Meta Marketing API.

List Owned Pages

Retrieve a page of Facebook Pages owned by a Business Manager from the Meta Marketing API.

List Owned Product Catalogs

Return one page of product catalogs owned by a Meta Business Manager.

List Pending Client Ad Accounts

Tool to retrieve pending client ad account access requests for a Business Manager from Meta Ads.

List Pending Client Apps

Tool to retrieve pending client apps for a Meta Business.

List Pending Client Pages

Tool to retrieve pending client pages for a Business Manager using the Meta Marketing API.

List Pending Shared Offsite Signal Container Business Objects

Tool to retrieve pending shared offsite signal container business objects from Meta Marketing API.

List Pending Owned Ad Accounts

Tool to retrieve pending owned ad accounts for a Business Manager account from Meta Marketing API.

List Pending Owned Pages

Tool to retrieve Pages with pending ownership status for a Business Manager from Meta Marketing API.

List Pending Users

Tool to retrieve pending users from a Business Manager in Meta Marketing API.

List Promotable Pages

Return one page of Facebook Pages available for promotion from a Meta ad account.

List Received Audience Sharing Requests

Retrieve a page of received audience sharing requests for a business using the Meta Marketing API.

List Subscribed Apps

List one page of applications subscribed to a Meta ad account.

List System Users

List one page of system users associated with a Meta Business Manager account, with pagination information when returned.

List Targeting Search

Tool to search for targeting options in Meta Ads Marketing API.

List Targeting Suggestions

Return Meta targeting options related to a provider-native seed targeting list for an ad account.

List User Permissions

Inspect permission names and grant statuses for the connected Meta user, optionally filtered by permission or status.

List Video Tags

Return one page of TaggableSubject entries from a Video's `/tags` edge.

List Video Thumbnails

List one page of available thumbnail variants for a Meta video.

Read Ad Sets

Retrieve ad sets from a Meta ad account using the Marketing API.

Rename Ad Object

Rename an existing Meta campaign, ad set, ad, or ad creative.

Send Conversion Events

Irreversibly submit 1-1,000 validated server conversion events to a Meta Pixel or dataset.

Set Ad Object Status

Set an Ad, Ad Set, or Campaign to ACTIVE or PAUSED, or destructively ARCHIVE or DELETE it.

Start Async Insights Report

Start an asynchronous Meta Ads Insights report for an ad account, campaign, ad set, or ad and return its report-run ID.

Update Ad Creative

Update the name or status of an ad creative by ID.

Update Ad Set Targeting

Replace the targeting specification of an existing Meta Ad Set.

Update Ad Study

Update mutable Meta ad-study settings, including replacing its study cells.

Update Campaign

Update an existing advertising campaign using the Meta Marketing API.

Upload Ad Image

Upload an image for use in Meta ad creatives using the Marketing API.

SETUP GUIDE

Connect Metaads MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["metaads"],
  mcp: true,
});
Create a session scoped to Metaads and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Get insights for my latest ad campaign this week",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Metaads request
SETUP GUIDE

Connect Metaads API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["metaads"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Metaads
3

Run Metaads tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Get insights for my latest ad campaign this week" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Metaads tool calls through the session, and print the final answer

Why Use Composio?

AI Native Metaads Integration

  • Supports both Metaads MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Metaads data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Metaads access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Metaads
  • Scoped, least privilege access to Metaads resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Metaads requires connections to go through your own OAuth app. You register it once with Metaads, add its client ID and secret in the Composio dashboard, and from then on everyone connects by signing in to Metaads as usual. Composio handles the rest of the flow and the token refresh.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your Metaads connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

When you connect a Metaads account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in Metaads as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Exactly the ones Metaads lists on its consent screen when you connect. Review that screen before approving. If you connect a work account, your Metaads administrator may need to approve the app first, and you can revoke the access inside Metaads whenever you want.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each Metaads connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

Composio refreshes Metaads tokens automatically, so day to day you do nothing. If you revoke access inside Metaads, or Metaads invalidates the session, the connection shows as expired in Composio and the agent stops acting on that account until you reconnect it, which is a single sign-in.

Composio's free Hobby plan includes 100,000 tool calls per month with no credit card, which covers most personal Metaads use. Paid plans add higher limits and team features. Your Metaads plan and its API limits still apply as usual.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple Metaads accounts).

With Composio, you connect Metaads once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with Metaads.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Metaads tool your agent needs.Free to start.

Start building