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.

AI agent connected to the Meta Ad Library with hooks, ads, and insights

Copy one prompt. Let your agent install the MCP.

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 the URL https://api.spreshapp.com/mcp, request my Spresh API key, add it as an Authorization Bearer header, confirm the connection, and create a starter prompt file with examples for competitor ad research.

Manual config fallback

{
  "mcpServers": {
    "spreshapp-ad-library": {
      "url": "https://api.spreshapp.com/mcp",
      "headers": {
        "Authorization": "Bearer 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 hosted 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 results for running shoes with product and lifestyle cards

search_ads

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

Brand search results showing several Acme pages

search_brands

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

A brand ad library showing backpack and hoodie creatives

get_brand_ads

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

Ad details dashboard with a world map and platform breakdown

get_ad_details

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

Creative analysis showing scores for hook, angle, persona, offer, and objection

analyze_creatives

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

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