Skip to MCP content

Ad research instructions for AI agents

Install PipiAds for your AI with MCP or CLI

Connect your AI to research ads, products and competitors in conversation.

1

Install PipiAds MCP

Add PipiAds MCP to local Work in the ChatGPT desktop app.

Requires Node.js 20+ · an API key ↗

View setup configuration

In the ChatGPT desktop app, open Settings → MCP servers → Add server and choose STDIO. Use npx with arguments -y and pipiads-mcp-server, and add the PIPIADS_API_KEY environment variable. Alternatively, add the TOML to your config file.

config.toml
~/.codex/config.toml
[mcp_servers.pipiads]
command = "npx"
args = ["-y", "pipiads-mcp-server"]

[mcp_servers.pipiads.env]
PIPIADS_API_KEY = "YOUR_PIPIADS_API_KEY"

Replace YOUR_PIPIADS_API_KEY in your local configuration. Keep your key private and out of Git.

Have an existing config?

Add this to ~/.codex/config.toml, keeping your existing settings. Update an existing [mcp_servers.pipiads] entry instead of adding it twice. ChatGPT desktop and Codex share this file on the same host.

Official setup guide ↗
2

Start researching in ChatGPT

Save and restart the MCP server, then research ads in a local Work conversation.

Start researching
View other MCP client configurations

Claude Desktop

Open Settings → Developer → Edit Config in Claude Desktop. Save the configuration in the file below.

mac: ~/Library/Application Support/Claude/claude_desktop_config.json

windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "pipiads": {
      "command": "npx",
      "args": ["-y", "pipiads-mcp-server"],
      "env": {"PIPIADS_API_KEY": "YOUR_PIPIADS_API_KEY"}
    }
  }
}

Fully quit and reopen Claude Desktop. Start a new chat and check that PipiAds tools are available.

Already have MCP servers? Add the pipiads entry to your existing mcpServers object; keep the other entries.

ChatGPT

In the ChatGPT desktop app, open Settings → MCP servers → Add server and choose STDIO. Use npx with arguments -y and pipiads-mcp-server, and add the PIPIADS_API_KEY environment variable. Alternatively, add the TOML to your config file.

all: ~/.codex/config.toml

[mcp_servers.pipiads]
command = "npx"
args = ["-y", "pipiads-mcp-server"]

[mcp_servers.pipiads.env]
PIPIADS_API_KEY = "YOUR_PIPIADS_API_KEY"

Save, select Restart in MCP servers, and start a local Work task. Type /mcp to inspect pipiads, then try a research example below.

Add this to ~/.codex/config.toml, keeping your existing settings. Update an existing [mcp_servers.pipiads] entry instead of adding it twice. ChatGPT desktop and Codex share this file on the same host.

Codex

For the Codex app, add the TOML to ~/.codex/config.toml and replace the API key placeholder. The CLI and IDE extension share this configuration. If you use the CLI, the command below is an alternative.

all: ~/.codex/config.toml

[mcp_servers.pipiads]
command = "npx"
args = ["-y", "pipiads-mcp-server"]

[mcp_servers.pipiads.env]
PIPIADS_API_KEY = "YOUR_PIPIADS_API_KEY"

Restart the Codex app and check PipiAds in MCP servers settings. In the CLI, start a new session and use /mcp to inspect the connection; codex mcp list shows the saved configuration.

Add this to ~/.codex/config.toml, keeping your existing settings. Update an existing [mcp_servers.pipiads] entry instead of adding it twice. ChatGPT desktop and Codex share this file on the same host.

Claude Code

Run this command in your project terminal after replacing the API key placeholder. It adds the server to Claude Code.

claude mcp add pipiads -e PIPIADS_API_KEY=YOUR_PIPIADS_API_KEY -- npx -y pipiads-mcp-server

Run claude mcp list to check the server, then open Claude Code in that project. Use /mcp to inspect its connection.

Cursor

Create or open .cursor/mcp.json in your project. Add the configuration below and save.

all: .cursor/mcp.json

{
  "mcpServers": {
    "pipiads": {
      "command": "npx",
      "args": ["-y", "pipiads-mcp-server"],
      "env": {"PIPIADS_API_KEY": "YOUR_PIPIADS_API_KEY"}
    }
  }
}

Open Cursor Settings → Tools & MCP (MCP in some versions). Enable pipiads, restart Cursor if needed, then use Agent chat.

Already have MCP servers? Add the pipiads entry to your existing mcpServers object; keep the other entries.

