Skip to content

Commit d835b34

Browse files
committed
refactor(meta-ads): replace OAuth with direct token authentication
- Remove OAuth PKCE flow from main.ts - Update getMetaAccessToken to use META_ACCESS_TOKEN environment variable - Update README with token-based authentication instructions - Update GitHub Actions workflows to use META_ACCESS_TOKEN secret - Update SECRETS.md documentation for token-based auth - Remove OAuth-related constants and comments
1 parent 3850ba0 commit d835b34

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

.github/workflows/SECRETS.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,13 @@ This document lists all secrets required to deploy MCPs via GitHub Actions.
3434
- **`PINECONE_INDEX`**: Pinecone index name (if required)
3535

3636
### MCP: `meta-ads`
37-
- **`META_APP_ID`**: Facebook App ID for Meta Ads
38-
- Obtain at: https://developers.facebook.com/apps/
39-
- **`META_APP_SECRET`**: Facebook App Secret for Meta Ads
40-
- Obtain at: https://developers.facebook.com/apps/ (Settings > Basic)
37+
- **`META_ACCESS_TOKEN`**: Facebook Access Token for Meta Ads API
38+
- Obtain at: https://developers.facebook.com/tools/explorer/
39+
- Select your app and generate token with required permissions:
40+
- `ads_read` - Read ad information
41+
- `ads_management` - Manage ads
42+
- `pages_read_engagement` - Read associated pages
43+
- `business_management` - Access business accounts
4144

4245
## How to Add Secrets on GitHub
4346

.github/workflows/deploy-preview.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ jobs:
8080
APIFY_API_TOKEN: ${{ secrets.APIFY_API_TOKEN }}
8181
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
8282
PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}
83-
META_APP_ID: ${{ secrets.META_APP_ID }}
84-
META_APP_SECRET: ${{ secrets.META_APP_SECRET }}
83+
META_ACCESS_TOKEN: ${{ secrets.META_ACCESS_TOKEN }}
8584

8685
- name: Save deployment info
8786
if: steps.deploy.outputs.preview_url

.github/workflows/deploy.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ jobs:
7474
APIFY_API_TOKEN: ${{ secrets.APIFY_API_TOKEN }}
7575
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
7676
PERPLEXITY_API_KEY: ${{ secrets.PERPLEXITY_API_KEY }}
77-
META_APP_ID: ${{ secrets.META_APP_ID }}
78-
META_APP_SECRET: ${{ secrets.META_APP_SECRET }}
77+
META_ACCESS_TOKEN: ${{ secrets.META_ACCESS_TOKEN }}
7978

8079
- name: Notify success
8180
if: success()

meta-ads/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "HTTP",
66
"url": "https://sites-meta-ads.decocache.com/mcp"
77
},
8-
"description": "Meta Ads Analytics - Analyze performance of Meta/Facebook advertising campaigns with detailed insights and metrics",
8+
"description": "https://developers.facebook.com/tools/explorer/ - Meta Ads Analytics - Analyze performance of Meta/Facebook advertising campaigns with detailed insights and metrics",
99
"icon": "https://upload.wikimedia.org/wikipedia/commons/thumb/0/05/Facebook_Logo_%282019%29.png/1200px-Facebook_Logo_%282019%29.png",
1010
"unlisted": false
1111
}

0 commit comments

Comments
 (0)