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
Increment version to 0.3.2 and enhance README with direct access token usage
Yves Junqueira83d78ba62590
diff --git a/README.md b/README.mdindex 399573a..fe85241 100644--- a/README.md+++ b/README.md@@ -311,6 +311,13 @@ The Meta Ads MCP follows security best practices:uvx meta-ads-mcp```+4. You can provide a direct access token using the `META_ACCESS_TOKEN` environment variable. This bypasses both the local token cache and the Pipeboard authentication method:+ ```bash+ export META_ACCESS_TOKEN=your_access_token+ uvx meta-ads-mcp+ ```+ This is useful for CI/CD pipelines or when you already have a valid access token from another source.+## Testing### CLI Testing@@ -352,6 +359,11 @@ If you encounter authentication issues:- Run with `--force-login` to get a fresh token: `uvx meta-ads-mcp --login --app-id YOUR_APP_ID --force-login`- Make sure the terminal has permissions to open a browser window+3. Skip authentication entirely by providing a token directly:+ - If you already have a valid access token, you can bypass the authentication flow:+ - `export META_ACCESS_TOKEN=your_access_token`+ - This will ignore both the local token cache and the Pipeboard authentication+### API ErrorsIf you receive errors from the Meta API:diff --git a/meta_ads_mcp/__init__.py b/meta_ads_mcp/__init__.pyindex 0f71a3a..070c380 100644--- a/meta_ads_mcp/__init__.py+++ b/meta_ads_mcp/__init__.py@@ -7,7 +7,7 @@ with the Claude LLM.from meta_ads_mcp.core.server import main-__version__ = "0.3.1"+__version__ = "0.3.2"__all__ = ['get_ad_accounts',diff --git a/meta_ads_mcp/core/auth.py b/meta_ads_mcp/core/auth.pyindex e402bed..a8a08c9 100644--- a/meta_ads_mcp/core/auth.py+++ b/meta_ads_mcp/core/auth.py@@ -399,6 +399,16 @@ def exchange_token_for_long_lived(short_lived_token):async def get_current_access_token() -> Optional[str]:"""Get the current access token from auth manager"""+ # Check for environment variable first - this takes highest precedence+ env_token = os.environ.get("META_ACCESS_TOKEN")+ if env_token:+ logger.debug("Using access token from META_ACCESS_TOKEN environment variable")+ # Basic validation+ if len(env_token) < 20: # Most Meta tokens are much longer+ logger.error(f"TOKEN VALIDATION FAILED: Token from environment variable appears malformed (length: {len(env_token)})")+ return None+ return env_token+# Use the singleton auth managerglobal auth_managerdiff --git a/pyproject.toml b/pyproject.tomlindex 997f078..a706937 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -4,7 +4,7 @@ build-backend = "hatchling.build"[project]name = "meta-ads-mcp"-version = "0.3.1"+version = "0.3.2"description = "Model Calling Protocol (MCP) plugin for interacting with Meta Ads API"readme = "README.md"requires-python = ">=3.11"