Facebook Ads

Provides access to Facebook Ads data, insights, and account information through MCP clients.
  • javascript

3

GitHub Stars

javascript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "fortytwode-10xer": {
      "command": "facebook-ads-mcp",
      "args": [],
      "env": {
        "FACEBOOK_APP_ID": "your_facebook_app_id",
        "FACEBOOK_APP_SECRET": "your_facebook_app_secret",
        "FACEBOOK_ACCESS_TOKEN": "EAA...YourToken...",
        "FACEBOOK_REDIRECT_URI": "http://localhost:3002/auth/callback"
      }
    }
  }
}

You can access Facebook Ads data, insights, and account information directly from natural language conversations by running an MCP server that connects to Facebook’s Graph API. This server acts as a bridge between your MCP client (like Claude) and Facebook Ads, making it easy to list accounts, retrieve insights, and review activities through simple prompts.

How to use

You use this MCP server by configuring it in your MCP client settings and then asking questions about your Facebook ads. Start by ensuring you have a valid Facebook access token and that your MCP client can reach the server. Common workflows include listing your ad accounts, fetching performance insights for a chosen account, and retrieving recent account activities. The server handles authentication, data retrieval, and pagination so you can focus on analysis and planning.

How to install

Prerequisites: Node.js 18+ is recommended and npm is available on your system.

Step 1: Install the MCP server globally.

npm install -g facebook-ads-mcp-server

Configuration and usage notes

Configure your MCP client to load the Facebook Ads MCP server. You can use the following example configuration to run the MCP locally via the standard CLI entry point and to supply your Facebook credentials.

{
  "mcpServers": {
    "facebook-ads-mcp": {
      "command": "node",
      "args": ["src/index.js"],
      "cwd": "/path/to/facebook-ads-mcp",
      "env": {
        "FACEBOOK_ACCESS_TOKEN": "your_facebook_access_token"
      }
    }
  }
}

Security and tokens

Keep your Facebook access token secure. The server stores tokens securely and supports session management. Do not expose tokens in client logs or shared configurations.

Environment variables and setup details

Required environment variable is FACEBOOK_ACCESS_TOKEN. You may also set API version, base URL, and server metadata as needed.

Starting the server

Run the server in development or production mode as you prefer. The server will expose MCP endpoints that your client can call to perform Facebook Ads operations.

Troubleshooting

If the server does not start, verify Node.js is installed and the required environment variables are set. Check logs for authentication or permission errors, and ensure your Facebook token has the necessary permissions.

Tools and capabilities

The MCP server provides tools to interact with Facebook Ads data, including listing ad accounts, fetching account details and insights, retrieving activities, and handling pagination to manage large datasets.

Notes on installation and testing

To run tests, install dependencies and execute the test suite as you would for a typical Node.js project.

Notable configuration examples

Example MCP client configuration for a local node-based server variant.

Available tools

facebook_list_ad_accounts

Lists all Facebook ad accounts accessible with the provided credentials.

facebook_fetch_pagination_url

Fetches data from a Facebook Graph API pagination URL.

facebook_get_details_of_ad_account

Gets details of a specific ad account based on requested fields.

facebook_get_adaccount_insights

Retrieves performance insights for a specified Facebook ad account.

facebook_get_activities_by_adaccount

Retrieves activities for a Facebook ad account.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Facebook Ads MCP Server - fortytwode/10xer | VeilStrat