---
title: "Meta Ads Integration"
description: "Manage Meta Ads list ad accounts, get ad account, list campaigns, create campaign, list adsets"
---
The Meta Ads integration provides access to manage Meta Ads list ad accounts, get ad account, list campaigns, create campaign, list adsets through the Integrate MCP server.

## Installation

The Meta Ads integration is included with the SDK:

```typescript
import { metaAdsIntegration } from "integrate-sdk/server";
```

## Setup

### 1. Create a Meta Ads OAuth App

1. Create an OAuth application for Meta Ads
2. Configure your redirect URI
3. Note your Client ID and Client Secret

### 2. Configure the Integration on Your Server

Add the Meta Ads integration to your server configuration. The integration automatically reads `META_ADS_CLIENT_ID` and `META_ADS_CLIENT_SECRET` from your environment variables:

```typescript
import { createMCPServer, metaAdsIntegration } from "integrate-sdk/server";

export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    metaAdsIntegration({
      scopes: ["ads_read", "ads_management", "business_management"], // Optional
    }),
  ],
});
```

You can override the environment variables by passing explicit values:

```typescript
metaAdsIntegration({
  clientId: process.env.CUSTOM_META_ADS_ID,
  clientSecret: process.env.CUSTOM_META_ADS_SECRET,
      scopes: ["ads_read", "ads_management", "business_management"], // Optional
});
```

### 3. Client-Side Usage

The default client automatically includes all integrations. You can use it directly:

```typescript
import { client } from "integrate-sdk";

await client.authorize("meta_ads");
const result = await client.meta_ads.listAdAccounts({});

console.log(result);
```

If you're using a custom client, add the integration to the integrations array:

```typescript
import { createMCPClient, metaAdsIntegration } from "integrate-sdk";

const customClient = createMCPClient({
  integrations: [metaAdsIntegration()],
});
```

## Configuration Options

<AutoTypeTable
  path="../src/integrations/meta_ads.ts"
  name="MetaAdsIntegrationConfig"
/>


## Default Scopes

These defaults are applied unless you override `scopes` in the integration config:

- `ads_read`
- `ads_management`
- `business_management`

## Tools

### `meta_ads_list_ad_accounts`

Ads list ad accounts

<AutoTypeTable
  path="generated/tool-params/meta_ads.ts"
  name="MetaAdsListAdAccountsParams"
/>

### `meta_ads_get_ad_account`

Ads get ad account

<AutoTypeTable
  path="generated/tool-params/meta_ads.ts"
  name="MetaAdsGetAdAccountParams"
/>

### `meta_ads_list_campaigns`

Ads list campaigns

<AutoTypeTable
  path="generated/tool-params/meta_ads.ts"
  name="MetaAdsListCampaignsParams"
/>

### `meta_ads_create_campaign`

Ads create campaign

<AutoTypeTable
  path="generated/tool-params/meta_ads.ts"
  name="MetaAdsCreateCampaignParams"
/>

### `meta_ads_list_adsets`

Ads list adsets

<AutoTypeTable
  path="generated/tool-params/meta_ads.ts"
  name="MetaAdsListAdsetsParams"
/>

### `meta_ads_list_ads`

Ads list ads

<AutoTypeTable
  path="generated/tool-params/meta_ads.ts"
  name="MetaAdsListAdsParams"
/>

## Notes

- Category: Marketing
- Authentication mode: OAuth
