meta-ads-mcp 0.10.5__py3-none-any.whl → 0.10.7__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.
- meta_ads_mcp/__init__.py +2 -3
- meta_ads_mcp/core/__init__.py +2 -2
- meta_ads_mcp/core/authentication.py +9 -2
- meta_ads_mcp/core/campaigns.py +1 -1
- {meta_ads_mcp-0.10.5.dist-info → meta_ads_mcp-0.10.7.dist-info}/METADATA +3 -2
- {meta_ads_mcp-0.10.5.dist-info → meta_ads_mcp-0.10.7.dist-info}/RECORD +9 -9
- {meta_ads_mcp-0.10.5.dist-info → meta_ads_mcp-0.10.7.dist-info}/WHEEL +0 -0
- {meta_ads_mcp-0.10.5.dist-info → meta_ads_mcp-0.10.7.dist-info}/entry_points.txt +0 -0
- {meta_ads_mcp-0.10.5.dist-info → meta_ads_mcp-0.10.7.dist-info}/licenses/LICENSE +0 -0
meta_ads_mcp/__init__.py
CHANGED
|
@@ -7,7 +7,7 @@ with the Claude LLM.
|
|
|
7
7
|
|
|
8
8
|
from meta_ads_mcp.core.server import main
|
|
9
9
|
|
|
10
|
-
__version__ = "0.10.
|
|
10
|
+
__version__ = "0.10.7"
|
|
11
11
|
|
|
12
12
|
__all__ = [
|
|
13
13
|
'get_ad_accounts',
|
|
@@ -24,7 +24,7 @@ __all__ = [
|
|
|
24
24
|
'get_ad_image',
|
|
25
25
|
'update_ad',
|
|
26
26
|
'get_insights',
|
|
27
|
-
'get_login_link'
|
|
27
|
+
# 'get_login_link' is conditionally exported via core.__all__
|
|
28
28
|
'login_cli',
|
|
29
29
|
'main',
|
|
30
30
|
'search_interests',
|
|
@@ -51,7 +51,6 @@ from .core import (
|
|
|
51
51
|
get_ad_image,
|
|
52
52
|
update_ad,
|
|
53
53
|
get_insights,
|
|
54
|
-
get_login_link,
|
|
55
54
|
login_cli,
|
|
56
55
|
main,
|
|
57
56
|
search_interests,
|
meta_ads_mcp/core/__init__.py
CHANGED
|
@@ -6,7 +6,7 @@ from .campaigns import get_campaigns, get_campaign_details, create_campaign
|
|
|
6
6
|
from .adsets import get_adsets, get_adset_details, update_adset
|
|
7
7
|
from .ads import get_ads, get_ad_details, get_ad_creatives, get_ad_image, update_ad
|
|
8
8
|
from .insights import get_insights
|
|
9
|
-
from .
|
|
9
|
+
from . import authentication # Import module to register conditional auth tools
|
|
10
10
|
from .server import login_cli, main
|
|
11
11
|
from .auth import login
|
|
12
12
|
from . import ads_library # Import module to register conditional tools
|
|
@@ -32,7 +32,7 @@ __all__ = [
|
|
|
32
32
|
'get_ad_image',
|
|
33
33
|
'update_ad',
|
|
34
34
|
'get_insights',
|
|
35
|
-
'get_login_link'
|
|
35
|
+
# Note: 'get_login_link' is registered conditionally by the authentication module
|
|
36
36
|
'login_cli',
|
|
37
37
|
'login',
|
|
38
38
|
'main',
|
|
@@ -21,6 +21,7 @@ Environment Variables:
|
|
|
21
21
|
- PIPEBOARD_API_TOKEN: Enables mode 2 (token-based auth)
|
|
22
22
|
- META_ADS_DISABLE_CALLBACK_SERVER: Disables local server, enables mode 3
|
|
23
23
|
- META_ACCESS_TOKEN: Direct Meta token (fallback)
|
|
24
|
+
- META_ADS_DISABLE_LOGIN_LINK: Hard-disables the get_login_link tool; returns a disabled message
|
|
24
25
|
"""
|
|
25
26
|
|
|
26
27
|
import json
|
|
@@ -32,8 +33,10 @@ from .server import mcp_server
|
|
|
32
33
|
from .utils import logger, META_APP_SECRET
|
|
33
34
|
from .pipeboard_auth import pipeboard_auth_manager
|
|
34
35
|
|
|
36
|
+
# Only register the login link tool if not explicitly disabled
|
|
37
|
+
ENABLE_LOGIN_LINK = not bool(os.environ.get("META_ADS_DISABLE_LOGIN_LINK", ""))
|
|
38
|
+
|
|
35
39
|
|
|
36
|
-
@mcp_server.tool()
|
|
37
40
|
async def get_login_link(access_token: str = None) -> str:
|
|
38
41
|
"""
|
|
39
42
|
Get a clickable login link for Meta Ads authentication.
|
|
@@ -195,4 +198,8 @@ async def get_login_link(access_token: str = None) -> str:
|
|
|
195
198
|
# Wait a moment to ensure the server is fully started
|
|
196
199
|
await asyncio.sleep(1)
|
|
197
200
|
|
|
198
|
-
|
|
201
|
+
return json.dumps(response, indent=2)
|
|
202
|
+
|
|
203
|
+
# Conditionally register as MCP tool only when enabled
|
|
204
|
+
if ENABLE_LOGIN_LINK:
|
|
205
|
+
get_login_link = mcp_server.tool()(get_login_link)
|
meta_ads_mcp/core/campaigns.py
CHANGED
|
@@ -115,7 +115,7 @@ async def create_campaign(
|
|
|
115
115
|
daily_budget: Daily budget in account currency (in cents) as a string (only used if use_adset_level_budgets=False)
|
|
116
116
|
lifetime_budget: Lifetime budget in account currency (in cents) as a string (only used if use_adset_level_budgets=False)
|
|
117
117
|
buying_type: Buying type (e.g., 'AUCTION')
|
|
118
|
-
bid_strategy: Bid strategy
|
|
118
|
+
bid_strategy: Bid strategy. Must be one of: 'LOWEST_COST_WITHOUT_CAP', 'LOWEST_COST_WITH_BID_CAP', 'COST_CAP', 'LOWEST_COST_WITH_MIN_ROAS'.
|
|
119
119
|
bid_cap: Bid cap in account currency (in cents) as a string
|
|
120
120
|
spend_cap: Spending limit for the campaign in account currency (in cents) as a string
|
|
121
121
|
campaign_budget_optimization: Whether to enable campaign budget optimization (only used if use_adset_level_budgets=False)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: meta-ads-mcp
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.7
|
|
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
|
|
@@ -33,7 +33,7 @@ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for in
|
|
|
33
33
|
|
|
34
34
|
## Community & Support
|
|
35
35
|
|
|
36
|
-
- [Discord](https://discord.gg/
|
|
36
|
+
- [Discord](https://discord.gg/YNjF7gUb5h). Join the community.
|
|
37
37
|
- [Email Support](info@pipeboard.co). Email us for support.
|
|
38
38
|
|
|
39
39
|
## Table of Contents
|
|
@@ -181,6 +181,7 @@ For local installation configuration, authentication options, and advanced techn
|
|
|
181
181
|
- `special_ad_categories`: List of special ad categories if applicable
|
|
182
182
|
- `daily_budget`: Daily budget in account currency (in cents)
|
|
183
183
|
- `lifetime_budget`: Lifetime budget in account currency (in cents)
|
|
184
|
+
- `bid_strategy`: Bid strategy. Must be one of: `LOWEST_COST_WITHOUT_CAP`, `LOWEST_COST_WITH_BID_CAP`, `COST_CAP`, `LOWEST_COST_WITH_MIN_ROAS`.
|
|
184
185
|
- Returns: Confirmation with new campaign details
|
|
185
186
|
|
|
186
187
|
7. `mcp_meta_ads_get_adsets`
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
meta_ads_mcp/__init__.py,sha256
|
|
1
|
+
meta_ads_mcp/__init__.py,sha256=jEK7AaH2t6LbW8yYlzH-GT55rratxLkzgq2Rka_Ps4o,1525
|
|
2
2
|
meta_ads_mcp/__main__.py,sha256=XaQt3iXftG_7f0Zu7Wop9SeFgrD2WBn0EQOaPMc27d8,207
|
|
3
|
-
meta_ads_mcp/core/__init__.py,sha256=
|
|
3
|
+
meta_ads_mcp/core/__init__.py,sha256=IEJtqpyUo0CZSUWeQPljQ-D2vKorTFwXnpBQWSi1hIM,1819
|
|
4
4
|
meta_ads_mcp/core/accounts.py,sha256=0lfyvRbhBigFKgNq5Mk3fk4Qh6MtIkKScdOnoc_rQkg,4314
|
|
5
5
|
meta_ads_mcp/core/ads.py,sha256=i7smFJSOm2DtQts1vXLt5y6q6uZE9paoKx58W4zToFo,57308
|
|
6
6
|
meta_ads_mcp/core/ads_library.py,sha256=BBGVbtjO5eFV42iiY3XPU-wIV8HupzUKpHgPBrydSvU,3232
|
|
7
7
|
meta_ads_mcp/core/adsets.py,sha256=kfggH1F2KD19iPDErE0QdKw2aVX7F409EPLDTM7MKnQ,16024
|
|
8
8
|
meta_ads_mcp/core/api.py,sha256=kWpIafvSsxnesfb5TqndA7ozKoIspby5e_6Jl23L7hY,16447
|
|
9
9
|
meta_ads_mcp/core/auth.py,sha256=2CjFbxpJM3OR3OzCipB8l_-l2xQ1nioGfdI3ZDMnjHM,23629
|
|
10
|
-
meta_ads_mcp/core/authentication.py,sha256
|
|
10
|
+
meta_ads_mcp/core/authentication.py,sha256=o5YMW0xmoTDiXDmpgVPo4mYSxCil6aGMQHbIeHxj_kg,10509
|
|
11
11
|
meta_ads_mcp/core/budget_schedules.py,sha256=UxseExsvKAiPwfDCY9aycT4kys4xqeNytyq-yyDOxrs,2901
|
|
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=bmALxAutNVGcZ5n5uabEMVx0NU8TJ8Y_LMCjbCfvsds,14081
|
|
14
14
|
meta_ads_mcp/core/duplication.py,sha256=UUmTDFx9o5ZsPQG2Rb9c4ZyuKUVN3FfTjebfTIHHdo4,18984
|
|
15
15
|
meta_ads_mcp/core/http_auth_integration.py,sha256=lGpKhfzJcyWugBcYEvypY-qnlt-3UDBLqh7xAUH0DGw,12473
|
|
16
16
|
meta_ads_mcp/core/insights.py,sha256=unhcCaYjgsir62llCdIDg0F-PHISiHune08uYG5IXTM,4707
|
|
@@ -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=nl_JVXNhCu85ho5ssklZiQYC3iL_oosdlpEuyCOVXcM,13824
|
|
23
23
|
meta_ads_mcp/core/utils.py,sha256=ytj41yC5SqduLrAiZYBSd6OUwlJRaIClTwnnYKpNFds,9387
|
|
24
|
-
meta_ads_mcp-0.10.
|
|
25
|
-
meta_ads_mcp-0.10.
|
|
26
|
-
meta_ads_mcp-0.10.
|
|
27
|
-
meta_ads_mcp-0.10.
|
|
28
|
-
meta_ads_mcp-0.10.
|
|
24
|
+
meta_ads_mcp-0.10.7.dist-info/METADATA,sha256=FdSw_UqDb3RFTjMuU9CBGPtK7CWgVqA9xYHg9p25W0s,23053
|
|
25
|
+
meta_ads_mcp-0.10.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
26
|
+
meta_ads_mcp-0.10.7.dist-info/entry_points.txt,sha256=Dv2RkoBjRJBqj6CyhwqGIiwPCD-SCL1-7B9-zmVRuv0,57
|
|
27
|
+
meta_ads_mcp-0.10.7.dist-info/licenses/LICENSE,sha256=E2d762fbhwKRYn8o7J6Szr6vyBPrHVDlK3jbHPx-d84,3851
|
|
28
|
+
meta_ads_mcp-0.10.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|