Windsurf

Open the MCP configuration file and add PipiAds. The path below is relative to your home directory.

all: ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "pipiads": {
      "command": "npx",
      "args": ["-y", "pipiads-mcp-server"],
      "env": {"PIPIADS_API_KEY": "YOUR_PIPIADS_API_KEY"}
    }
  }
}

Refresh MCP servers in Windsurf or restart the app. Check that pipiads is available in Cascade.

Already have MCP servers? Add the pipiads entry to your existing mcpServers object; keep the other entries.

OpenClaw

Add pipiads under mcp.servers in ~/.openclaw/openclaw.json, keeping your existing settings. This example requires an OpenClaw version with native MCP support.

all: ~/.openclaw/openclaw.json

{
  "mcp": {
    "servers": {
      "pipiads": {
        "command": "npx",
        "args": [
          "-y",
          "pipiads-mcp-server"
        ],
        "env": {
          "PIPIADS_API_KEY": "YOUR_PIPIADS_API_KEY"
        }
      }
    }
  }
}

Run openclaw mcp list to confirm pipiads is saved; this does not verify a connection. Apply the configuration through the reload or restart procedure of the Gateway or agent process that will use it. To verify tool discovery separately, stop the local Gateway and run openclaw mcp probe pipiads, then restart the Gateway and check PipiAds in a new agent conversation.

Merge the pipiads entry into your existing mcp.servers object, keeping other servers and settings. Do not add a top-level mcpServers field.

Other clients

Use a client that supports local stdio MCP servers. Set command to npx, arguments to -y and pipiads-mcp-server, and environment variable PIPIADS_API_KEY to your key. JSON format varies by client.

npx -y pipiads-mcp-server

Restart or reconnect the MCP server in your client. This package uses local stdio; it does not provide a hosted HTTP or SSE connection URL.

Grok Build

Add the configuration to ~/.grok/config.toml and set your API key locally. This setup is for Grok Build.

all: ~/.grok/config.toml

[mcp_servers.pipiads]
command = "npx"
args = ["-y", "pipiads-mcp-server"]

[mcp_servers.pipiads.env]
PIPIADS_API_KEY = "YOUR_PIPIADS_API_KEY"

Open /mcps in Grok Build, refresh PipiAds, then start a conversation.

Merge this into ~/.grok/config.toml, keeping your existing settings. Update an existing [mcp_servers.pipiads] entry instead of adding it twice.

1

Send this to Claude Code

Set up PipiAds CLI for me:
1. Check Node.js; version 20 or higher is required.
2. Run npm install -g pipiads-cli.
3. Run pipiads --help to check the installation.
4. Check only whether PIPIADS_API_KEY is set in this execution environment. Never read or display its value. If missing, ask me to configure it locally.
Tell me when ready; do not run paid queries yet.
2

Connect and start researching

Set your API key in the environment your agent uses, then ask it to search ads, discover products or research competitors.

Set up your API key Get your API key & credits ↗
export PIPIADS_API_KEY="YOUR_PIPIADS_API_KEY"
$env:PIPIADS_API_KEY = "YOUR_PIPIADS_API_KEY"
Start researching

Ideas to get you started

Start with a better question.

Copy a prompt into your connected assistant. Add your market, category and time window to make it yours.

Try this question

Find skincare ads running in the US for over 30 days. Compare their creative hooks.

Show sample reportHide sample report
PipiAds · Ad research
TikTok & FacebookUnited States30+ active days
  • Product-first demo

    Lead with the product in use, then explain what it does.

  • Problem → solution

    Open with a specific skincare concern, then show the solution.

  • Creator-led story

    Build the story around a first-person experience and supporting evidence.

Compare the opening hook, product promise, and landing page. Keep source links with every finding.

Illustrative research output · Actual findings depend on your query.

Creative research

Find the hooks worth studying

Use PipiAds to find 5 active TikTok ads about skincare in the US from the last 30 days. Compare hooks, delivery days and engagement. Include source links and separate facts from your interpretation.

Research workflow illustration

Give your AI a scope

US · TikTokSkincare · Last 30 daysUp to 5 ads
Compare hooks and delivery

Ask your AI to return

  • Creatives and source links
  • Delivery days and engagement
  • Facts separate from interpretation

Competitor research

Understand a store’s ad strategy

Help me analyze a competitor with PipiAds. First ask for the store domain, market and date range. Then identify its longest-running ads, product focus and regional distribution. Keep the report linked to its sources.

Research workflow illustration

