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
Refactor project structure and update README for clarity
Yves Junqueira8d2a8b853e16
diff --git a/README.md b/README.mdindex db3e28d..86f6eab 100644--- a/README.md+++ b/README.md@@ -118,7 +118,7 @@ python test_meta_ads_auth.py --app-id YOUR_APP_ID```pythonimport asyncio-from meta_ads_generated import get_ad_accounts+from meta_ads_mcp import get_ad_accountsasync def main():# Token will be automatically retrieved from cache@@ -132,7 +132,7 @@ asyncio.run(main())```pythonimport asyncio-from meta_ads_generated import get_campaign_details+from meta_ads_mcp import get_campaign_detailsasync def main():# Provide a campaign ID@@ -146,7 +146,7 @@ asyncio.run(main())```pythonimport asyncio-from meta_ads_generated import create_campaign+from meta_ads_mcp import create_campaignasync def main():result = await create_campaign(@@ -222,53 +222,8 @@ If you receive errors from the Meta API:2. Ensure the user has appropriate permissions on the ad accounts3. Check if there are rate limits or other restrictions on your app-# Meta Ads MCP Wrapper--This repository contains a wrapper for the Meta Ads Marketing API Client Protocol (MCP) implementation.-## Files-- `meta_ads_generated.py`: The main MCP implementation for Meta Ads API-- `meta_ads_watch.py`: A wrapper script that monitors for file changes and automatically restarts the MCP server--## Requirements--- Python 3.6+-- [uv](https://github.com/astral-sh/uv) - A Python package installer and resolver-- Required Python packages (installed via uv)--## Usage--### Running with Auto-Reload--To run the Meta Ads MCP server with auto-reload capability:--```bash-./meta_ads_watch.py-```--This will:-1. Start the MCP server using `uv run python meta_ads_generated.py`-2. Monitor the main script file for changes-3. Automatically restart the server when changes are detected-4. Preserve stdin/stdout connections to ensure MCP clients stay connected--### Authentication--You can pass authentication arguments to the underlying script:--```bash-./meta_ads_watch.py --login --app-id YOUR_APP_ID-```--### Development--When developing, simply edit the `meta_ads_generated.py` file. The wrapper will detect changes and restart the server automatically while preserving the connections to any MCP clients.--## How It Works+This repository contains the implementation for the Meta Ads Marketing API Client Protocol (MCP).-The wrapper script:-- Uses a separate thread to monitor file changes-- Properly handles process termination and signal forwarding-- Ensures stdin/stdout are properly passed to the child process-- Writes status messages to stderr to avoid interfering with the MCP protocol\ No newline at end of file+- `meta_ads_generated.py`: The main MCP implementation for Meta Ads API\ No newline at end of filediff --git a/pyproject.toml b/pyproject.tomlindex 86aadfd..aff969c 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -33,7 +33,6 @@ dependencies = [[project.scripts]meta-ads-login = "meta_ads_mcp.meta_ads_generated:login_cli"-meta-ads-watch = "meta_ads_mcp.meta_ads_watch:main"[tool.hatch.build.targets.wheel]packages = ["meta_ads_mcp"]