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.
Python advertisingai-agentschatgptclaudefacebook-adsinstagram-adsmcpmeta-adsmodel-context-protocolpipeboard
fix(auth): make Bearer token patching work in streamable-http transport
Alexey Adamovskiyacc403b4a25e
diff --git a/meta_ads_mcp/core/api.py b/meta_ads_mcp/core/api.pyindex c2be79a..816e51f 100644--- a/meta_ads_mcp/core/api.py+++ b/meta_ads_mcp/core/api.py@@ -6,7 +6,8 @@ import httpximport asyncioimport functoolsimport os-from .auth import needs_authentication, get_current_access_token, auth_manager, start_callback_server, shutdown_callback_server+from . import auth+from .auth import needs_authentication, auth_manager, start_callback_server, shutdown_callback_serverfrom .utils import logger# Constants@@ -203,7 +204,7 @@ def meta_api_tool(func):# If access_token is not in kwargs or not kwargs['access_token'], try to get it from auth_managerif 'access_token' not in kwargs or not kwargs['access_token']:try:- access_token = await get_current_access_token()+ access_token = await auth.get_current_access_token()if access_token:kwargs['access_token'] = access_tokenlogger.debug("Using access token from auth_manager")diff --git a/meta_ads_mcp/core/authentication.py b/meta_ads_mcp/core/authentication.pyindex 3161da3..9cdbcdd 100644--- a/meta_ads_mcp/core/authentication.py+++ b/meta_ads_mcp/core/authentication.py@@ -29,7 +29,8 @@ from typing import Optionalimport asyncioimport osfrom .api import meta_api_tool-from .auth import start_callback_server, shutdown_callback_server, auth_manager, get_current_access_token+from . import auth+from .auth import start_callback_server, shutdown_callback_server, auth_managerfrom .server import mcp_serverfrom .utils import logger, META_APP_SECRETfrom .pipeboard_auth import pipeboard_auth_managerdiff --git a/meta_ads_mcp/core/duplication.py b/meta_ads_mcp/core/duplication.pyindex a1cdf28..7d6f394 100644--- a/meta_ads_mcp/core/duplication.py+++ b/meta_ads_mcp/core/duplication.py@@ -6,7 +6,7 @@ import httpxfrom typing import Optional, Dict, Any, List, Unionfrom .server import mcp_serverfrom .api import meta_api_tool-from .auth import get_current_access_token+from . import authfrom .http_auth_integration import FastMCPAuthIntegration@@ -204,7 +204,7 @@ async def _forward_duplication_request(resource_type: str, resource_id: str, acc# Use provided access_token parameter if no Facebook token found in contextif not facebook_token:- facebook_token = access_token if access_token else await get_current_access_token()+ facebook_token = access_token if access_token else await auth.get_current_access_token()# Validate we have both required tokensif not pipeboard_token: