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
| Setting | Value |
|---|---|
| URL | https://api.pipory.com/mcp |
| Transport | Streamable HTTP, stateless, JSON responses |
| Auth | Authorization: Bearer pip_... (an API key) |
| Server name | Pipory |
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
401with{"error": "invalid_token", ...}and aWWW-Authenticate: Bearerheader. - A revoked, expired or otherwise invalid key answers
401with the API'sinvalid_api_keyerror. A trial workspace answers403upgrade_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
| Tool | Access | What it does |
|---|---|---|
whoami | read | The key's workspace, role, scopes and whether money is visible |
search_assets | read | Search the creative library by words, tags or media type, newest first |
get_asset | read | One creative with analysis, linked products and ads, collections and all-time performance |
top_creatives | read | Rank creatives by spend, ROAS, CTR, impressions or purchases |
list_collections | read | Collections with asset counts |
create_collection | write | Create a collection, optionally with assets |
add_to_collection | write | Add assets to an existing collection |
list_products | read | The Shopify catalog, optionally filtered |
get_product | read | A product and its creatives, best first |
ads_summary | read | Meta ads totals and top ads, or one ad's numbers |
whoami
No arguments. Returns workspace (id, name), role, scopes and revenue_visible.
search_assets
| Argument | Type | Notes |
|---|---|---|
query | string | Words that must all match: name, hook, description, angle, style, creator, OCR text, transcript, linked product. Up to 200 characters. |
tags | array of strings | Only assets carrying any of these tags |
media_type | string | image, video or audio |
limit | integer | 1 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
| Argument | Type | Notes |
|---|---|---|
asset_id | string | Required. The asset's UUID. |
Returns the same object as Get an asset, except url is the app path.
top_creatives
| Argument | Type | Notes |
|---|---|---|
metric | string | spend (default), roas, ctr, impressions or purchases |
days | integer | 1 to 365, default 30 |
date_from, date_to | date | YYYY-MM-DD, optional |
limit | integer | 1 to 25, default 10 |
min_impressions | integer | Default 0 |
Returns the same object as Top creatives. Without money access, roas and purchases fall back to spend order.
list_collections
| Argument | Type | Notes |
|---|---|---|
query | string | Match on the name. Up to 200 characters. |
limit | integer | 1 to 50, default 25 |
Returns the same object as List collections.
create_collection
Needs the write scope.
| Argument | Type | Notes |
|---|---|---|
name | string | Required. 1 to 120 characters. |
description | string | Up to 500 characters |
asset_ids | array of strings | Asset 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.
| Argument | Type | Notes |
|---|---|---|
collection_id | string | Required. The collection's UUID. |
asset_ids | array of strings | Required. 1 to 200 asset UUIDs. |
Returns the same object as Add assets to a collection.
list_products
| Argument | Type | Notes |
|---|---|---|
query | string | Match on title or handle. Up to 200 characters. |
limit | integer | 1 to 100, default 25 |
Returns total and products (each with id, title, handle, url).
get_product
Pass one of the three arguments.
| Argument | Type | Notes |
|---|---|---|
product_id | string | The product's UUID |
handle | string | The Shopify handle |
query | string | Find a product by title when you know neither |
Returns the same object as Get a product.
ads_summary
| Argument | Type | Notes |
|---|---|---|
ad_id | string | A Meta ad's Pipory UUID. Omit for the account. |
days | integer | 1 to 365, default 30 |
date_from, date_to | date | YYYY-MM-DD, optional |
limit | integer | Top 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?"
The server authenticates with an API key today. Signing in through Pipory from the MCP client (OAuth) is planned. Coming soon