SEO AI (Google Ads Keyword Planner) MCP server

Integrates with Google Ads Keyword Planner API to enable SEO research, SERP analysis, and competitor analysis through a Node.js Express server deployable via Docker or Smithery.
Back to servers
Setup instructions
Provider
ccnn2509
Release date
Mar 17, 2025
Language
TypeScript
Stats
15 stars

App SEO AI is an application for SEO automation and AI-powered optimization that integrates with Google Ads Keyword Planner. It helps you research keywords, analyze search results, examine competitors, and provides SEO recommendations through a convenient API interface.

Prerequisites

Before installing, make sure you have:

  • Node.js (v14 or higher)
  • npm or yarn
  • Google Ads account with API access
  • Google Cloud Platform project with Google Ads API enabled

Installation

Installing the Application

First, clone the repository and navigate to the project directory:

git clone https://github.com/ccnn2509/app-seo-ai.git
cd app-seo-ai

Next, install the dependencies:

npm install

Configuring Environment Variables

Create your environment configuration by copying the example file:

cp .env.example .env

Edit the .env file with your Google Ads API credentials:

# Server Configuration
PORT=3000
NODE_ENV=development

# Google Ads API Configuration
GOOGLE_ADS_DEVELOPER_TOKEN=your_developer_token
GOOGLE_ADS_CLIENT_ID=your_client_id
GOOGLE_ADS_CLIENT_SECRET=your_client_secret
GOOGLE_ADS_REFRESH_TOKEN=your_refresh_token
GOOGLE_ADS_LOGIN_CUSTOMER_ID=your_customer_id_without_dashes

# SERP API Configuration (optional)
SERP_API_KEY=your_serp_api_key

Getting a Google Ads API Refresh Token

Run the following command to obtain a refresh token:

npm run get-token

This will open your browser and guide you through the OAuth2 authentication process. The refresh token will be automatically saved to your .env file.

Usage

Starting the Server

For development:

npm run dev

For production:

npm start

The server will start on the port specified in your .env file (default: 3000).

API Documentation

You can access the API documentation when the server is running by navigating to:

http://localhost:3000/api-docs

MCP Integration

Setting Up MCP Integration

This project includes Model Context Protocol (MCP) integration, allowing AI assistants to use the API. To use this with Smithery:

  1. Go to Smithery
  2. Create a new MCP server
  3. Select the app-seo-ai repository
  4. Configure the server settings
  5. Deploy the server

Available MCP Tools

The following tools are available through the MCP interface:

  • research_keywords - Research keywords related to a given topic or seed keyword
  • analyze_serp - Analyze a Search Engine Results Page for a given query
  • analyze_competitors - Analyze competitors for a given keyword or domain
  • _health - Health check endpoint

Example API Requests

Researching Keywords

// Example request to research keywords
fetch('http://localhost:3000/api/keywords/ideas?keyword=seo%20tools&language=en')
  .then(response => response.json())
  .then(data => console.log(data));

Analyzing Search Results

// Example request to analyze SERP
fetch('http://localhost:3000/api/serp/analyze?query=best%20seo%20tools&location=United%20States')
  .then(response => response.json())
  .then(data => console.log(data));

Analyzing Competitors

// Example request to analyze competitors
fetch('http://localhost:3000/api/competitors/analyze?domain=example.com')
  .then(response => response.json())
  .then(data => console.log(data));

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "app-seo-ai" '{"command":"npm","args":["start"],"tools":[{"name":"research_keywords","description":"Research keywords related to a given topic or seed keyword"},{"name":"analyze_serp","description":"Analyze a SERP (Search Engine Results Page) for a given query"},{"name":"analyze_competitors","description":"Analyze competitors for a given keyword or domain"},{"name":"_health","description":"Health check endpoint"}]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "app-seo-ai": {
            "command": "npm",
            "args": [
                "start"
            ],
            "tools": [
                {
                    "name": "research_keywords",
                    "description": "Research keywords related to a given topic or seed keyword"
                },
                {
                    "name": "analyze_serp",
                    "description": "Analyze a SERP (Search Engine Results Page) for a given query"
                },
                {
                    "name": "analyze_competitors",
                    "description": "Analyze competitors for a given keyword or domain"
                },
                {
                    "name": "_health",
                    "description": "Health check endpoint"
                }
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "app-seo-ai": {
            "command": "npm",
            "args": [
                "start"
            ],
            "tools": [
                {
                    "name": "research_keywords",
                    "description": "Research keywords related to a given topic or seed keyword"
                },
                {
                    "name": "analyze_serp",
                    "description": "Analyze a SERP (Search Engine Results Page) for a given query"
                },
                {
                    "name": "analyze_competitors",
                    "description": "Analyze competitors for a given keyword or domain"
                },
                {
                    "name": "_health",
                    "description": "Health check endpoint"
                }
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later