Skip to content

Meta Ads (Facebook/Instagram) MCP server for Claude, ChatGPT, Perplexity & Cursor — the Meta node of Pipeboard’s 5-platform family (+ Google, TikTok, Snap, Reddit). Hosted remote MCP, badged Meta Business Partner, free plan — no self-hosting required.

Enhance README with comprehensive MCP tools documentation

Yves Junqueiraadfdbcb67464
diff --git a/README.md b/README.md
index 9928ce7..551729f 100644
--- a/README.md
+++ b/README.md
@@ -63,7 +63,131 @@ Add this to your `claude_desktop_config.json` to integrate with Claude in Cursor
}
```
-### 1. Create a Meta Developer App
+### Available MCP Tools
+
+1. `mcp_meta_ads_get_ad_accounts`
+ - Get ad accounts accessible by a user
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `user_id`: Meta user ID or "me" for the current user
+ - `limit`: Maximum number of accounts to return (default: 10)
+ - Returns: List of accessible ad accounts with their details
+
+2. `mcp_meta_ads_get_account_info`
+ - Get detailed information about a specific ad account
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `account_id`: Meta Ads account ID (format: act_XXXXXXXXX)
+ - Returns: Detailed information about the specified account
+
+3. `mcp_meta_ads_get_campaigns`
+ - Get campaigns for a Meta Ads account with optional filtering
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `account_id`: Meta Ads account ID (format: act_XXXXXXXXX)
+ - `limit`: Maximum number of campaigns to return (default: 10)
+ - `status_filter`: Filter by status (empty for all, or 'ACTIVE', 'PAUSED', etc.)
+ - Returns: List of campaigns matching the criteria
+
+4. `mcp_meta_ads_get_campaign_details`
+ - Get detailed information about a specific campaign
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `campaign_id`: Meta Ads campaign ID
+ - Returns: Detailed information about the specified campaign
+
+5. `mcp_meta_ads_create_campaign`
+ - Create a new campaign in a Meta Ads account
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `account_id`: Meta Ads account ID (format: act_XXXXXXXXX)
+ - `name`: Campaign name
+ - `objective`: Campaign objective (AWARENESS, TRAFFIC, ENGAGEMENT, etc.)
+ - `status`: Initial campaign status (default: PAUSED)
+ - `special_ad_categories`: List of special ad categories if applicable
+ - `daily_budget`: Daily budget in account currency (in cents)
+ - `lifetime_budget`: Lifetime budget in account currency (in cents)
+ - Returns: Confirmation with new campaign details
+
+6. `mcp_meta_ads_get_adsets`
+ - Get ad sets for a Meta Ads account with optional filtering by campaign
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `account_id`: Meta Ads account ID (format: act_XXXXXXXXX)
+ - `limit`: Maximum number of ad sets to return (default: 10)
+ - `campaign_id`: Optional campaign ID to filter by
+ - Returns: List of ad sets matching the criteria
+
+7. `mcp_meta_ads_get_adset_details`
+ - Get detailed information about a specific ad set
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `adset_id`: Meta Ads ad set ID
+ - Returns: Detailed information about the specified ad set
+
+8. `mcp_meta_ads_get_ads`
+ - Get ads for a Meta Ads account with optional filtering
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `account_id`: Meta Ads account ID (format: act_XXXXXXXXX)
+ - `limit`: Maximum number of ads to return (default: 10)
+ - `campaign_id`: Optional campaign ID to filter by
+ - `adset_id`: Optional ad set ID to filter by
+ - Returns: List of ads matching the criteria
+
+9. `mcp_meta_ads_get_ad_details`
+ - Get detailed information about a specific ad
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `ad_id`: Meta Ads ad ID
+ - Returns: Detailed information about the specified ad
+
+10. `mcp_meta_ads_get_ad_creatives`
+ - Get creative details for a specific ad
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `ad_id`: Meta Ads ad ID
+ - Returns: Creative details including text, images, and URLs
+
+11. `mcp_meta_ads_get_ad_image`
+ - Get, download, and visualize a Meta ad image in one step
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `ad_id`: Meta Ads ad ID
+ - Returns: The ad image ready for direct visual analysis
+
+12. `mcp_meta_ads_get_insights`
+ - Get performance insights for a campaign, ad set, ad or account
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `object_id`: ID of the campaign, ad set, ad or account
+ - `time_range`: Time range for insights (default: maximum)
+ - `breakdown`: Optional breakdown dimension (e.g., age, gender, country)
+ - `level`: Level of aggregation (ad, adset, campaign, account)
+ - Returns: Performance metrics for the specified object
+
+13. `mcp_meta_ads_debug_image_download`
+ - Debug image download issues and report detailed diagnostics
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `url`: Direct image URL to test (optional)
+ - `ad_id`: Meta Ads ad ID (optional, used if url is not provided)
+ - Returns: Diagnostic information about image download attempts
+
+14. `mcp_meta_ads_save_ad_image_via_api`
+ - Try to save an ad image by using the Marketing API's attachment endpoints
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - `ad_id`: Meta Ads ad ID
+ - Returns: Results of attempts to save the ad image
+
+15. `mcp_meta_ads_get_login_link`
+ - Get a clickable login link for Meta Ads authentication
+ - Inputs:
+ - `access_token` (optional): Meta API access token (will use cached token if not provided)
+ - Returns: A clickable resource link for Meta authentication
+
+## Create a Meta Developer App
Before using the MCP server, you'll need to set up a Meta Developer App:
@@ -73,19 +197,7 @@ Before using the MCP server, you'll need to set up a Meta Developer App:
4. Configure your app's OAuth redirect URI to include `http://localhost:8888/callback`
5. Note your App ID (Client ID) for use with the MCP
-## Usage
-
-### Command-line Usage
-
-```bash
-# Start the MCP server
-uvx meta-ads-mcp
-
-# Authenticate with Meta Ads
-uvx meta-ads-mcp --login --app-id YOUR_APP_ID
-```
-
-### Authentication
+## Authentication
The Meta Ads MCP uses the OAuth 2.0 flow designed for desktop apps. When authenticating, it will:
@@ -125,55 +237,6 @@ Tokens are cached in a platform-specific secure location:
You do not need to provide your access token for each command; it will be automatically retrieved from the cache.
-## Usage Examples
-
-### Get Ad Accounts
-
-```python
-import asyncio
-from meta_ads_mcp import get_ad_accounts
-
-async def main():
- # Token will be automatically retrieved from cache
- accounts_json = await get_ad_accounts()
- print(accounts_json)
-
-asyncio.run(main())
-```
-
-### Get Campaign Details
-
-```python
-import asyncio
-from meta_ads_mcp import get_campaign_details
-
-async def main():
- # Provide a campaign ID
- campaign_details = await get_campaign_details(campaign_id="123456789")
- print(campaign_details)
-
-asyncio.run(main())
-```
-
-### Create a Campaign
-
-```python
-import asyncio
-from meta_ads_mcp import create_campaign
-
-async def main():
- result = await create_campaign(
- account_id="act_123456789",
- name="Test Campaign via MCP",
- objective="AWARENESS",
- status="PAUSED",
- daily_budget=1000 # $10.00
- )
- print(result)
-
-asyncio.run(main())
-```
-
## Environment Variables
You can set the following environment variables instead of passing them as arguments:
@@ -200,9 +263,9 @@ python test_meta_ads_auth.py --app-id YOUR_APP_ID --force-login
When using the Meta Ads MCP with an LLM interface (like Claude):
-1. Test authentication by calling the `get_login_link` tool
-2. Verify account access by calling `get_ad_accounts`
-3. Check specific account details with `get_account_info`
+1. Test authentication by calling the `mcp_meta_ads_get_login_link` tool
+2. Verify account access by calling `mcp_meta_ads_get_ad_accounts`
+3. Check specific account details with `mcp_meta_ads_get_account_info`
These functions will automatically handle authentication if needed and provide a clickable login link.
@@ -213,7 +276,7 @@ These functions will automatically handle authentication if needed and provide a
If you encounter authentication issues:
1. When using the LLM interface:
- - Use the `get_login_link` tool to generate a fresh authentication link
+ - Use the `mcp_meta_ads_get_login_link` tool to generate a fresh authentication link
- Ensure you click the link and complete the authorization flow in your browser
- Check that the callback server is running properly (the tool will report this)