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
Tool | Why You Need It |
Claude Desktop | To run the MCP tools |
Python 3.10+ | Required for running the MCP server |
uv | Lightweight package manager and runner |
Google Ads API Access | You’ll need a developer token and credentials |
Your .env file | To 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:
git clone https://github.com/smacient/Keyword-Planner-MCP |
- 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)**
DEVELOPER_TOKEN=your_token CLIENT_ID=your_client_id CLIENT_SECRET=your_secret REFRESH_TOKEN=your_refresh_token LOGIN_CUSTOMER_ID=your_login_id |
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)
pip install uv |
Step 2: Create and Activate the Virtual Environment
In the project directory:
uv venv |
Then sync dependencies:
uv sync |
This installs all dependencies listed in requirements.txt.
Configure Claude Desktop
Now link this server to Claude:
- Open Claude Desktop → Settings → Developer → Edit Config
In the claude.json file, add:
“Keyword Planner”: { “command”: “uv”, “args”: [ “–directory”, “C:\\Users\\YourName\\Documents\\Keyword Planner MCP”, “run”, “google_ads_server.py” ] } |
Replace YourName with your actual Windows user folder name.
- Save and close all Claude windows
- Relaunch Claude Desktop
Use the Tools in Claude
Once the server is registered, Claude will automatically detect and load the following tools:
Tool | What It Does |
get_keyword_ideas_mcp | Finds keyword ideas for a topic |
get_historical_keyword_data | Pulls search volume across time |
get_month_over_month_analysis | Compares keyword trends MoM |
list_available_locations | Lists all country/location codes for targeting |
Example Prompts
Ask Claude:
Get keyword ideas for digital marketing in the US |
Compare keyword volume for “tennis racket” from last month to this month. |
List all available targeting locations. |
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:
- Connect Facebook Ads to Claude Desktop with an MCP Server – A Complete Guide
- The CMO’s Guide to AI-Driven Growth: Insights from BOND’s 2025 AI Report
- Connect Google Analytics 4 to Claude Desktop with an MCP Server – A complete guide
- The End-to-End Model Context Protocol (MCP) Guide for Marketers
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.