TrackSERPs
Log in

Monitor Rankings from an AI Agent with MCP

Quick answer

The Model Context Protocol (MCP) connects large language model agents in Claude Desktop, Cursor, and Claude Code directly to Google search ranking telemetry. Using the @trackserps/mcp server, AI agents invoke specialized tools to list projects, inspect top-100 rankings, analyze ranking volatility, and evaluate AI Overview citations directly within developer IDEs. This allows autonomous agents to diagnose rank drops, identify keyword cannibalization, and recommend technical SEO fixes using verified ranking data.

Key facts

What an agent can read once MCP is connected

Without a data source, a coding assistant asked "why did organic traffic fall?" can read your repository and meta tags but has no idea where you rank. The Model Context Protocol (MCP) is the open standard that lets it call external tools, and @trackserps/mcp exposes your tracked projects as tools: latest rankings, movement, history, stored SERP snapshots, competitors and share of voice, plus Google AI Overview citations.

The agent reads stored results, so answers come back immediately and most calls cost nothing. Checks it starts itself are queued like any other and take 10 to 20 minutes. AI visibility prompts and discovery tools are not part of the MCP tool set.

Complete setup workflow for Claude Desktop and Cursor

Connecting an AI agent to TrackSERPs takes less than two minutes using the standard npx runner:

  1. Generate a TrackSERPs API key

    Log into your TrackSERPs account and navigate to Settings → API Keys. Generate an API key with the rankings:read scope (the read-only scope; there is no separate projects:read scope on API keys). You can use a test key (ts_test_...) during initial agent setup to experiment safely against the synthetic demo account.

  2. Configure Claude Desktop configuration file

    Open your Claude Desktop configuration file:

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

    Add the trackserps MCP server entry under mcpServers:

    {
      "mcpServers": {
        "trackserps": {
          "command": "npx",
          "args": ["-y", "@trackserps/mcp"],
          "env": {
            "TRACKSERPS_API_KEY": "ts_live_your_actual_key_here"
          }
        }
      }
    }
    
  3. Configure Cursor IDE (Alternative)

    If you use Cursor, navigate to Cursor Settings → Features → MCP. Click Add New MCP Server. Set the name to trackserps, choose command type, and enter: npx -y @trackserps/mcp Add your TRACKSERPS_API_KEY under environment variables.

  4. Restart your AI client and verify tool discovery

    Restart Claude Desktop or Cursor. When the client loads, you will see a hammer icon or tool indicator showing the registered TrackSERPs tools: list_projects, get_rankings, check_rank, get_serp_snapshot, get_keyword_history, and get_ranking_movement.

Core tools available to the AI agent

The @trackserps/mcp package provides tools tailored for automated search auditing and rank debugging:

TrackSERPs Model Context Protocol (MCP) Tools
CapabilityTool NameCredit CostPrimary Agent Action
list_projects0 creditsEnumerates tracking projects, domains, search engines, and keyword counts
get_rankings0 creditsRetrieves latest keyword positions, device types, and AI Overview citations
get_ranking_movement0 creditsReturns top gainers and losers across 7-day and 30-day timeframes
get_serp_snapshot[1]0 creditsInspects the full stored top-100 SERP snapshot and AI Overview reference cards
check_rank1 creditDispatches a one-off rank lookup (results normally take 10-20 minutes on standard queue)
  1. https://trackserps.com/docs/api/mcp (checked 2026-11-11)

Example agent prompt workflows

Once connected, agents can execute sophisticated SEO diagnostic workflows based on natural language prompts:

Scenario 1: Auditing keyword rankings and AI Overview citations

User Prompt:

"Review our latest search rankings for example-plumbing.com. Which keywords are ranking in the top 3, and are we cited in any Google AI Overviews?"

Agent Tool Execution:

  1. Calls list_projects() to identify the project ID (cmwc18tij0005rquydas1a5z5).
  2. Calls get_rankings(project_id: "cmwc18tij0005rquydas1a5z5", limit: 50).
  3. Synthesizes a structured response:
    • Identifies high-ranking keywords (e.g., "emergency plumber" at #8, "water heater repair" at #4).
    • Reports on generative citations, noting whether the domain captured reference cards in Google's generative answer.

Scenario 2: Investigating ranking drops and cannibalization

User Prompt:

"Our organic traffic dropped this week for 'emergency plumber'. Can you inspect the latest SERP snapshot and compare it to our history to see what happened?"

Agent Tool Execution:

  1. Calls get_keyword_history(project_id: "...", keyword: "emergency plumber", days: 30).
  2. Observes that the ranking URL changed from /emergency/ to /services/emergency-plumbing/, diagnosing keyword cannibalization between two competing landing pages.
  3. Calls get_serp_snapshot() to review the current top 10 competitors, noting that a competitor captured a new Local Pack placement and an AI Overview.
  4. Formulates a concrete technical recommendation: implement a canonical tag or 301 redirect to consolidate ranking authority on the primary landing page.

Securing agent access in production environments

When deploying AI agents in enterprise development teams:

  • Scoped API keys: Create dedicated API keys for MCP agents with the read-only scope (rankings:read). If the agent does not require triggering on-demand scans, omit runs:write.
  • IP allowlisting: In Settings → API Keys, configure an IP allowlist restricting API key usage to your corporate VPN or office IP address.
  • Hosted remote MCP: For browser-based AI platforms that cannot run local stdio processes, TrackSERPs provides a hosted remote MCP endpoint secured via OAuth 2.1 at https://api.trackserps.com/mcp.

To explore broader automation options, read our guide to building rank tracking dashboards with REST APIs, or learn how AI agents use TrackSERPs on our solutions for AI agents overview and MCP integration hub.

Frequently asked questions

What is the Model Context Protocol (MCP) in SEO?
The Model Context Protocol (MCP) is an open standard that allows LLM applications like Claude and Cursor to safely query external tools, databases, and APIs. In SEO, MCP allows agents to retrieve live search rankings and SERP snapshots directly inside conversation sessions.
How do I configure @trackserps/mcp in Claude Desktop?
Add an entry to claude_desktop_config.json under mcpServers, specifying command: npx, args: [-y, @trackserps/mcp], and passing your TRACKSERPS_API_KEY environment variable.
Can an AI agent run on-demand SERP checks using MCP?
Yes. The check_rank tool allows agents to trigger fresh keyword lookups on designated search engines, locations, and device types, then returning the rankings and AI Overview citations when the check finishes, usually within 10 to 20 minutes.
How do MCP tools protect against runaway credit consumption?
Read-only inspection tools (like get_rankings and get_serp_snapshot) consume zero credits. Active check_rank tools enforce account credit balances and can be scoped to specific projects.

Sources & references

  1. Model Context Protocol Specification(checked 2026-11-11)
  2. Google Search Central — How Search Works(checked 2026-11-11)

Get product updates and SEO tips

We will email you a link to confirm your address before anything else is sent.