Give your AI a scope

Competitor store domainTarget marketDate range
Map the store’s ad strategy

Ask your AI to return

  • Longest-running ads
  • Product and regional focus
  • Conclusions linked to sources

Product research

Build an evidence-based shortlist

Use PipiAds to find 5 TikTok Shop beauty products in the US with rising sales over the last 7 days. Compare sales, GMV, price and creator activity. Explain what to validate before choosing a product.

Visual discovery

Follow an idea across the market

Help me find products and ads similar to an image using PipiAds. Ask me for a public image URL, submit it, and check the search status until complete. Then return up to 5 similar products with source links.

View detailed tool sequences for four research tasks

Collect inputs, choose tools or commands, then check sources and cost. Use MCP tools/list for parameters and CLI --help for command options.

Ad creative research

Inputs
Keyword, platform, region, time range, and result limit.
MCP sequence
search_ads → choose a returned ID → get_ad_detail.
CLI sequence
pipiads adspy list --current-page 1 --page-size 5 --plat-type 1 --keyword skincare → pipiads adspy detail --id <returned-ad-id>
Check output
Include creative URLs, delivery time, engagement, and separate facts from interpretation.

Product research

Inputs
Product keyword, platform, region, time range, and result limit.
MCP sequence
search_products → choose a returned ID → get_product_detail.
CLI sequence
pipiads product list --current-page 1 --page-size 5 --plat-type 1 --keyword garden → pipiads product detail --id <returned-product-id>
Check output
Keep product sources, prices, ad signals, and hypotheses still needing validation.

Competitor store research

Inputs
Store domain or name, market, and time range; search for an ID if needed.
MCP sequence
search_stores → get_store_detail → get_store_longest_run_ads if needed.
CLI sequence
pipiads store rank-list --data-type 0 --time 0 --sort 0 --sort-type desc --page-size 5 --current-page 1 --keyword example.com → pipiads store detail --id <returned-store-id>
Check output
Report ad and product focus, cite every conclusion, and separate data from inference.

Similar-image search

Inputs
One public image URL or local image file and the target result type.
MCP sequence
ai_search_submit_image → ai_search_image_status → ai_search_image_products after SEARCH_COMPLETED; stop on failure.
CLI sequence
pipiads ai-search-image submit-url --image-url https://example.com/image.jpg → pipiads ai-search-image status --image-id <returned-image-id> → pipiads ai-search-image product-search --image-id <returned-image-id> --current-page 1 --page-size 5
Check output
Return matches and sources only after processing completes; explain failure status and next step.

Know what a query uses.

The MCP package is free to install. PipiAds API usage is billed in credits; your AI client may have a separate subscription.

List & search

Typically 1 credit / result

Start with a small result limit. Endpoint pricing applies.

Ad & product details

Typically 1 credit / request

Some endpoints waive repeat queries within 3 days.

Create a monitor

1 credit / successful task

Canceling a task does not refund credits already used.

Monitoring reads/settings and image submission are free according to the API documentation. Image result searches have endpoint-specific pricing. Check current billing in your API dashboard. Get your API key & credits ↗

PipiAds site membership, AI client subscriptions, and Open API credits are managed separately. Open API keys and billing are available through Pipispy; check account access there if the key or balance is missing.

Explore the toolkit

A full research toolkit. One MCP server.

Browse every registered tool. Your assistant chooses the right one for the task; you can also ask for a tool by name.

73tools
Discover CLI commands

Use pipiads --help for domains and pipiads <domain> <command> --help for required options. The reference domain provides documentation metadata only.

pipiads --help
pipiads adspy list --help
pipiads ai-search-image status --help
Ads & organic videosRead

search_ads

Search TikTok/Facebook ads. Use extend_keywords for text; filter by AI creative type, active state, region, engagement, spend and dates. 1 credit per result.

Ads & organic videosRead

get_ad_detail

Get detailed info for a specific ad by video ID. 1 credit (free if queried within 3 days).

ProductsRead

search_products

Search e-commerce products advertised on TikTok/Facebook. Filter by keyword, price, category, region, ad metrics. 1 credit per result.

ProductsRead

get_product_detail

Get product detail including images, price, landing page, Shopify data. 1 credit (free if queried within 3 days).

ProductsRead

search_adlibrary_products

Search Meta Ad Library products. Filter by price, platform, ad status, active days. 1 credit per result.

ProductsRead

get_adlibrary_product_detail

Get Meta Ad Library product detail with store and advertiser info. 1 credit.

TikTok ShopRead

search_tiktok_products

Search TikTok Shop products by sales, GMV, price, trends, influencers. Requires sort, sort_type, time. 1 credit per result.

TikTok ShopRead

get_tiktok_product_detail

Get TikTok Shop product detail. 1 credit (free if queried within 3 days).

TikTok ShopRead

search_tiktok_shops

Search TikTok Shop stores by sales, GMV, product count, influencers.

TikTok ShopRead

get_tiktok_shop_detail

Get TikTok Shop store detail by ID.

Stores & advertisersRead

search_advertisers

Search advertiser leaderboard. Filter by platform, region, ad metrics, monthly visits.

Stores & advertisersRead

get_advertiser_detail

Get advertiser detail by ID. Returns domain, ad count, products, region distribution.

Stores & advertisersRead

search_stores

Search store ranking list. Filter by platform, region, ad metrics, monthly visits.

Stores & advertisersRead

get_store_detail

Get store detail by 13-char store ID.

Stores & advertisersRead

get_store_competition

Get store competition product options for analysis.

Stores & advertisersRead

get_store_data_analysis

Get store all-platform data analysis (TikTok, Facebook, Meta).

Stores & advertisersRead

get_store_play_cost

Get store play cost / daily ad increment statistics.

Stores & advertisersRead

get_store_region_analysis

Get store regional ad distribution analysis.

Stores & advertisersRead

get_store_ad_copy_analysis

Get store TikTok ad copy analysis with pagination.

Stores & advertisersRead

get_store_ad_schedule

Get store ad campaign schedule.

Stores & advertisersRead

get_store_product_analysis

Get store product analysis.

Stores & advertisersRead

get_store_rank_data

Get store traffic ranking data.

Stores & advertisersRead

get_store_ad_trend

Get store Meta Ad Library ad trend analysis. Requires start_time and end_time.

Stores & advertisersRead

get_store_delivery_analysis

Get store Meta Ad Library in-depth delivery analysis.

Stores & advertisersRead

get_store_longest_run_ads

Get store longest-running ad content from Meta Ad Library.

Stores & advertisersRead

get_store_most_used_ads

Get store most-used ad content from Meta Ad Library.

Stores & advertisersRead

get_store_fb_pages

Get store Facebook advertiser pages from Meta Ad Library.

Ads & organic videosRead

search_lib_ads

Search Meta Ad Library ads. Filter by content, platform, status, cost, reach, active days.

Ads & organic videosRead

get_lib_ad_detail

Get Meta Ad Library ad detail by ID.

RankingsRead

get_product_ranking

Get ad product ranking list. Requires sort_key, sort_type, time, type.

RankingsRead

get_new_product_ranking

Get new ad product ranking list. Requires found_time, sort_key, sort_type, type.

RankingsRead

get_app_ranking

Get top apps ranking list.

RankingsRead

get_new_app_ranking

Get new apps ranking list.

RankingsRead

get_app_dev_ranking

Get top app developers ranking list.

Apps & developersRead

search_apps

Search apps advertised on TikTok/Facebook. Filter by category, system, downloads, revenue.

Apps & developersRead

get_app_detail

Get app detail by ID.

Apps & developersRead

search_app_developers

Search app developers. Filter by app count, downloads, revenue.

Apps & developersRead

get_app_developer_detail

Get app developer detail by ID.

Ads & organic videosRead

search_natural_videos

Search TikTok Made Me Buy It / natural traffic videos. Filter by plays, likes, followers.

MonitoringRead

search_fb_advertisers

Search Facebook advertisers by name (for creating monitor tasks).

MonitoringWrite

create_monitor_task

Create Facebook advertiser or store/website monitoring tasks. Supply exactly one target list, max 50. 1 credit per successful creation. Does not monitor TikTok.

MonitoringRead

list_monitor_tasks

List all ad monitoring tasks with optional filters.

MonitoringRead

get_monitor_task_detail

Get monitor task detail by task ID.

MonitoringWrite

cancel_monitor_task

Cancel an ad monitoring task.

MonitoringRead

get_monitor_board

Get monitoring task overview dashboard.

MonitoringWrite

set_monitor_task_group

Assign a monitor task to a group.

MonitoringRead

get_monitor_realtime_overview

Get real-time overview of a monitor task.

MonitoringRead

get_monitor_daily_overview

Get daily overview of a monitor task.

MonitoringRead

get_monitor_landing_pages_overview

Get landing pages overview for a monitor task.

MonitoringRead

get_monitor_latest_products

Get latest ad products discovered by a monitor task.

MonitoringRead

get_monitor_product_list

Get ad product list for a monitor task with filters.

MonitoringRead

get_monitor_landing_page_list

Get landing page list for a monitor task.

MonitoringRead

get_monitor_ad_count_stats

Get ad count statistics for a monitor task.

MonitoringRead

get_monitor_deep_analysis

Get deep campaign analysis for a monitor task.

MonitoringRead

get_monitor_most_used_copy

Get most-used ad copy for a monitor task.

MonitoringRead

get_monitor_longest_run_copy

Get longest-running ad copy for a monitor task.

MonitoringRead

get_monitor_ad_list

Get ad list for a monitor task with extensive filters.

MonitoringRead

get_monitor_ad_detail

Get ad detail from a monitor task by ad ID.

MonitoringRead

get_monitor_product_stats

Get active ad product statistics for a monitor task.

MonitoringWrite

create_monitor_group

Create a new monitor task group.

MonitoringRead

list_monitor_groups

List all monitor task groups.

MonitoringWrite

update_monitor_group

Update a monitor group name.

MonitoringWrite

delete_monitor_group

Delete a monitor group.

MonitoringRead

get_monitor_notifications

Get current notification settings.

MonitoringWrite

save_monitor_notifications

Save notification settings (email, instant alerts, reports).

Image searchWrite

ai_search_submit_image

Submit exactly one public image URL or Base64 image for visual search. Free. Returns an image ID string; poll status before fetching results.

Image searchRead

ai_search_image_status

Check processing status of a submitted image search.

Image searchRead

ai_search_image_summary

Get result summary of an AI image search.

Image searchRead

ai_search_image_ads

Search ads similar to a submitted image.

Image searchRead

ai_search_image_products

Search products similar to a submitted image.

Image searchRead

ai_search_image_stores

Search stores/advertisers similar to a submitted image.

Image searchRead

ai_search_image_tiktok_products

Search TikTok Shop products similar to a submitted image.

Image searchRead

ai_search_image_tiktok_shops

Search TikTok shops similar to a submitted image.

Questions, answered

Good questions. Clear answers.

What is PipiAds MCP?

PipiAds MCP connects a compatible AI assistant to PipiAds advertising intelligence through the Model Context Protocol. The assistant can call tools to search ads, investigate products and stores, and work with monitoring data while you describe the task in plain language.

Which AI clients can I use?

The MCP setup covers ChatGPT desktop, Claude Desktop, Cursor and Grok Build. Claude Code, Codex, Cursor, OpenClaw and Hermes can use the CLI when terminal access is available. Grok web connectors require a remote server URL; this package provides local stdio.

Do I need an API key or a paid plan?

You need a PipiAds Open API key and enough credits for paid endpoints. A PipiAds site membership or AI-client subscription does not include Open API credits. Get the Open API key and manage billing through Pipispy; check access and balance there.

Where does my API key go?

For MCP, put PIPIADS_API_KEY in the local client configuration. For CLI, set the same environment variable in the command process. This page never asks you to enter a key. Do not put keys in prompts or commit them to a repository.

Can it monitor TikTok competitors automatically?

Persistent monitoring tools cover Facebook advertisers and stores or websites. TikTok research uses search and detail tools. MCP does not itself schedule AI conversations; recurring reports need a scheduler in your client or workflow.

How does image search work?

Submit exactly one public HTTP/HTTPS image URL or Base64 image. JPEG, PNG, GIF, BMP and WebP are supported, up to 10 MiB. Use the returned image ID to check status, wait for SEARCH_COMPLETED, then fetch results. Stop on ANALYSIS_FAILURE or SEARCH_FAILURE.

The server is not showing up. What should I check?

Run node --version and npx --version in a terminal; Node.js must be 20 or later. Check that the JSON or TOML is valid, your key is set, and the client supports stdio. Restart the app completely. If it cannot find npx, use its absolute executable path from your local installation and check the client’s MCP logs.

What if a query fails or returns no results?

For authentication errors, check your API key. For credit or permission errors, check your API dashboard. For empty results, broaden the date range, region or keywords. The default timeout is 30 seconds and can be adjusted with PIPIADS_TIMEOUT_MS. Calls are not automatically retried: a timed-out paid query or write may already have been processed.

Your next insight starts with a question.

Connect PipiAds to the assistant you already work with.

top-active

Could not access the clipboard. Select the text below and copy it manually.