Connect Google Ads Keyword Planner to Claude Desktop with an MCP Server: A Complete Guide

Connect Google Ads Keyword Planner to Claude Desktop with an MCP Server: A Complete Guide
Share Now

Perfect for performance marketers, SEO analysts, and founders looking to explore Google Ads Keyword Planner data using Claude, without writing code or using external dashboards.

💡 This guide is written by Smacient using a custom-built MCP server for Google Ads Keyword Planner. It’s fully local, secure, and supports all core keyword tools inside Claude.

What is an MCP Server?

MCP (Model Context Protocol) servers allow Claude to interact with real-world tools through structured APIs. This Keyword Planner MCP server acts as a bridge between Claude and Google Ads — letting Claude fetch keyword ideas, historical search volume, and market analysis… all while running securely on your own device.

This setup uses Claude Desktop + Python + your Google Ads credentials — no third-party hosting, no browser scraping, just clean API data from Google.

What You’ll Achieve

  • Ask Claude:
  •  “Get keyword ideas for running shoes in India”
  •  “What’s the YoY search trend for yoga classes?”
  •  “Compare keyword volume month over month”
  • Access 4 built-in tools via Claude:
  • Get_keyword_ideas_mcp
  • Get_historical_keyword_data
  • Get_month_over_month_analysis
  • list_available_locations
  • Everything runs locally using your credentials

ToolWhy You Need It
Claude DesktopTo run the MCP tools
Python 3.10+Required for running the MCP server
uvLightweight package manager and runner
Google Ads API AccessYou’ll need a developer token and credentials
Your .env fileTo securely store credentials

Prerequisites

You must have Python and Claude installed on your laptop. For detailed instructions, you can visit our other blog, Connect Google Analytics 4 to Claude Desktop with an MCP Server – A complete guide  for step-by-step installation

Method 1: Clone the Repository

You can either:

  • Run:
  • Or download the ZIP and extract it into a folder (e.g., Keyword Planner MCP)

2. Place Your .env File in the Folder

This file should contain your Google Ads API credentials:

(How to get the Google Ads API Credentials)**

Keep this file secure. Claude uses this to connect to the API locally.

Step-by-Step Setup

Initial setup:

  • Open Command Prompt (CMD)
  • Navigate to the project folder:

cd C:\\Users\\YourName\\Documents\\Keyword Planner

Step 1: Install uv (if not installed)

Step 2: Create and Activate the Virtual Environment

In the project directory:

Then sync dependencies:

This installs all dependencies listed in requirements.txt.

Configure Claude Desktop

Now link this server to Claude:

  1. Open Claude Desktop → Settings → Developer → Edit Config

In the claude.json file, add:

Replace YourName with your actual Windows user folder name.

  1. Save and close all Claude windows
  2. Relaunch Claude Desktop

Use the Tools in Claude

Once the server is registered, Claude will automatically detect and load the following tools:

ToolWhat It Does
get_keyword_ideas_mcpFinds keyword ideas for a topic
get_historical_keyword_dataPulls search volume across time
get_month_over_month_analysisCompares keyword trends MoM
list_available_locationsLists all country/location codes for targeting

Example Prompts

Ask Claude:

Troubleshooting Tips

Claude doesn’t see the tools?

→ Double-check the path in claude.json and restart Claude

Credentials not working?

→ Confirm .env file exists in the folder and contains correct tokens

Can’t install uv?

→ Try pip install uv again or ensure Python is added to PATH

That’s It!

You’ve now connected Claude to Google Ads Keyword Planner, locally, securely, and with 4 powerful tools to explore keyword trends.

Whether you’re researching for SEO, launching new ad campaigns, or just analyzing market intent, now you can do it all through natural language with Claude.

We also have other blogs where we discuss MCP Servers and AI in depth:

FAQs 

1. What do I do if Claude doesn’t detect the Keyword Planner tools?

Double-check the claude.json configuration file. Ensure the –directory path correctly points to the location of your MCP server folder, and that the script name (google_ads_server.py) is correct. After editing, close and fully restart Claude Desktop for the changes to take effect.

2. Where do I get the .env file, and what should it contain?

You need to manually create a .env file using credentials from your Google Ads API console. The file should include:

ini

CopyEdit

DEVELOPER_TOKEN=your_token

CLIENT_ID=your_client_id

CLIENT_SECRET=your_secret

REFRESH_TOKEN=your_refresh_token

LOGIN_CUSTOMER_ID=your_login_id

Ensure this file is placed in the root folder of the MCP server (e.g., Keyword Planner MCP).

3. I’m getting a 401 error or credential issue when using the tools. What should I check?

This usually means your .env file is missing, invalid, or not being read. 

Double-check:

  • The .env file exists in the correct directory
  • The tokens are copied correctly (no extra spaces)
  • Your Google Ads account has API access enabled

Also, make sure the Cloud project associated with the credentials has OAuth consent screen configured.

4. Can I run this MCP server on Mac or Linux?

Yes. The setup is platform-independent as long as Python 3.10+ and uv are installed. Replace the C:\\Users\\YourName\\… Windows-style path in claude.json with your respective absolute path (e.g., /Users/you/Documents/Keyword Planner MCP on Mac).

5. How is this better than using the Google Ads UI or Data Studio?

This MCP server enables conversational access to keyword data inside Claude Desktop, powered by the official Google Ads API. Unlike dashboards or UI tools, you can ask Claude follow-up questions, get instant trend breakdowns, and automate exploratory research without switching tabs, coding, or exporting CSVs.

Share Now

Leave a Comment

Your email address will not be published. Required fields are marked *

Leave the field below empty!

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Recent Posts
Connect With Us
Sign up for the AI for Marketers newsletter

Hire A Machine, Don’t Be One!

Need a custom AI-powered solution to any marketing problem?

Hire a machine, don’t be one!

Need a custom AI-powered solution to any marketing problem? We help build bespoke AI-driven solutions to help marketers automate processes and be more productive.

Contact Us