How to integrate Metaads MCP with OpenClaw

Connect OpenClaw to Metaads MCP. Get ad performance insights for last week, create a new campaign for summer sale, and more using natural language, with authentication handled for you.

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

Introduction

OpenClaw is the fastest growing agent harness out there, which can work 24/7 to automate almost any kind of tasks. However, its capabilities are limited to the tools it has access to. Composio allows your OpenClaw to access Metaads with authentication management handled for you. You can execute actions on Metaads via your favorite OpenClaw interface (Telegram, WhatsApp, TUI, etc), whichever you prefer.

Also integrate Metaads with

Why use Composio?

Apart from a managed and hosted MCP server, you will get:

  • Programmatic tool calling allows LLMs to write its code in a remote workbench to handle complex tool chaining. Reduces to-and-fro with LLMs for frequent tool calling.
  • Handling Large tool responses out of LLM context to minimize context rot.
  • Dynamic just-in-time access to 20,000 tools across 1700+ other Apps for cross-app workflows. It loads the tools you need, so LLMs aren't overwhelmed by tools you don't need.

How to install Metaads with OpenClaw

Using Composio API Key and Setup Prompt

Copy the setup prompt from the OpenClaw dashboard
  • Run it in your OpenClaw chat interface.
  • Authenticate Metaads from the dashboard
  • Go back to your OpenClaw interface and start asking questions.

Using OpenClaw/Composio Plugin

1. Install OpenClaw Composio plugin

bash
openclaw plugins install @composio/openclaw-plugin

2. Copy the API Key from dashboard.composio.dev

3. Setup OpenClaw Config

bash
openclaw config set plugins.entries.composio.config.consumerKey "ck_your_key_here"

4. Restart OpenClaw

bash
openclaw gateway restart

5. Go to your chat interface and start asking questions.

6. When prompted, authenticate the app and you're all set.

How It Works

The plugin connects to Composio's MCP server at https://connect.composio.dev/mcp and registers all available tools directly into the OpenClaw agent. Tools are called by name — no extra search or execute steps needed.

If a tool returns an auth error, the agent will prompt you to connect that toolkit at dashboard.composio.dev.

Configuration

bash
{
  "plugins": {
    "entries": {
      "composio": {
        "enabled": true,
        "config": {
          "consumerKey": "ck_your_key_here"
        }
      }
    }
  }
}
OptionDescriptionDefault
enabledEnable or disable the plugintrue
consumerKeyYour Composio consumer key (ck_...)—
mcpUrlMCP server URL (advanced)https://connect.composio.dev/mcp

What is the Metaads MCP server, and what's possible with it?

The Meta Ads MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Meta Ads account. It provides structured and secure access to your campaigns, ads, audiences, leads, performance insights, and business assets, so your agent can create campaigns, build ads, update campaigns, analyze results, and retrieve leads on your behalf.

  • Campaign and ad creation: Have your agent create campaigns, ad sets, ad creatives, and ads for your Meta advertising account.
  • Campaign updates: Direct your agent to update existing campaigns when your advertising plans or settings change.
  • Performance analysis: Let the agent retrieve insights for your advertising account, campaigns, ad sets, or ads to help you review results.
  • Audience and targeting research: Instruct your agent to create custom audiences and search available targeting options for upcoming campaigns.
  • Lead and asset discovery: Have your agent retrieve leads and list accessible businesses, advertising accounts, Facebook Pages, Instagram assets, campaigns, ads, and creatives.

Conclusion

You've successfully integrated Metaads with OpenClaw using Composio plugin. Now interact with Metaads directly from your terminal, Web UI, or any messenger app using natural language commands.

Key benefits of this setup:

  • Seamless integration across TUI, Web UIs, and Messenger apps like Telegram, WhatsApp, Slack, etc.
  • Natural language commands for Metaads operations
  • Managed authentication through Composio
  • Access to 20,000+ tools across 1700+ apps for cross-app workflows
  • Programmatic tool calling for complex tool chaining

Next steps:

  • Try asking OpenClaw to perform various Metaads operations
  • Explore cross-app workflows by connecting more toolkits like Calendar, Slack, Notion, etc.
  • Build complex automation scripts that leverage OpenClaw's 24/7 running capabilities
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.

FAQ

Frequently asked questions

With a standalone Metaads MCP server, the agents and LLMs can only access a fixed set of Metaads tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Metaads and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. OpenClaw fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Metaads tools.

Yes, absolutely. You can configure which Metaads scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Metaads data and credentials are handled as safely as possible.

Start with Metaads.It takes 30 seconds.

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

Start building