# How to integrate Metaads MCP with Grok Build

```json
{
  "title": "How to integrate Metaads MCP with Grok Build",
  "toolkit": "Metaads",
  "toolkit_slug": "metaads",
  "framework": "Grok Build",
  "framework_slug": "grok-build",
  "url": "https://composio.dev/toolkits/metaads/framework/grok-build",
  "markdown_url": "https://composio.dev/toolkits/metaads/framework/grok-build.md",
  "updated_at": "2026-05-12T10:18:48.732Z"
}
```

## Introduction

### How to integrate Metaads MCP with Grok Build
[Grok Build](https://docs.x.ai/build/overview) is xAI's terminal coding agent. It runs on Grok 4.5, plans its work before it acts, and can run multiple sub-agents in parallel. It also reads Claude Code's MCP configuration, so any server you already have in a .mcp.json is picked up with no changes.
In this guide, I will show you how to connect your Metaads account to Grok Build through Composio, so it can get ad performance insights for last week, create a new campaign for summer sale, pause all ads in underperforming campaigns, and more without leaving the terminal. Composio holds the OAuth tokens for you, and Grok Build only calls the tools you approve.

## Also integrate Metaads with

- [ChatGPT Work](https://composio.dev/toolkits/metaads/framework/chatgpt)
- [Antigravity](https://composio.dev/toolkits/metaads/framework/antigravity)
- [OpenAI Agents SDK](https://composio.dev/toolkits/metaads/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/metaads/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/metaads/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/metaads/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/metaads/framework/codex)
- [Kimi Code](https://composio.dev/toolkits/metaads/framework/kimi)
- [Cursor](https://composio.dev/toolkits/metaads/framework/cursor)
- [VS Code](https://composio.dev/toolkits/metaads/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/metaads/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/metaads/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/metaads/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/metaads/framework/cli)
- [Google ADK](https://composio.dev/toolkits/metaads/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/metaads/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/metaads/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/metaads/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/metaads/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/metaads/framework/crew-ai)

## TL;DR

### Why use Composio over a standalone MCP server?
- Read and write access. Composio's Metaads integration lets Grok Build take real actions like creating drafts, sending updates, and labeling records, not just reading data.
- 1,000+ SaaS toolkits out of the box. One endpoint gives you a full catalog of pre-built connectors, from Gmail and Slack to Notion, Linear, and Salesforce.
- One MCP server for every app. Wire up a single Composio server instead of maintaining a separate MCP entry for each app.
- Smart, context-aware tool loading. Grok Build caps how many tools it holds in a single request. Composio loads only the tools a task needs, so you do not spend that budget on tools you are not using.
- Cross-app automation. Chain actions across apps in one run. Pull a thread, summarize it in Notion, and post the highlights to Slack from a single prompt.

## Connect Metaads to Grok Build

### Prerequisites
- Grok Build installed and signed in. Install with curl -fsSL https://x.ai/cli/install.sh | bash on macOS or Linux, or irm https://x.ai/cli/install.ps1 | iex on Windows PowerShell. On first launch Grok opens a browser to authenticate; for headless or CI use, set an XAI_API_KEY environment variable instead (create the key at [console.x.ai](https://console.x.ai/)).
- Access to the Metaads account you want to connect.
- The [Composio MCP endpoint](https://dashboard.composio.dev/login?utm_source=toolkits&utm_medium=framework_template&utm_campaign=grok-build&utm_content=composio_connect). Composio's server is remote and hosted, so there is nothing to run locally and no tunnel to set up.
### Step-by-step: Connect Metaads to Grok Build
### 1. Install and verify Grok Build
Install the CLI, then restart your shell so the grok binary lands on your PATH:

```bash
curl -fsSL https://x.ai/cli/install.sh | bash
which grok
```

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

The Metaads 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 advertising assets, so your agent can perform actions like creating campaigns, managing ads, analyzing insights, and handling audiences on your behalf.
- Automated campaign and ad creation: Quickly launch new campaigns, ad sets, and ads—including image, video, carousel, and collection formats—without manual setup.
- Real-time ad performance insights: Instantly retrieve analytics and detailed insights for any ad account, campaign, ad set, or individual ad to monitor and optimize your strategies.
- Audience management and targeting: Effortlessly create and update custom audiences, from customer lists to website visitors, so your ads reach the right people.
- Campaign control and optimization: Pause or delete campaigns and creatives, allowing your agent to manage spend and keep your advertising up to date.
- Creative asset automation: Generate, fetch, or remove ad creatives on the fly, making it easy to test new visuals or messaging across your campaigns.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `METAADS_CREATE_AD` | Create Ad | Create a new ad within an ad set using the Meta Marketing API. Supports various ad formats including image, video, carousel, and collection ads. |
| `METAADS_CREATE_AD_CREATIVE` | Create Ad Creative | Create a new ad creative using the Meta Marketing API. Ad creatives are reusable visual and interactive elements that define how your ad looks and behaves: - Can be used in multiple ads - Support various formats (image, video, carousel) - Include text, media, and call-to-action buttons - Must follow Meta's ad policies |
| `METAADS_CREATE_AD_SET` | Create Ad Set | Create a new ad set within a campaign using the Meta Marketing API. Supports detailed targeting options, budgets, and optimization goals. |
| `METAADS_CREATE_CAMPAIGN` | Create Campaign | Create a new advertising campaign using the Meta Marketing API. Supports various campaign objectives, budgets, and bidding strategies. |
| `METAADS_CREATE_CUSTOM_AUDIENCE` | Create Custom Audience | Create a new custom audience using the Meta Marketing API. Supports various types of custom audiences including customer lists, website visitors, and app users. |
| `METAADS_DELETE_CAMPAIGN` | Delete Campaign | Delete an advertising campaign using the Meta Marketing API. This marks the campaign as DELETED, which prevents it from delivering ads. Note that deleted campaigns are not permanently removed from Meta's systems and can still be viewed in reports. |
| `METAADS_GET_AD_ACCOUNTS` | Get Ad Accounts | Tool to retrieve all ad account IDs accessible to the authenticated user from Meta Ads. Use when you need to get a user's ad account information including account IDs, names, and other account details. |
| `METAADS_GET_AD_CREATIVE` | Get Ad Creative | Get Ad Creative |
| `METAADS_GET_INSIGHTS` | Get Insights | Get insights data for a Meta Ads object (ad account, campaign, ad set, or ad) using the Meta Marketing API. Supports various metrics, breakdowns, and filtering options with flexible date ranges. Results are paginated; follow `paging.cursors.after` or `paging.next` to retrieve all rows. Missing metric values in results should not be assumed to be zero. |
| `METAADS_GET_OBJECT` | Get Meta Object | Tool to retrieve data for any Meta Marketing API object by its ID. Use when you need to get information about a specific ad account, campaign, ad set, ad, ad creative, page, user, or other Meta object. Supports flexible field selection to retrieve only the data you need. |
| `METAADS_GET_PAGE_ACCOUNTS` | Get Page Accounts | Tool to retrieve permanent page access tokens for accounts managed by the user. Use when you need to get pages the user manages along with access tokens for each page. |
| `METAADS_GET_USER` | Get User | Tool to retrieve information about the authenticated user from Meta (Facebook) Graph API. Use when you need to get the current user's profile information such as name, email, or other user details. |
| `METAADS_LIST_AD_CREATIVES` | List Ad Creatives | Tool to list all ad creatives under an ad account. Use when you need to retrieve multiple ad creatives from a Meta Ads account to view, analyze, or manage creative assets. |
| `METAADS_LIST_AD_NETWORK_ANALYTICS` | List Ad Network Analytics | Tool to retrieve ad network analytics for a Meta Business using the Meta Marketing API. Use when you need to get ad network performance metrics such as revenue or impressions. |
| `METAADS_LIST_AD_NETWORK_ANALYTICS_RESULTS` | List Ad Network Analytics Results | Tool to retrieve ad network analytics results for Facebook Audience Network. Use when you need to get performance data from ads displayed through Facebook Audience Network on third-party apps and websites for a specific business, app, or property. |
| `METAADS_LIST_ADS` | List Ads | Tool to list all ads under an ad account using the Meta Marketing API. Use when you need to retrieve ads from a specific ad account with optional filtering by fields. |
| `METAADS_LIST_AGENCIES` | List Agencies | Tool to retrieve agencies associated with a Meta Business or Ad Account. Use when you need to get the list of agencies that have access to manage a specific business or ad account. |
| `METAADS_LIST_ASSIGNED_PAGES` | List Assigned Pages | Tool to retrieve Facebook Pages assigned to a business user via Meta Marketing API. Use when you need to get the list of pages a business user has access to. |
| `METAADS_LIST_ASSIGNED_USERS` | List Assigned Users | Tool to list users assigned to a Facebook Page or Ad Account within a specific business context. Use when you need to retrieve the list of users who have access to a Page or Ad Account and their associated task permissions. |
| `METAADS_LIST_BUSINESS_AD_ACCOUNTS` | List Business Ad Accounts | Tool to retrieve all ad accounts owned by a specific Business Manager. Use when you need to get ad account information for a business including account IDs, names, and status. |
| `METAADS_LIST_BUSINESS_INVOICES` | List Business Invoices | Tool to retrieve business invoices from Meta Marketing API. Use when you need to fetch invoice data for a business including amounts, due dates, and payment status. |
| `METAADS_LIST_CLIENT_AD_ACCOUNTS` | List Client Ad Accounts | Tool to list all client ad accounts accessible to a business from Meta Ads. Use when you need to retrieve ad accounts that have been shared with a Business Manager as clients. |
| `METAADS_LIST_CLIENT_APPS` | List Client Apps | Tool to retrieve client apps associated with a Meta Business using the Marketing API. Use when you need to get information about apps linked to a specific business. |
| `METAADS_LIST_CLIENT_INSTAGRAM_ASSETS` | List Client Instagram Assets | Tool to retrieve Instagram assets that are shared with a business as a client using the Meta Marketing API. Use when you need to fetch Instagram accounts or assets linked to a specific business ID. |
| `METAADS_LIST_CLIENT_OFFSITE_SIGNAL_CONTAINERS` | List Client Offsite Signal Container Business Objects | Tool to retrieve client offsite signal container business objects for a business from Meta Marketing API. Use when you need to list all client offsite signal container business objects associated with a specific business ID. |
| `METAADS_LIST_CLIENT_PAGES` | List Client Pages | Tool to retrieve client pages associated with a Meta business. Use when you need to get the list of pages that a business manages on behalf of clients. |
| `METAADS_LIST_CLIENTS` | List Clients | Tool to retrieve client businesses associated with a Meta Business Manager. Use when you need to get the list of businesses that are clients of a specific Business Manager. |
| `METAADS_LIST_COLLABORATIVE_ADS_COLLABORATION_REQUESTS` | List Collaborative Ads Collaboration Requests | Tool to retrieve collaborative ads collaboration requests for a Meta Business using the Marketing API. Use when you need to get collaboration requests related to collaborative advertising partnerships for a specific business. |
| `METAADS_LIST_COLLABORATIVE_ADS_SUGGESTED_PARTNERS` | List Collaborative Ads Suggested Partners | Tool to retrieve collaborative ads suggested partners for a business from Meta Marketing API. Use when you need to discover potential partnership opportunities for collaborative advertising campaigns. |
| `METAADS_LIST_INITIATED_AUDIENCE_SHARING_REQUESTS` | List Initiated Audience Sharing Requests | Tool to retrieve initiated audience sharing requests for a business using the Meta Marketing API. Use when you need to get the list of audience sharing requests that have been initiated by a business. |
| `METAADS_LIST_MANAGED_PARTNER_ADS_FUNDING_SOURCE_DETAILS` | List Managed Partner Ads Funding Source Details | Tool to retrieve managed partner ads funding source details for a Meta Business. Use when you need to get funding source information for managed partner ads associated with a specific business. |
| `METAADS_LIST_OWNED_APPS` | List Owned Apps | Tool to retrieve apps owned by a business from Meta Marketing API. Use when you need to get information about apps associated with a business account. |
| `METAADS_LIST_OWNED_BUSINESSES` | List Owned Businesses | Tool to retrieve businesses owned by a parent Business Manager from Meta Marketing API. Use when you need to list child businesses managed under a Business Manager account in a Tier-2 business hierarchy. |
| `METAADS_LIST_OWNED_INSTAGRAM_ASSETS` | List Owned Instagram Assets | Tool to list Instagram accounts/assets owned by a Meta Business. Use when you need to retrieve the Instagram Business Accounts associated with a specific Meta Business. |
| `METAADS_LIST_OWNED_OFFSITE_SIGNAL_CONTAINER_BUSINESS_OBJECTS` | List Owned Offsite Signal Container Business Objects | Tool to retrieve owned offsite signal container business objects for a business from Meta Marketing API. Use when you need to list all owned offsite signal container business objects associated with a specific business ID. |
| `METAADS_LIST_OWNED_PAGES` | List Owned Pages | Tool to retrieve Pages owned by a Business Manager from Meta Marketing API. Use when you need to get a list of all Facebook Pages that a business owns or manages. |
| `METAADS_LIST_PENDING_CLIENT_AD_ACCOUNTS` | List Pending Client Ad Accounts | Tool to retrieve pending client ad account access requests for a Business Manager from Meta Ads. Use when you need to get ad accounts that are awaiting approval to be added as clients to a business. |
| `METAADS_LIST_PENDING_CLIENT_APPS` | List Pending Client Apps | Tool to retrieve pending client apps for a Meta Business. Use when you need to list apps that are pending approval or connection to a business account. |
| `METAADS_LIST_PENDING_CLIENT_PAGES` | List Pending Client Pages | Tool to retrieve pending client pages for a Business Manager using the Meta Marketing API. Use when you need to see which Facebook Pages have pending access requests from the business. |
| `METAADS_LIST_PENDING_OFFSITE_SIGNAL_CONTAINERS` | List Pending Shared Offsite Signal Container Business Objects | Tool to retrieve pending shared offsite signal container business objects from Meta Marketing API. Use when you need to get information about pending shared offsite signal containers associated with a business account. |
| `METAADS_LIST_PENDING_OWNED_AD_ACCOUNTS` | List Pending Owned Ad Accounts | Tool to retrieve pending owned ad accounts for a Business Manager account from Meta Marketing API. Use when you need to list ad accounts with pending ownership status for a specific business. |
| `METAADS_LIST_PENDING_OWNED_PAGES` | List Pending Owned Pages | Tool to retrieve Pages with pending ownership status for a Business Manager from Meta Marketing API. Use when you need to get a list of Facebook Pages that are pending approval or verification for a business to own. |
| `METAADS_LIST_PENDING_USERS` | List Pending Users | Tool to retrieve pending users from a Business Manager in Meta Marketing API. Use when you need to get information about users with pending invitations to a Business Manager. |
| `METAADS_LIST_RECEIVED_AUDIENCE_SHARING_REQUESTS` | List Received Audience Sharing Requests | Tool to retrieve all received audience sharing requests for a business using the Meta Marketing API. Use when you need to see which other businesses have requested to share custom audiences with your business. |
| `METAADS_LIST_SYSTEM_USERS` | List System Users | Tool to retrieve system users for a Meta Business Manager account. Use when you need to list all system users (non-human accounts used for API access) associated with a business. |
| `METAADS_LIST_TARGETING_SEARCH` | List Targeting Search | Tool to search for targeting options in Meta Ads Marketing API. Use when you need to find interests, locations, demographics, schools, or employers for ad targeting purposes. |
| `METAADS_READ_ADSETS` | Read Ad Sets | Retrieve ad sets from a Meta ad account using the Marketing API. Returns information about the ad sets including their status, targeting, and other properties. |
| `METAADS_UPDATE_AD_CREATIVE` | Update Ad Creative | Update Ad Creative |
| `METAADS_UPDATE_CAMPAIGN` | Update Campaign | Update an existing advertising campaign using the Meta Marketing API. Allows modification of campaign properties like name, status, budget, and bidding strategy. Only the fields that need to be updated should be included in the request. |
| `METAADS_UPLOAD_AD_IMAGE` | Upload Ad Image | Upload an image for use in Meta ad creatives using the Marketing API. The image can later be referenced by its hash when creating ad creatives. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

Once connected, Grok Build can access the Metaads MCP server via Composio to run the app actions you authorize, directly from your terminal.

## Complete Code

None listed.

## How to build Metaads MCP Agent with another framework

- [ChatGPT Work](https://composio.dev/toolkits/metaads/framework/chatgpt)
- [Antigravity](https://composio.dev/toolkits/metaads/framework/antigravity)
- [OpenAI Agents SDK](https://composio.dev/toolkits/metaads/framework/open-ai-agents-sdk)
- [Claude Agent SDK](https://composio.dev/toolkits/metaads/framework/claude-agents-sdk)
- [Claude Code](https://composio.dev/toolkits/metaads/framework/claude-code)
- [Claude Cowork](https://composio.dev/toolkits/metaads/framework/claude-cowork)
- [Codex](https://composio.dev/toolkits/metaads/framework/codex)
- [Kimi Code](https://composio.dev/toolkits/metaads/framework/kimi)
- [Cursor](https://composio.dev/toolkits/metaads/framework/cursor)
- [VS Code](https://composio.dev/toolkits/metaads/framework/vscode)
- [OpenCode](https://composio.dev/toolkits/metaads/framework/opencode)
- [OpenClaw](https://composio.dev/toolkits/metaads/framework/openclaw)
- [Hermes](https://composio.dev/toolkits/metaads/framework/hermes-agent)
- [CLI](https://composio.dev/toolkits/metaads/framework/cli)
- [Google ADK](https://composio.dev/toolkits/metaads/framework/google-adk)
- [LangChain](https://composio.dev/toolkits/metaads/framework/langchain)
- [Vercel AI SDK](https://composio.dev/toolkits/metaads/framework/ai-sdk)
- [Mastra AI](https://composio.dev/toolkits/metaads/framework/mastra-ai)
- [LlamaIndex](https://composio.dev/toolkits/metaads/framework/llama-index)
- [CrewAI](https://composio.dev/toolkits/metaads/framework/crew-ai)

## Related Toolkits

- [Adrapid](https://composio.dev/toolkits/adrapid) - Adrapid is a platform for rapid creation of digital marketing visuals using templates. It streamlines design workflows for banners, images, and HTML5 content with automation.
- [Adyntel](https://composio.dev/toolkits/adyntel) - Adyntel is an API that retrieves LinkedIn ads for any company using a domain or LinkedIn Page ID. Easily access competitive ad intelligence to power your marketing workflows.
- [Beaconstac](https://composio.dev/toolkits/beaconstac) - Beaconstac is a platform for creating and managing QR codes and proximity beacons. It helps businesses engage customers and track marketing performance with powerful analytics.
- [Campaign cleaner](https://composio.dev/toolkits/campaign_cleaner) - Campaign cleaner is an email campaign optimization tool that boosts compatibility and deliverability across email clients. It helps marketers get better results by cleaning, enhancing, and ensuring high performance for every campaign.
- [Deadline funnel](https://composio.dev/toolkits/deadline_funnel) - Deadline Funnel lets you create personalized deadlines and timers for your marketing campaigns. It helps marketers boost conversions by adding authentic urgency to offers.
- [Google Ads](https://composio.dev/toolkits/googleads) - Google Ads is Google's online advertising platform for creating, managing, and optimizing digital campaigns. It helps businesses reach targeted customers and maximize return on ad spend.
- [Instantly](https://composio.dev/toolkits/instantly) - Instantly is a platform for automating cold email outreach, managing leads, and optimizing deliverability. Get better results from email campaigns with minimal manual effort.
- [Keyword](https://composio.dev/toolkits/keyword) - Keyword.com is a digital marketing platform for search rank tracking and SEO analytics. Use it to monitor keyword performance, spot ranking changes, and measure SEO visibility.
- [Linkedin Ads](https://composio.dev/toolkits/linkedin_ads) - Linkedin Ads is LinkedIn's marketing platform for creating, managing, and measuring paid campaigns across LinkedIn. It helps teams reach professional audiences with precise targeting, campaign analytics, and sponsored content tools.
- [Proofly](https://composio.dev/toolkits/proofly) - Proofly is a social proof platform that displays real-time notifications of customer activity on your site. It helps you increase website conversions by building trust and urgency for visitors.
- [Reddit Ads](https://composio.dev/toolkits/reddit_ads) - Reddit Ads is Reddit's advertising platform for running paid campaigns, managing ad accounts, and tracking conversions. It helps advertisers reach high-intent communities with targeted, interest-based campaigns.
- [Segmetrics](https://composio.dev/toolkits/segmetrics) - Segmetrics is a marketing analytics platform that reveals detailed insights into your customer journeys. It helps businesses optimize marketing strategies with accurate, actionable reporting.
- [Semrush](https://composio.dev/toolkits/semrush) - Semrush is a leading SEO tool suite for keyword research, competitor analysis, and campaign tracking. It empowers marketers to improve search rankings and optimize online visibility.
- [Sendloop](https://composio.dev/toolkits/sendloop) - Sendloop is an all-in-one email marketing platform built for SaaS, e-commerce, and small businesses. It makes it easy to send campaigns, manage lists, and track results—all in one place.
- [Sidetracker](https://composio.dev/toolkits/sidetracker) - Sidetracker is a marketing analytics platform that tracks expenses, sales funnels, and customer journeys. It helps optimize marketing spend and visualize campaign performance from start to finish.
- [Snapchat](https://composio.dev/toolkits/snapchat) - Snapchat is a multimedia messaging and social platform with camera-first content, Stories, and Ads Manager. It helps brands reach mobile audiences with visual ads and measurable campaign performance.
- [Stannp](https://composio.dev/toolkits/stannp) - Stannp is an API-driven direct mail platform for sending postcards and letters programmatically. It lets you automate physical mail delivery—no manual printing or mailing required.
- [Tapfiliate](https://composio.dev/toolkits/tapfiliate) - Tapfiliate is an affiliate and referral tracking platform for businesses. It helps companies efficiently manage, track, and grow their affiliate programs.
- [Tpscheck](https://composio.dev/toolkits/tpscheck) - Tpscheck is a real-time service for verifying UK phone numbers against TPS and CTPS registers. It helps prevent unwanted marketing calls and ensures compliance with UK telemarketing laws.
- [Gmail](https://composio.dev/toolkits/gmail) - Gmail is Google's email service with powerful spam protection, search, and G Suite integration. It keeps your inbox organized and makes communication fast and reliable.

## Frequently Asked Questions

### What is the difference between the Composio Tool Router and a standalone Metaads MCP server?

A standalone Metaads MCP server gives Grok Build a fixed set of Metaads tools tied to that one server. The Composio Tool Router lets Grok Build load tools from Metaads and many other apps on demand, based on the task, all through a single endpoint.

### Does Grok Build support MCP?

Yes. Grok Build ships with native MCP support. Add a server with the grok mcp add command, from the in-session /mcps modal, or by editing ~/.grok/config.toml. It also reads Claude Code-style .mcp.json files, so Grok Build discovers the tools automatically.

### Can I reuse the same MCP config I already use with Claude Code?

Yes. Grok Build has zero-migration compatibility with Claude Code's configuration, so the same Composio server entry works in both without edits.

### How safe is my Metaads data with Composio?

Tokens, keys, and configuration are encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant, so your Metaads data and credentials are handled to that standard.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
