Meta Marketing API MCP Server

Meta Marketing API MCP Server is an MCP server that connects AI clients directly to Facebook and Instagram advertising accounts through the Meta Marketing API. Built on xmcp and deployed as a Cloudflare Worker, the server allows media buyers, digital marketing teams, and developers to automate campaign management, reporting, and ad optimization using AI assistants. The server enables users to perform operational marketing actions such as inspecting ad accounts, creating and editing campaigns, organizing ad sets, tracking audience targeting, and retrieving performance insights without manually navigating Meta Ads Manager. Rather than using the official Meta SDK, the system uses direct Meta Graph API requests, encrypts stored Meta access tokens, and manages workspace connections inside Cloudflare D1 and KV namespaces. Because it operates as a multi-tenant service, every MCP request requires application-issued JSON Web Tokens with workspace context to enforce access controls. Teams can integrate the server into their existing cloud infrastructure or marketing dashboards to allow automated agents to manage batch advertising workflows safely.

Category: CRM, ERP & E-commerce

Tags: advertising, facebook, instagram, marketing, meta

Visit Meta Marketing API MCP Server

How to install and configure Meta Marketing API MCP Server

  1. Clone the repository and install local dependencies using pnpm install. 2. Configure your Meta developer app by adding the Marketing API product, setting the Website platform URL, and configuring the redirect URI to your Worker callback path. 3. Create the required Cloudflare resources, binding a D1 database as META_DB and a KV namespace as META_OAUTH_STATE. 4. Initialize the database schema by executing pnpm wrangler d1 execute META_DB --remote --file schema.sql -y. 5. Set your Worker secrets, including JWT_SECRET (or JWT_JWKS_URL), META_APP_ID, META_APP_SECRET, and META_TOKEN_ENCRYPTION_KEY. 6. Deploy the Worker using pnpm deploy. 7. Authenticate a Meta account via the /oauth/meta/start endpoint or the built-in /app browser interface. 8. Connect your MCP client to the HTTP endpoint at https://<your-worker-host>/mcp using a Bearer JWT containing the appropriate workspace ID. For full setup options, see the GitHub repository.

What you can do with Meta Marketing API MCP Server

  • Retrieve advertising account lists and monitor active campaign performance metrics directly through natural language queries in supported AI clients. - Create, update, and manage ad sets, budgeting rules, and audience targeting parameters across connected Facebook and Instagram advertising profiles. - Inspect ad creatives and generate cross-campaign insight summaries to evaluate return on ad spend and click-through rates across workspaces. - Execute multi-step batch updates to ad campaigns and scheduling without navigating through the Meta Ads Manager web console.

Key facts

  • https://github.com/brijr/meta-ads-mcp
  • CRM, ERP & E-commerce, Data & Analytics
  • advertising, facebook, instagram, marketing, meta

Part of MCP Servers

Related MCP servers

  • MCP KQL Server β€” MCP KQL Server is an MCP server that connects AI assistants to Azure Data Explorer clusters using Azure CLI authentication.…
  • MCP Jupyter Complete β€” MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP Microsoft Office Bridge β€” MCP Microsoft Office Bridge is an MCP server that connects AI assistants like Claude to Microsoft 365 services through the…
  • MCP Mempool β€” MCP Mempool is an MCP server that exposes the mempool.space WebSocket and REST APIs to AI agents, LLM assistants, and…
  • MCP NIF.PT β€” MCP NIF.PT is an MCP server that connects LLM clients to the Portuguese NIF.PT public API to retrieve and analyze…
  • MCP Options Order Flow Server β€” MCP Options Order Flow Server is an MCP server that provides real-time options order flow data, institutional bias tracking, and…

What can Meta Marketing API MCP Server do?

The server exposes 39 tools covering account setup, campaign management, ad set configuration, creatives, custom audience targeting, and reporting. It allows AI models to query advertising performance metrics, update campaign statuses, retrieve available ad accounts, and execute batch operations on Meta Ads data.

How does Meta Marketing API MCP Server handle authentication?

The server uses a multi-tenant authentication model powered by application-issued JSON Web Tokens. Each MCP request requires a bearer JWT specifying a user ID and workspace ID. Stored Meta OAuth access tokens are encrypted in Cloudflare D1, while temporary OAuth state is maintained in KV.

Where is Meta Marketing API MCP Server hosted?

The server is designed for self-hosting on Cloudflare Workers. It uses Cloudflare D1 for storing workspace connections and ad account caches, along with Cloudflare KV for managing short-lived OAuth state during authorization with the Meta Graph API.

Which MCP clients work with Meta Marketing API MCP Server?

The server exposes a streamable HTTP MCP endpoint at /mcp. Any MCP client capable of connecting to remote HTTP endpoints with custom Bearer authorization headers can interact with the server once the deployment and token configuration are complete.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories