SEO AI (Google Ads Keyword Planner) MCP server

Connects AI systems to Google Ads Keyword Planner API for SEO automation through keyword research, SERP analysis, and competitor insights without leaving conversations.
Back to servers
Provider
Ayush Singhvi
Release date
Mar 23, 2025
Language
TypeScript

App SEO AI is a powerful application for SEO automation and optimization that integrates with Google Ads Keyword Planner. It offers advanced features including keyword research, SERP analysis, competitor analysis, and AI-powered SEO recommendations through MCP integration.

Prerequisites

Before installation, ensure 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

Clone and Setup

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

Configure Environment Variables

Copy the example environment file and edit it with your credentials:

cp .env.example .env

Your .env file should contain:

# 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

Get Google Ads API Refresh Token

npm run get-token

This opens your browser for OAuth2 authentication and automatically saves the refresh token to your .env file.

Start the Server

For development:

npm run dev

For production:

npm start

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

Using the API

API documentation is available at http://localhost:3000/api-docs when the server is running.

Research Keywords

To find keywords related to a topic:

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

Analyze SERP

To analyze search engine results for a query:

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

Analyze Competitors

To analyze competitors for a domain:

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

MCP Integration

The application includes Model Context Protocol integration for AI assistants with the following tools:

  • research_keywords - Research related keywords for a topic
  • analyze_serp - Analyze search results for a query
  • analyze_competitors - Analyze competitors for a keyword or domain
  • _health - Health check endpoint

Setting Up 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

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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