Codex MCP setup

Bring Facebook ad intelligence into Codex

Use Codex to build, debug, and operate ad research workflows with direct access to Facebook ad search, brand ads, and creative analysis through Spresh.

Example agent request

MCP connected

Find active protein bar ads running in the US. Group them by hook, audience, offer, and creative format. Show which angles appear most often.

Searching ad library
Fetching brand and ad details
Summarizing creative angles

Get started in seconds

Copy one prompt. Let your agent install the MCP.

Pick your AI agent, copy the setup prompt, paste it into the agent, and add your Spresh API key when asked. The flow is built for speed.

Codex logo Codex Prompt based installer

Paste this into Codex

Set up the Spresh Facebook Ad Library MCP for Codex. Configure an MCP server named spreshapp-ad-library using npx -y spreshapp-mcp, request my SPRESHAPP_API_KEY, confirm the connection, and create a starter prompt file with examples for competitor ad research.

Manual config fallback

{
  "mcpServers": {
    "spreshapp-ad-library": {
      "command": "npx",
      "args": ["-y", "spreshapp-mcp"],
      "env": {
        "SPRESHAPP_API_KEY": "your_api_key_here"
      }
    }
  }
}

Setup checklist

  1. 1 Copy the Codex setup prompt.
  2. 2 Paste it into Codex inside the project where you want ad research context.
  3. 3 Let Codex add the MCP config, then test with a simple competitor search.

Try after setup

“Create a script that searches long running ads for this niche.”

“Compare landing page angles from the ads returned by Spresh.”

“Generate a weekly competitor ad monitoring workflow.”

MCP tools

What your agent can call

search_ads

Search active and inactive Facebook ads by keyword, country, format, page, and niche.

search_brands

Find Meta pages for brands and competitors before pulling their active ad library.

get_brand_ads

List active ads for a brand with creative URLs, copy, landing pages, and metadata.

get_ad_details

Fetch ad transparency data, creative fields, audience regions, and ad level details.

analyze_creatives

Turn ad examples into hooks, angles, personas, offers, objections, and creative briefs.

Workflows

Built for ad intelligence work, not toy demos

Competitor ad research

Ask your agent to find active ads from a brand, group them by hook, and surface the creative patterns worth testing.

Creative strategy briefs

Turn ad examples into personas, offers, objections, landing page notes, and new creative angles for your next sprint.

Niche discovery

Search by market, country, format, and topic to understand what advertisers are currently running in a category.

FAQ

Questions before you connect

Why use an Ad Library MCP with Codex?

Codex can turn ad research into repeatable workflows, dashboards, internal tools, and reports when it has structured access to Spresh ad data.

Can Codex use this for automation?

Yes. Codex can help design scripts and workflows around the MCP tools, including saved queries, monitoring jobs, and analysis templates.

What is an Ad Library MCP?

An Ad Library MCP connects an AI agent to Facebook and Meta ad research tools through the Model Context Protocol. Instead of switching tabs, the agent can search ads, inspect competitor creatives, and summarize patterns inside the chat.

Do I need to code to use the Spresh Ad Library MCP?

No. Most users can copy the install prompt for their agent, paste it into the assistant, add their API key, and start asking ad research questions.

What can I ask after installing it?

You can ask for competitor ads, long running creatives, hook analysis, country specific ad examples, landing page patterns, and creative brief ideas based on real Facebook ad data.

Ready

Connect your agent to live ad intelligence

Start with free credits, install the MCP, and ask your agent to research real ads instead of guessing from stale swipe files.

Get started free