meta-ads-mcp 1.0.15__py3-none-any.whl → 1.0.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of meta-ads-mcp might be problematic. Click here for more details.
- meta_ads_mcp/__init__.py +1 -1
- meta_ads_mcp/core/campaigns.py +35 -1
- {meta_ads_mcp-1.0.15.dist-info → meta_ads_mcp-1.0.16.dist-info}/METADATA +37 -1
- {meta_ads_mcp-1.0.15.dist-info → meta_ads_mcp-1.0.16.dist-info}/RECORD +7 -7
- {meta_ads_mcp-1.0.15.dist-info → meta_ads_mcp-1.0.16.dist-info}/WHEEL +0 -0
- {meta_ads_mcp-1.0.15.dist-info → meta_ads_mcp-1.0.16.dist-info}/entry_points.txt +0 -0
- {meta_ads_mcp-1.0.15.dist-info → meta_ads_mcp-1.0.16.dist-info}/licenses/LICENSE +0 -0
meta_ads_mcp/__init__.py
CHANGED
meta_ads_mcp/core/campaigns.py
CHANGED
|
@@ -9,7 +9,14 @@ from .server import mcp_server
|
|
|
9
9
|
|
|
10
10
|
@mcp_server.tool()
|
|
11
11
|
@meta_api_tool
|
|
12
|
-
async def get_campaigns(
|
|
12
|
+
async def get_campaigns(
|
|
13
|
+
account_id: str,
|
|
14
|
+
access_token: Optional[str] = None,
|
|
15
|
+
limit: int = 10,
|
|
16
|
+
status_filter: str = "",
|
|
17
|
+
objective_filter: Union[str, List[str]] = "",
|
|
18
|
+
after: str = ""
|
|
19
|
+
) -> str:
|
|
13
20
|
"""
|
|
14
21
|
Get campaigns for a Meta Ads account with optional filtering.
|
|
15
22
|
|
|
@@ -26,6 +33,11 @@ async def get_campaigns(account_id: str, access_token: Optional[str] = None, lim
|
|
|
26
33
|
status_filter: Filter by effective status (e.g., 'ACTIVE', 'PAUSED', 'ARCHIVED').
|
|
27
34
|
Maps to the 'effective_status' API parameter, which expects an array
|
|
28
35
|
(this function handles the required JSON formatting). Leave empty for all statuses.
|
|
36
|
+
objective_filter: Filter by campaign objective(s). Can be a single objective string or a list of objectives.
|
|
37
|
+
Valid objectives: 'OUTCOME_AWARENESS', 'OUTCOME_TRAFFIC', 'OUTCOME_ENGAGEMENT',
|
|
38
|
+
'OUTCOME_LEADS', 'OUTCOME_SALES', 'OUTCOME_APP_PROMOTION'.
|
|
39
|
+
Examples: 'OUTCOME_LEADS' or ['OUTCOME_LEADS', 'OUTCOME_SALES'].
|
|
40
|
+
Leave empty for all objectives.
|
|
29
41
|
after: Pagination cursor to get the next set of results
|
|
30
42
|
"""
|
|
31
43
|
# Require explicit account_id
|
|
@@ -38,10 +50,32 @@ async def get_campaigns(account_id: str, access_token: Optional[str] = None, lim
|
|
|
38
50
|
"limit": limit
|
|
39
51
|
}
|
|
40
52
|
|
|
53
|
+
# Build filtering array for complex filtering
|
|
54
|
+
filters = []
|
|
55
|
+
|
|
41
56
|
if status_filter:
|
|
42
57
|
# API expects an array, encode it as a JSON string
|
|
43
58
|
params["effective_status"] = json.dumps([status_filter])
|
|
44
59
|
|
|
60
|
+
# Handle objective filtering - supports both single string and list of objectives
|
|
61
|
+
if objective_filter:
|
|
62
|
+
# Convert single string to list for consistent handling
|
|
63
|
+
objectives = [objective_filter] if isinstance(objective_filter, str) else objective_filter
|
|
64
|
+
|
|
65
|
+
# Filter out empty strings
|
|
66
|
+
objectives = [obj for obj in objectives if obj]
|
|
67
|
+
|
|
68
|
+
if objectives:
|
|
69
|
+
filters.append({
|
|
70
|
+
"field": "objective",
|
|
71
|
+
"operator": "IN",
|
|
72
|
+
"value": objectives
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
# Add filtering parameter if we have filters
|
|
76
|
+
if filters:
|
|
77
|
+
params["filtering"] = json.dumps(filters)
|
|
78
|
+
|
|
45
79
|
if after:
|
|
46
80
|
params["after"] = after
|
|
47
81
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meta-ads-mcp
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.16
|
|
4
4
|
Summary: Model Context Protocol (MCP) server for interacting with Meta Ads API
|
|
5
5
|
Project-URL: Homepage, https://github.com/pipeboard-co/meta-ads-mcp
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/pipeboard-co/meta-ads-mcp/issues
|
|
@@ -68,6 +68,16 @@ The fastest and most reliable way to get started is to **[🚀 Get started with
|
|
|
68
68
|
|
|
69
69
|
That's it! You can now ask Claude to analyze your Meta ad campaigns, get performance insights, and manage your advertising.
|
|
70
70
|
|
|
71
|
+
#### Advanced: Direct Token Authentication (Claude)
|
|
72
|
+
|
|
73
|
+
For direct token-based authentication without the interactive flow, use this URL format when adding the integration:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
https://mcp.pipeboard.co/meta-ads-mcp?token=YOUR_PIPEBOARD_TOKEN
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Get your token at [pipeboard.co/api-tokens](https://pipeboard.co/api-tokens).
|
|
80
|
+
|
|
71
81
|
### For Cursor Users
|
|
72
82
|
|
|
73
83
|
Add the following to your `~/.cursor/mcp.json`. Once you enable the remote MCP, click on "Needs login" to finish the login process.
|
|
@@ -83,12 +93,38 @@ Add the following to your `~/.cursor/mcp.json`. Once you enable the remote MCP,
|
|
|
83
93
|
}
|
|
84
94
|
```
|
|
85
95
|
|
|
96
|
+
#### Advanced: Direct Token Authentication (Cursor)
|
|
97
|
+
|
|
98
|
+
If you prefer to authenticate without the interactive login flow, you can include your Pipeboard API token directly in the URL:
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"mcpServers": {
|
|
103
|
+
"meta-ads-remote": {
|
|
104
|
+
"url": "https://mcp.pipeboard.co/meta-ads-mcp?token=YOUR_PIPEBOARD_TOKEN"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Get your token at [pipeboard.co/api-tokens](https://pipeboard.co/api-tokens).
|
|
111
|
+
|
|
86
112
|
### For Other MCP Clients
|
|
87
113
|
|
|
88
114
|
Use the Remote MCP URL: `https://mcp.pipeboard.co/meta-ads-mcp`
|
|
89
115
|
|
|
90
116
|
**[📖 Get detailed setup instructions for your AI client here](https://pipeboard.co)**
|
|
91
117
|
|
|
118
|
+
#### Advanced: Direct Token Authentication (Other Clients)
|
|
119
|
+
|
|
120
|
+
For MCP clients that support token-based authentication, you can append your Pipeboard API token to the URL:
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
https://mcp.pipeboard.co/meta-ads-mcp?token=YOUR_PIPEBOARD_TOKEN
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
This bypasses the interactive login flow and authenticates immediately. Get your token at [pipeboard.co/api-tokens](https://pipeboard.co/api-tokens).
|
|
127
|
+
|
|
92
128
|
## Local Installation (Technical Users Only)
|
|
93
129
|
|
|
94
130
|
If you're a developer or need to customize the installation, you can run Meta Ads MCP locally. **Most marketers should use the Remote MCP above instead!** For complete technical setup instructions, see our **[Local Installation Guide](LOCAL_INSTALLATION.md)**.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
meta_ads_mcp/__init__.py,sha256=
|
|
1
|
+
meta_ads_mcp/__init__.py,sha256=1vRTFKaJdcF1Ly2KZBp1Hp2QY-62dPdo5uEF1F4lsYo,1477
|
|
2
2
|
meta_ads_mcp/__main__.py,sha256=XaQt3iXftG_7f0Zu7Wop9SeFgrD2WBn0EQOaPMc27d8,207
|
|
3
3
|
meta_ads_mcp/core/__init__.py,sha256=IEJtqpyUo0CZSUWeQPljQ-D2vKorTFwXnpBQWSi1hIM,1819
|
|
4
4
|
meta_ads_mcp/core/accounts.py,sha256=7Zoqq0zMIJi_Xsxe9-_b3EYx-UTeieJJvO7HxVRuUS0,4327
|
|
@@ -10,7 +10,7 @@ meta_ads_mcp/core/auth.py,sha256=l_IvejK2KYXg8yhBiP0ifE6mGwJ6ZujqYQbVw1KOUME,236
|
|
|
10
10
|
meta_ads_mcp/core/authentication.py,sha256=bAdmlSxQpqFN1vup9Wijl-iCfPLPMyFfMhIPdoNOPYg,10540
|
|
11
11
|
meta_ads_mcp/core/budget_schedules.py,sha256=FVyJuKbjUE4cmtlPJEbIwpN6JmU-1WQjc7io1y5JaHE,2911
|
|
12
12
|
meta_ads_mcp/core/callback_server.py,sha256=LIAJv9DW--83kdZ7VWWZal8xEprYjRZ8iug4rMczYbQ,9372
|
|
13
|
-
meta_ads_mcp/core/campaigns.py,sha256=
|
|
13
|
+
meta_ads_mcp/core/campaigns.py,sha256=LKo5B8hNUUmfVQ1iu88o8HoU9ixOlGS9lwmPu6x9keA,15604
|
|
14
14
|
meta_ads_mcp/core/duplication.py,sha256=pJ41pI9bIxNf21TSy6KkpcUsc3aSr4KIiO__sunNoq0,18909
|
|
15
15
|
meta_ads_mcp/core/http_auth_integration.py,sha256=lGpKhfzJcyWugBcYEvypY-qnlt-3UDBLqh7xAUH0DGw,12473
|
|
16
16
|
meta_ads_mcp/core/insights.py,sha256=ogSGlC0ddh8RFzWydilfDc7GYnjtInFiEQS7cSoyTmw,5061
|
|
@@ -21,8 +21,8 @@ meta_ads_mcp/core/resources.py,sha256=-zIIfZulpo76vcKv6jhAlQq91cR2SZ3cjYZt3ek3x0
|
|
|
21
21
|
meta_ads_mcp/core/server.py,sha256=9SlgM_qvdlxo24ctnZzLgW1e1nfAspCSx3YyJQkKP64,17856
|
|
22
22
|
meta_ads_mcp/core/targeting.py,sha256=d2uLWbIEtucRuTgwZEdtVKLDZJgaxQ1lDtZ0ZgkBJC4,25150
|
|
23
23
|
meta_ads_mcp/core/utils.py,sha256=ytj41yC5SqduLrAiZYBSd6OUwlJRaIClTwnnYKpNFds,9387
|
|
24
|
-
meta_ads_mcp-1.0.
|
|
25
|
-
meta_ads_mcp-1.0.
|
|
26
|
-
meta_ads_mcp-1.0.
|
|
27
|
-
meta_ads_mcp-1.0.
|
|
28
|
-
meta_ads_mcp-1.0.
|
|
24
|
+
meta_ads_mcp-1.0.16.dist-info/METADATA,sha256=N0dMtlXVrGmyFLgv3-IKS14giZL6JVXD_n9hjTZW3Os,25499
|
|
25
|
+
meta_ads_mcp-1.0.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
26
|
+
meta_ads_mcp-1.0.16.dist-info/entry_points.txt,sha256=Dv2RkoBjRJBqj6CyhwqGIiwPCD-SCL1-7B9-zmVRuv0,57
|
|
27
|
+
meta_ads_mcp-1.0.16.dist-info/licenses/LICENSE,sha256=E2d762fbhwKRYn8o7J6Szr6vyBPrHVDlK3jbHPx-d84,3851
|
|
28
|
+
meta_ads_mcp-1.0.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|