mcpdevlabs

Connect your data sources

Everything is done in https://<your-hostname>/setup. You never edit files on the server. Each source below is independent — connect the ones you use, in any order.

Start these two first — they involve approvals by Google / LinkedIn that can take days: the Google Ads developer token (step B) and LinkedIn's Advertising API access.


Google — Ads, Analytics 4, Search Console, Keyword Planner

One connection covers all four. You need a Google account that has access to your Google Ads, GA4 and Search Console, and 20 minutes in Google Cloud Console.

A. Create the OAuth client (Google Cloud Console)

  1. Go to console.cloud.google.com → create a project (any name).
  2. APIs & Services → Library → enable: Google Ads API, Google Analytics Data API, Google Analytics Admin API, Google Search Console API.
  3. APIs & Services → OAuth consent screen
    • If your company uses Google Workspace: choose Internal. Done.
    • Otherwise choose External, fill in the app name and your email, save — then click Publish app.
    • ⚠️ Do not leave it in Testing: Google disconnects testing apps every 7 days.
  4. APIs & Services → Credentials → Create credentials → OAuth client ID
    • Application type: Web application
    • Authorised redirect URI: copy it from /setup → Google (it looks like https://<your-hostname>/setup/google/callback)
    • Save → copy the Client ID and Client secret.

B. Google Ads developer token

  1. Sign in to Google Ads with a Manager (MCC) account (create one at ads.google.com/home/tools/manager-accounts if you don't have one and link your ad accounts to it).
  2. Tools → API Center → accept the terms → your developer token appears.
  3. Click Apply for Basic access and fill in the form (describe: "internal reporting tool"). Approval usually takes 1–3 business days, sometimes longer. Until approved the token only works for test accounts.

C. Connect in /setup

  1. /setup → Google → paste Client ID, Client secret, developer token, and the Manager account id (10 digits) → Save.
  2. Click Connect Google → sign in with the Google account that has access to your Ads / GA4 / Search Console → Allow everything.
  3. You land on Choose accounts: tick the ad accounts, pick the GA4 property and the Search Console site → Save selection.

Keyword Planner works automatically once Google Ads is connected. Set your default country/language in /setup → General.


Meta Ads (Facebook / Instagram)

Uses a system user token that never expires. 15 minutes, no Meta review needed.

  1. business.facebook.com → Settings → Users → System users → Add (name it e.g. "Reporting", role Employee).
  2. Select the system user → Assign assets → Ad accounts → tick your ad accounts → allow View performance.
  3. If you do not have a Meta app yet: developers.facebook.com → Create app → type Business → add the Marketing API product. (The app can stay in development mode.)
  4. Back on the system user → Generate new token → choose the app → permissions: ads_read (add ads_management only if you will use write tools) → expiry: Never → copy the token.
  5. /setup → Meta Ads → paste the token → Validate & save → tick the ad accounts → Save accounts.

LinkedIn Ads

  1. developers.linkedin.com → Create app → associate it with your Company Page → verify the page when asked.
  2. Products tab → request Advertising API. LinkedIn reviews this (days to a few weeks). Start early.
  3. Auth tab → under Authorized redirect URLs add the URL shown in /setup → LinkedIn Ads → copy the Client ID and Client Secret.
  4. /setup → LinkedIn Ads → paste them → Save → Connect LinkedIn → sign in with a LinkedIn user who has access to the ad accounts → Allow.
  5. Tick the ad accounts → Save accounts.

The connection renews itself. If LinkedIn ever stops it, the dashboard shows a "reconnect" notice.


Shopify

  1. Shopify admin → Settings → Apps and sales channels → Develop apps → Allow custom app development (once) → Create an app (name: "Marketing reporting").
  2. Configure Admin API scopes → tick read_orders, read_all_orders, read_products, read_customers → Save.
  3. Install app → Reveal token once → copy the Admin API access token (starts with shpat_). It is shown only once.
  4. /setup → Shopify → enter your *.myshopify.com domain and the token → Validate & save.

Salesforce

Ask your Salesforce admin — 20 minutes.

  1. Setup → App Manager → New Connected App → name it "Marketing reporting", contact email.
  2. Tick Enable OAuth Settings, callback URL https://localhost (unused), scopes: Manage user data via APIs (api).
  3. Tick Enable Client Credentials Flow → Save (wait a few minutes for it to activate).
  4. Manage → Edit Policies → under Client Credentials Flow pick a Run As user (an integration user with read access to Leads and Opportunities) → Save.
  5. Manage Consumer Details → copy the Consumer Key and Consumer Secret.
  6. /setup → Salesforce → instance URL (e.g. https://yourorg.my.salesforce.com), key, secret → Validate & save.
  7. Review the LeadSource → channel table it shows (which lead sources are Google Ads, Meta, LinkedIn, organic, …) → Save mapping. This is what makes "cost per lead by channel" work.

Check everything

Dashboard → each connected source has a Test button. Green = data is flowing. Then, in Claude: "Run list_sources — what's connected?"