Meta Ads Codex MCP

Meta Ads Codex MCP

A local MCP server that lets Codex answer conversational questions about Meta Ads performance. It provides read-only tools for listing ad accounts, checking active ads, and summarizing account performance.

Category
Visit Server

README

Meta Ads Codex MCP

A local MCP server that lets Codex answer conversational questions about Meta Ads performance.

Example prompts in Codex:

Use Meta Ads to show how my live ad is performing.
How much have I spent in total?
Which active ads have the highest CPC over the last 7 days?
Summarize my account performance for the last 30 days.

This project runs locally. It does not send your Meta Ads token anywhere except Meta's official MCP endpoint at https://mcp.facebook.com/ads.

Codex provides the AI conversation. This package provides the local MCP tools that let Codex safely read Meta Ads data.

Current Status

This first release is read-only. It exposes safe tools for:

  • listing ad accounts
  • checking active ads
  • reading ad performance
  • reading account-level spend
  • summarizing account performance

Write actions such as pausing ads, changing budgets, or creating campaigns are intentionally not included yet.

Requirements

  • Node.js 18+
  • Codex CLI
  • A Meta MCP-compatible access token

Meta's official hosted MCP OAuth currently does not support every MCP client. This server supports token-based access by reading a token from an environment variable or local config file.

Quick Start

Install from this repo:

npm install -g .

Store a token:

meta-ads-codex-mcp token set

Optionally set your default ad account:

meta-ads-codex-mcp account set 2051892919047874

Install the MCP server into Codex:

meta-ads-codex-mcp install-codex

Restart Codex, then ask:

Use Meta Ads to show how my live ad is performing.

Token Sources

The server looks for a token in this order:

  1. META_ADS_MCP_ACCESS_TOKEN
  2. ~/.meta-ads-codex-mcp.json
  3. ~/.meta_ads_mcp_token.json from the local prototype helper

The config file is written with 0600 permissions.

CLI

meta-ads-codex-mcp check
meta-ads-codex-mcp accounts
meta-ads-codex-mcp active-ads --date-preset last_7d
meta-ads-codex-mcp spend --date-preset maximum
meta-ads-codex-mcp performance --ad-id 120247766096870426 --date-preset last_7d
meta-ads-codex-mcp server

Codex Config

install-codex runs:

codex mcp add meta_ads_codex -- meta-ads-codex-mcp server

You can remove it with:

codex mcp remove meta_ads_codex

Security

  • Treat Meta access tokens like passwords.
  • Do not commit .env, local config, or token files.
  • This package does not log token values.
  • Use read-only tokens when possible.

Development

Run the server locally:

node src/cli.js server

Run a direct check:

node src/cli.js check

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured