Skip to content
API reference MCP server
API reference MCP

MCP server

Pipory's hosted Model Context Protocol server: its URL, transport, authentication and the ten tools it exposes to AI clients.

Pipory runs a hosted Model Context Protocol server, so an AI assistant such as Claude or Cursor can search your creative library, rank winners and read Meta ads performance for one workspace. The tools run the same services as the public API and Pip, so they see exactly what the key can see.

For step-by-step client setup, see MCP clients.

Connection

SettingValue
URLhttps://api.pipory.com/mcp
TransportStreamable HTTP, stateless, JSON responses
AuthAuthorization: Bearer pip_... (an API key)
Server namePipory

The server is stateless: every request stands on its own, so a Pipory deploy or restart never drops a connected client's session.

Authentication

Every request is checked with the same rules as the REST API: the key's workspace, its scopes, its creator's current role, the paid plan and the rate limit. REST and MCP calls with one key share one rate-limit window, and MCP responses carry the same X-RateLimit-* headers.

  • No key, or a value that is not a Pipory key, answers 401 with {"error": "invalid_token", ...} and a WWW-Authenticate: Bearer header.
  • A revoked, expired or otherwise invalid key answers 401 with the API's invalid_api_key error. A trial workspace answers 403 upgrade_required.
  • A tool the key cannot use (for example a write tool on a read-only key) returns a tool error that names the scope it needs. Nothing changes.

Money fields (spend, revenue, purchases, roas) appear only for keys with the Money scope created by an Admin. The server tells the assistant never to guess amounts when revenue_visible is false.

Tools

ToolAccessWhat it does
whoamireadThe key's workspace, role, scopes and whether money is visible
search_assetsreadSearch the creative library by words, tags or media type, newest first
get_assetreadOne creative with analysis, linked products and ads, collections and all-time performance
top_creativesreadRank creatives by spend, ROAS, CTR, impressions or purchases
list_collectionsreadCollections with asset counts
create_collectionwriteCreate a collection, optionally with assets
add_to_collectionwriteAdd assets to an existing collection
list_productsreadThe Shopify catalog, optionally filtered
get_productreadA product and its creatives, best first
ads_summaryreadMeta ads totals and top ads, or one ad's numbers

whoami

No arguments. Returns workspace (id, name), role, scopes and revenue_visible.

search_assets

ArgumentTypeNotes
querystringWords that must all match: name, hook, description, angle, style, creator, OCR text, transcript, linked product. Up to 200 characters.
tagsarray of stringsOnly assets carrying any of these tags
media_typestringimage, video or audio
limitinteger1 to 25, default 10

Returns count and assets (each with id, name, url, media_type, tags, hook, angle, style, and match, a snippet around the matched words).

get_asset

ArgumentTypeNotes
asset_idstringRequired. The asset's UUID.

Returns the same object as Get an asset, except url is the app path.

top_creatives

ArgumentTypeNotes
metricstringspend (default), roas, ctr, impressions or purchases
daysinteger1 to 365, default 30
date_from, date_todateYYYY-MM-DD, optional
limitinteger1 to 25, default 10
min_impressionsintegerDefault 0

Returns the same object as Top creatives. Without money access, roas and purchases fall back to spend order.

list_collections

ArgumentTypeNotes
querystringMatch on the name. Up to 200 characters.
limitinteger1 to 50, default 25

Returns the same object as List collections.

create_collection

Needs the write scope.

ArgumentTypeNotes
namestringRequired. 1 to 120 characters.
descriptionstringUp to 500 characters
asset_idsarray of stringsAsset UUIDs, up to 200

Returns the same object as Create a collection and fires collection.created with source: "mcp".

add_to_collection

Needs the write scope.

ArgumentTypeNotes
collection_idstringRequired. The collection's UUID.
asset_idsarray of stringsRequired. 1 to 200 asset UUIDs.

Returns the same object as Add assets to a collection.

list_products

ArgumentTypeNotes
querystringMatch on title or handle. Up to 200 characters.
limitinteger1 to 100, default 25

Returns total and products (each with id, title, handle, url).

get_product

Pass one of the three arguments.

ArgumentTypeNotes
product_idstringThe product's UUID
handlestringThe Shopify handle
querystringFind a product by title when you know neither

Returns the same object as Get a product.

ads_summary

ArgumentTypeNotes
ad_idstringA Meta ad's Pipory UUID. Omit for the account.
daysinteger1 to 365, default 30
date_from, date_todateYYYY-MM-DD, optional
limitintegerTop ads to list, 1 to 25, default 5

Returns the same object as Meta ads summary.

Prompts to try

  • "Which five creatives had the best ROAS in the last 30 days, and what hooks do they share?"
  • "Make a collection called Q4 winners with the top 10 creatives by spend." (needs a write key)
  • "Which of our videos feature the Classic Steel watch, and how did they perform?"
Sign in with Pipory

The server authenticates with an API key today. Signing in through Pipory from the MCP client (OAuth) is planned. Coming soon