Skip to content

MCP: add tools for AI-Search / AEO visibility tracking (brand mentions, share of voice) #126

Description

@manuel-will

Problem

The MCP server exposes 20+ tools for classic SEO (keywords, backlinks, SERPs, rank tracking, audits), but none of them touch AI-Search / AEO (Answer Engine Optimization). The app already has a full feature area for this — src/server/features/ai-search/services/ (brandLookup.ts, citedSources.ts, promptExplorer.ts, shareOfVoice.ts), backed by src/server/lib/dataforseo/ai.ts — but it's UI-only today.

For an agent-first product this is a gap: an agent can research keywords, audit a site, and track rankings end-to-end, but can't answer "who's winning share of voice in AI answers for this domain, and which pages get cited" without a human opening the AI-Search tab.

Proposal

Add MCP tools that thinly wrap the existing ai-search services (no new DataForSEO integration needed, purely surfacing what already exists):

  • get_ai_search_visibility — wraps shareOfVoice.ts + brandLookup.ts: brand mention count and share-of-voice vs. named competitors across a project's tracked prompts.
  • get_ai_search_cited_sources — wraps citedSources.ts: which URLs/domains get cited as sources in AI answers for a project's prompts.
  • get_ai_search_prompt_results (optional, second priority) — wraps promptExplorer.ts: raw per-prompt AI answers plus citations, for deeper inspection.

Pattern to follow: one file per tool under src/server/mcp/tools/ (Zod input/output schema, handler calling the existing feature service — not the raw DataForSEO client), registered individually in src/server/mcp/server.ts (tools are added one call at a time by design, not via a loop — see the comment at the top of that file). get-domain-overview.ts is a solid template: project-scoped auth via withMcpProjectAuth, market/location resolution, and a credit-cost note in the tool description (DataForSEO's LLM endpoints tend to be pricier than Labs/SERP calls, worth stating explicitly).

Scope: read-only tools only, same risk profile as the existing read tools. No AI-Search config mutation in this proposal.

Prior art

Checked existing issues/PRs before writing this up. No existing issue or PR proposes MCP tools for this area. Two adjacent, currently open items touch the same services and are worth knowing about:

Notes

Happy to open a PR following the get-domain-overview.ts / list-projects.ts pattern, including tests, once aligned on which of the three tools above are worth building first (get_ai_search_visibility and get_ai_search_cited_sources are the clear priorities; get_ai_search_prompt_results can follow).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions