MCP2026-08-184 min read

AI Visibility MCP for Codex

In Codex, your agent can pull the raw answers ChatGPT, Perplexity, Google AI Overviews, Google AI Mode, Copilot and Gemini actually give. Ask in plain language; the answer text and every cited source come back as a tool result — and because it's one command to add, the same six-engine citation sweep becomes a task you can run again any time. One MCP server, one deliberately narrow tool: fetch_raw_answers. AgentGEO is the answer-access layer for AI agents. The MCP server hands Codex raw records — no scores, no conclusions — and Codex runs the GEO analysis with your project in context.

In Codex, the raw answers the six engines actually give are one ask away: describe the check and fetch_raw_answers returns the answer text plus every cited source as a tool result. One MCP server, one deliberately narrow tool — and once it's added, a six-engine citation sweep is just another repeatable agent task, not a manual chore.

Get your free API key → · Read the quickstart → — Free tier, no credit card required.

Start for free

Connect AgentGEO to Codex

codex mcp add agentgeo -- npx -y agentgeo-mcp --key ag_live_...

That is the whole install. codex mcp add registers the server, npx pulls agentgeo-mcp from npm (stdio transport, zero npm dependencies, Node.js 18+), and the agentgeo tool is available to Codex's agent runs. Create your ag_live_ key in the quickstart — free tier, no credit card. Want to verify the wiring before fetching anything real? An ag_test_ key always returns clearly labelled demo records at zero credits.

When Codex calls fetch_raw_answers, each engine comes back as its own per-surface record — the raw answer, its sources in cited order, timing and provider metadata (the full record also carries the raw providerFields):

{
  "surfaceKey": "perplexity",
  "status": "delivered",
  "answerText": "...",
  "sources": [
    { "title": "...", "url": "https://...", "position": 1 }
  ],
  "fetchedAt": "2026-08-18T09:12:04Z",
  "latencyMs": 8412,
  "providerRecordId": "..."
}

What to ask once it's connected

No arguments to memorize — describe the task and Codex shapes the call (country defaults to US, language to en; say "in Japan, in Japanese" to change it). Asks that make good repeatable agent tasks:

  • "Fetch what ChatGPT and Gemini answer for 'best CI/CD for monorepos' and list which domains each cites."
  • "Run our top three category queries across all six surfaces and report which ones cite ourdomain.com, with positions."
  • "Pull Perplexity's answer for our main query, compare sources[] against geo-baseline.json, and print what entered or dropped out."
  • "Diff google_ai_overview against google_ai_mode for 'best feature flag tools' and summarize the difference in cited sources."
  • "Fetch Copilot's answer for 'alternatives to our product' — are we in the answer text, or only in the sources?"
  • "Sweep all six engines for our five money queries and write a citation table to reports/geo-$(date).md." Wire that into your task runner and the check repeats itself.

Six engines, one contract: the same ask diffs citation sets across chatgpt, perplexity, gemini, google_ai_overview, google_ai_mode and copilot. Who gets cited, where, and who doesn't — that diff is the core of GEO/AEO analysis, and Codex runs it as a task you can schedule and repeat, not a browser session you babysit.

What the MCP server gives you

Deliberately thin — an answer-access layer for your agent, not an analytics product bolted onto your CLI.

  • One narrow toolfetch_raw_answers posts to AgentGEO's API and returns the run envelope verbatim. Nothing else to learn, nothing else to break.
  • Six engines behind one contract — ChatGPT, Perplexity, Gemini, Google AI Overviews, Google AI Mode and Copilot with an identical record shape, so adding an engine to a task is one more word in the ask.
  • Structured `sources[]` — every citation with its title, URL and position, ready for the agent to diff, count or grep against your domain. No links regexed out of prose.
  • Raw records only — no rankings, sentiment or visibility scores. The conclusions come from Codex, with your project in context.
  • Managed-scraper engine, maintained for you — under the hood the server talks to POST https://api.agentgeo.org/v1/fetches; keeping six collection paths healthy is AgentGEO's job, not a headless browser in your task runner.
  • Usage-based billing with a spend cap — one credit per delivered record, failed records cost zero, free tier with no credit card, never per-seat.

What it doesn't do

The narrowness is the point. Codex holds your project and your intent; conclusions computed outside that context would be worth less than raw records analyzed inside it — that is the whole GEO data layer argument. So, honestly:

  • No dashboards. Records arrive as tool results; the report is whatever Codex writes from them, in your repo or your task output.
  • No visibility scores or sentiment. Raw answerText and sources[] only — the judgment layer is deliberately left to your agent.
  • No recommendations engine. Codex reasons over your actual pages, which beats generic advice every time.
  • Not instant. Requests wait up to 180 seconds — live surfaces are slow. An AI Overview SERP round-trip runs 40–90s, and some chatbot scrapes exceed the sync budget entirely: those records come back failed with a providerFields.snapshot_id, and a follow-up call with that id and the same single surface redeems the finished answer without paying for a re-scrape (not valid for google_ai_overview). Budget for it when the task is unattended.
Codex without AgentGEOCodex + AgentGEO MCP
How answers get inCopy-paste, or a scraper you maintainA tool call inside the agent task
CitationsRetyped by hand, positions guessedStructured sources[] — title, URL, position
FreshnessWhatever you last pastedFetched live, every run
CoverageOne engine at a timeUp to six engines in one call
RepeatabilityRedo the manual steps each timeRe-run the same agent task

AgentGEO is the answer-access layer, nothing more. The analysis Codex runs on the records — the tables it writes, the fixes it proposes — is yours, in your repo and your pipeline, not locked in a vendor dashboard.

Prefer the REST API?

The MCP server is a thin wrapper over the same endpoint your scripts can hit directly: POST https://api.agentgeo.org/v1/fetches. See the Python and curl pages for the request shape — handy when an agent task graduates into a plain cron job with the identical contract.

Who builds on this

Developers who drive Codex for agentic tasks and want answer-engine checks to be one more thing the agent just does. Add the server once, and asking Codex to sweep the six engines for your category — and diff the citations against last week — becomes a repeatable task rather than a manual afternoon. Try it first in the no-signup playground, or see how the approaches compare.

Ready for your first six-engine sweep? Start free → · Follow the 5-minute quickstart →

Start for free

Frequently asked questions

How do I install the AgentGEO MCP server in Codex?
Run codex mcp add agentgeo -- npx -y agentgeo-mcp --key ag_live_... with your own key. The agentgeo-mcp package speaks MCP over stdio, has zero npm dependencies and needs Node.js 18+. After adding it, the agentgeo tool is available to Codex's agent runs. Keys come from the onboarding quickstart; --api-url defaults to https://api.agentgeo.org.
What does fetch_raw_answers return in Codex?
One per-surface record for each engine you asked for: surfaceKey, status (delivered or failed), the full answerText, sources with title, URL and position, fetchedAt, latencyMs, providerRecordId and the raw providerFields. Records are returned unchanged — no rankings, sentiment or visibility scores are added.
Does my code or analysis leave my machine?
The analysis stays in Codex: raw answer records come in as tool results, and everything derived from them — diffs, tables, proposed fixes — happens in your agent with your project in context. What does go out is the query text itself: it is sent to AgentGEO's managed scrapers so they can fetch each engine's answer.
What does it cost to use with Codex?
One credit per delivered record; failed records cost zero. An ag_test_ key always returns clearly labelled demo records at zero credits — handy for verifying the install — while ag_live_ keys fetch real data. The free tier needs no credit card, and paid usage is billed by consumption with a spend cap, never per-seat.
Which AI engines can Codex query through this MCP?
Six: ChatGPT, Perplexity, Gemini, Google AI Overviews, Google AI Mode and Copilot — surface keys chatgpt, perplexity, gemini, google_ai_overview, google_ai_mode and copilot. Ask for one to six of them per call; the record shape is identical across all of them.

Keep reading