How to connect Codex to Ahrefs

Save an Ahrefs API key in Ryze AI, add one MCP URL to OpenAI Codex, then ask for Domain Rating, backlinks, referring domains and organic keywords from your terminal or editor.

Your MCP URL
https://connector.get-ryze.ai/mcp

Copies the link. In a terminal run codex mcp add ryze --url with it. See the steps

See pricing

By Ira Bodnar, Ryze AI · Updated · Test record: nothing was run

Quick answer

The main way to connect Codex to Ahrefs is the Ryze AI connector. Save an Ahrefs API key on the Ahrefs card in Ryze AI, then run codex mcp add ryze --url https://connector.get-ryze.ai/mcp followed by codex mcp login ryze. One entry serves the Codex CLI, the ChatGPT desktop app and the IDE extension, the Ahrefs key stays in Ryze AI, and the 1 Ahrefs tool only reads. Ahrefs also hosts its own MCP server at https://api.ahrefs.com/mcp/mcp, compared below.

  1. In Ahrefs open Account settings, then API keys, and generate a key
  2. In Ryze AI open Integrations, click Connect on the Ahrefs card and paste the key
  3. In Codex run codex mcp add ryze --url https://connector.get-ryze.ai/mcp
  4. Run codex mcp login ryze, sign in on the Ryze AI page and click Allow connection

Codex to Ahrefs at a glance

FactDetail
Main way to connectThe Ryze AI connector, a hosted MCP server that Codex reaches as a Streamable HTTP address
Server addresshttps://connector.get-ryze.ai/mcp
Commands in Codexcodex mcp add ryze --url https://connector.get-ryze.ai/mcp, then codex mcp login ryze for the browser sign-in
Sign-inOAuth with Ryze AI by default. The Ahrefs API key is saved in the Ryze AI app, so Codex never holds it
Ahrefs tools1: ahrefs__read, a read-only Ahrefs API v3 GET request
Can it change AhrefsNo. The one Ahrefs tool only sends GET requests
Other data in the same chatAny other platform connected in the same Ryze AI workspace is reachable through the same ryze entry
Codex surfacesCLI, ChatGPT desktop app and IDE extension, all reading one config.toml. Free and Go plans get the desktop app only, subject to rollout
Ahrefs accessAn Ahrefs plan with API access and a key made by a workspace owner or admin. Calls spend your own Ahrefs API units
Ryze AI priceSEO Starter is $129 per month with a 3-day free trial; the Ahrefs tool also works on Paid Ads at $89 per month with a 7-day free trial. Adding the connector is free; the tool needs an active plan or trial
Ahrefs's own option for CodexA hosted MCP server at https://api.ahrefs.com/mcp/mcp on plans from Lite. Ahrefs's setup pages on November 22, 2026 do not include a Codex page
Last testedNothing was run. No call to Ahrefs and no step inside Codex; the steps follow OpenAI and Ahrefs documentation

Before you start

  • An OpenAI plan that includes Codex. OpenAI lists Codex in ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise. Its pricing page shows Free and Go with Codex in the desktop app only, subject to rollout, so on those plans use the desktop app steps. Plus and higher add the CLI and the IDE extension. Codex also runs with an OpenAI API key in the CLI, SDK or IDE extension, billed at API pricing. OpenAI's MCP page sets no plan condition for adding a server.
  • An Ahrefs API key from an owner or admin. Per Ahrefs, only workspace owners and admins can open the API keys section, and the API needs a plan with API access, which Ryze AI rejects when it is missing. You choose an expiration date for each key, and after it the key becomes inactive.
  • A Ryze AI workspace on a plan or free trial. SEO Starter is $129 per month with a 3-day free trial, because Ahrefs supplies SEO data. Paid Ads is $89 per month with a 7-day free trial and Agency is $279 per month; the Ahrefs tool works on any active plan or trial. Adding the connector is free.

How to connect Codex to Ahrefs with the CLI

Two steps happen in Ahrefs and Ryze AI, three in Codex. The server URL is the same for every user.

  1. Generate an API key in Ahrefs

    In Ahrefs open Account settings, then API keys, click Generate API key, name it (for example Ryze AI) and copy it. Only workspace owners and admins can do this.

  2. Connect Ahrefs in Ryze AI

    In the Ryze AI app open Integrations, click Connect on the Ahrefs card, paste the key into API key and click Continue. You can also ask the Ryze AI agent to connect Ahrefs: it sends a one-time link, valid once and for 24 hours, to a page where you paste the key.

  3. Add the Ryze AI server to Codex

    Run codex mcp add ryze --url https://connector.get-ryze.ai/mcp. In the ChatGPT desktop app or the IDE extension, use the MCP servers settings instead (see the sections below). All three share one MCP configuration.

  4. Sign in and allow the connection

    Run codex mcp login ryze, sign in on the Ryze AI page and click Allow connection. Without a local browser, add --no-browser, open the printed URL and paste the full redirect URL back into the terminal. Inside a running CLI session, /mcp login ryze starts the same sign-in.

  5. Check the server and ask your first question

    Run codex mcp list, or type /mcp inside the Codex TUI, to see the ryze server. If the connector was added before Ahrefs was connected, remove and re-add it, then start a new session. Then ask: Check my Ahrefs API limits and units used.

codex mcp add ryze --url https://connector.get-ryze.ai/mcpcodex mcp login ryze

From a terminal this is the shortest route. codex mcp add writes the ryze entry into ~/.codex/config.toml, and codex mcp login opens the Ryze AI sign-in in your browser. Check the result with codex mcp list, or with /mcp inside the codex TUI. Your Ahrefs key stays with Ryze AI; Codex holds only its own Ryze AI sign-in.

The Ryze AI help article for Ahrefs covers the Ahrefs side of the connection, and the Ryze AI agent API help page covers API keys.

Sources: OpenAI Codex MCP docs, Codex CLI command reference, Ryze AI Ahrefs guide. Checked November 22, 2026.

ChatGPT desktop app and IDE extension

The ChatGPT desktop app and the IDE extension read the same MCP configuration as the CLI, so a server added in one place appears in the other two. Both use a short form in place of commands, followed by a restart.

ChatGPT desktop app (Codex)

  1. Open Settings, then select MCP servers.
  2. Select Add server, enter the name ryze, choose Streamable HTTP and enter https://connector.get-ryze.ai/mcp.
  3. Save, then select Restart.
  4. Select Authenticate next to ryze and complete the Ryze AI sign-in. Type /mcp in the composer to view connected servers.

Codex IDE extension

  1. Open the gear menu, then select MCP servers.
  2. Select Add server, enter the name ryze, choose Streamable HTTP and enter https://connector.get-ryze.ai/mcp.
  3. Save, then select Restart extension.
  4. Select Authenticate and complete the Ryze AI sign-in.

config.toml

To keep the server in a file, edit ~/.codex/config.toml, or a project .codex/config.toml in a trusted project. OAuth is the default for an HTTP server; run codex mcp login ryze to sign in. Ahrefs requests that return many rows can produce long output, so the example raises the per-call timeout and sets an output budget for the Ahrefs tool.

[mcp_servers.ryze] url = "https://connector.get-ryze.ai/mcp" # Optional: raise the defaults (10 and 60 seconds) startup_timeout_sec = 20 tool_timeout_sec = 120 [mcp_servers.ryze.tools.ahrefs__read] output_token_limit = 20000

For a Ryze AI API key instead of OAuth, add bearer_token_env_var = "RYZE_API_KEY" to the same table and set that environment variable to your rk_live_ key. Adding --bearer-token-env-var RYZE_API_KEY to codex mcp add writes the same setting from the command line. Do not paste the key into the file.

Codex Cloud tasks are left out on purpose. The one cloud remark on OpenAI's MCP page is that local servers and transports may be missing there, and the Codex Cloud page says nothing about MCP, so this guide makes no claim that the connector works in a cloud task. The steps inside Codex were also not run end to end for this guide.

What OpenAI documents about MCP in Codex

TopicWhat OpenAI's documentation says
Where servers are addedcodex mcp add in a shell, Settings > MCP servers in the desktop app, the gear menu > MCP servers in the IDE extension, or a [mcp_servers.<name>] table in config.toml
Shared byCodex CLI, the ChatGPT desktop app and the Codex IDE extension. OpenAI calls them the local Codex clients; one setup serves all three
Config files~/.codex/config.toml for you. A project .codex/config.toml loads only after you trust the project
TransportsSTDIO, a local process started by a command, and Streamable HTTP, a server at an address. The MCP page names no third one
Sign-in to a remote serverOAuth by default, through Client ID Metadata Documents or dynamic client registration. A bearer token read from an environment variable and custom headers are the other options
Tool approvaldefault_tools_approval_mode per server: auto, prompt, writes or approve. tools.<tool>.approval_mode overrides one tool. enabled_tools and disabled_tools work as allow and deny lists
Timeouts and output10 seconds to start a server and 60 seconds per tool call by default, both adjustable per server. tools.<tool>.output_token_limit sets a per-tool output budget
Admin controlAn approved mcp_servers list in requirements.toml, matched on the server name and, for a remote server, its URL. An empty list turns off every MCP server
PlanThe MCP page names no plan for adding a server. The CLI and the IDE extension come with Plus and higher or an API key; Free and Go have the desktop app only, subject to rollout

Sources: OpenAI Codex MCP docs, Codex CLI command reference, Codex pricing, Codex managed configuration. Checked November 22, 2026.

Claude, ChatGPT and Cursor

The same URL works in other MCP clients. Ahrefs is connected once in Ryze AI, so nothing changes on the Ahrefs side.

Claude

Open Customize, then Connectors, click Add, choose Add custom connector and enter https://connector.get-ryze.ai/mcp. Click Connect, sign in on the Ryze AI page, choose the workspaces and click Allow connection. Ahrefs stays connected in Ryze AI, so the key step is not repeated.

ChatGPT

OpenAI says full custom MCP support is for ChatGPT Business and Enterprise/Edu on the web, and Pro can connect custom MCP servers with read and fetch permissions only. On the web, open Plugins, select the plus button, then Add custom MCP server, enter the URL and select Create as a plugin. ChatGPT on the web does not read your local Codex configuration.

Cursor

Add the server to .cursor/mcp.json with the same URL, then sign in on the Ryze AI page when Cursor asks.

{ "mcpServers": { "ryze": { "url": "https://connector.get-ryze.ai/mcp" } } }

Source for the ChatGPT steps: OpenAI's page on connecting a server to ChatGPT. Checked November 22, 2026.

Ahrefs key access

Two sign-ins are involved: Ryze AI for the connector, and an Ahrefs API key that Ryze AI stores for your workspace. Three things decide what Codex can reach in Ahrefs.

Which Ahrefs account
The one whose API key you pasted into Ryze AI. A workspace holds one Ahrefs connection. To switch keys, click View on the Ahrefs card in Ryze AI, disconnect with the trash icon and connect again. Another Ryze AI workspace can hold a different key.
What the key allows
Ahrefs says keys are made in Account settings, API keys, that only owners and admins can open that section, and that a key is invalidated if the user who created it is removed from the workspace.
What Codex asks first
The Ahrefs tool only reads, so nothing in Ahrefs can change. Codex asks before a call only if an approval mode in config.toml says so, and the next sections show the setting.

The Ahrefs access behind the Ryze AI tool

Ryze AI lists no OAuth scopes for Ahrefs. Access comes from the API key and the Ahrefs plan behind it. The table shows what each part decides.

PartWhat it decidesWhere it is set
API keyWhich Ahrefs workspace is readAccount settings, API keys, by an owner or admin
Ahrefs planWhether the API accepts the call at allA plan without API access is rejected
API unitsHow many calls fit in a monthEach call draws on your own monthly Ahrefs unit balance, not Ryze AI credits
Per-key unit limitA cap on one key's usageSet by workspace admins in Account settings, API keys. Ahrefs says a hand-made key has no per-key limit by default
Ryze AI plan or trialWhether the Ahrefs tool runsWithout one the connector can only list workspaces and connect platforms

Not included: any change to Ahrefs. The tool cannot edit Rank Tracker projects, keyword lists or Brand Radar settings. Ahrefs's own MCP server lists a management group for projects, keyword lists, locations and Brand Radar configuration, and the Ryze AI connector does not expose it.

Sources: Ahrefs API keys, Ahrefs MCP introduction, Ryze AI Ahrefs guide. Checked November 22, 2026.

Removing access

To cut access, delete the key in Ahrefs under Account settings, API keys, and disconnect Ahrefs from its card in Ryze AI. On the Codex side, codex mcp logout ryze deletes the stored sign-in and codex mcp remove ryze deletes the entry. To pause the server and keep its settings, set enabled = false in the [mcp_servers.ryze] table.

What Codex can do in Ahrefs

The Ryze AI connector exposes 1 Ahrefs tool. Codex calls it by this name through the ryze server, and it runs with the key you saved.

ToolTypeWhat it does
ahrefs__readReadRuns a read-only Ahrefs API v3 GET request, for example Domain Rating, site metrics, referring domains, backlinks, broken backlinks, anchors, organic keywords, a Keywords Explorer overview, or API limits and usage.

The tool name comes from the Ryze AI app source and was never seen in a live tool list for this guide. The tool needs an active Ryze AI plan or free trial; without one, the connector can only list workspaces and connect platforms. Each refresh of data spends your own Ahrefs API units.

Approvals in Codex

ahrefs__read only reads, so no approval setting is needed to protect Ahrefs. To be asked before every call anyway, set default_tools_approval_mode to prompt, or set tools.ahrefs__read.approval_mode on its own. OpenAI describes writes as prompting for tools not marked read-only, and this guide did not check how the connector marks its tools. The same ryze entry also carries the tools of other platforms connected in your workspace, so an enabled_tools list keeps Codex to the Ahrefs tool if that is all it should use. The Ryze AI chat itself starts on Skip all approvals, and scheduled tasks in Ryze AI run without an approval step.

[mcp_servers.ryze] url = "https://connector.get-ryze.ai/mcp" # Keep Codex to the Ahrefs tool enabled_tools = ["ahrefs__read"] # Ask before every call default_tools_approval_mode = "prompt"

Ahrefs and Codex limits in numbers

LimitFigures
Cost of one requestmax(base cost, per-row cost x rows). The base cost is 50 units
Per-row costThe summed cost of each unique field in the result, the filter or the sort. A field costs 1 unit by default and some cost 5 or 10
Ahrefs's own examplesDomain Rating returns 2 fields in 1 row, below the base cost, so it costs 50 units. A backlinks request with 12 units per row and 500 rows costs 6,000 units
Cached resultsA request served from cache uses no units
Finding the cost firstAhrefs says to run a request against a free target and read the x-api-units-cost-total response header
Free test queriesAhrefs documents a set of free test queries on plans without API access; Rank Tracker, Management and Public endpoints use no units either
Monthly allowanceSet by your Ahrefs plan. Enterprise customers can buy more units. Usage shows in Account settings, Limits and usage
API keysUp to 1,000 keys, each with an expiration date between today and 10 years out. A key is invalidated when its creator leaves the workspace
Ahrefs's own MCP serverKeys made through OAuth for Ahrefs MCP default to 200,000 units a month per key. This applies to api.ahrefs.com/mcp/mcp, not to the Ryze AI connector
Codex waiting time and output10 seconds to start a server, 60 seconds per tool call. output_token_limit budgets one tool's output, and OpenAI states no maximum number of servers or tools

Large link lists are the expensive requests, because cost grows with rows and with costlier fields. Ask for a small number of rows first, then widen the request once the cost is clear.

Sources: Ahrefs limits consumption, Ahrefs MCP introduction, Ahrefs API keys, OpenAI Codex MCP docs. Checked November 22, 2026.

First 3 prompts to run

Each answer comes from your own Ahrefs account, so this page describes what comes back instead of showing sample numbers.

1. Check the budget first

Use the ryze server's Ahrefs tool to check my Ahrefs API limits and units used.

Tools used: ahrefs__read

What comes back: The limits and usage figures Ahrefs reports for the connected workspace. Nothing changes, and it is a fast way to confirm that the key and the connector work.

2. Authority and links for one domain

For <your domain>, give the Domain Rating and the counts of referring domains and backlinks.

Tools used: ahrefs__read

What comes back: The Domain Rating and link counts Ahrefs holds for that target. Replace the placeholder with your own domain.

3. Broken backlinks to fix with redirects

List five broken backlinks pointing at <your domain>, with the linking page and the page that no longer loads.

Tools used: ahrefs__read

What comes back: Broken backlinks as Ahrefs returns them. Asking for five rows keeps the unit cost low, because each row uses API units.

The Ahrefs tool only reads. Asking Codex to create a Rank Tracker project, edit a keyword list or change a Brand Radar setting will fail, because the connector has no tool for that.

10 jobs to hand to Codex

Ten jobs you can give Codex, with the Ryze AI tool behind each one. All ten use the one Ahrefs tool, and the default connection covers each of them. None of them was run for this guide.

JobWhat to ask CodexToolDefault connection
Budget checkShow my Ahrefs API limits and the units used so far.ahrefs__readCovered; not run
Authority checkGive the Domain Rating of a domain I name.ahrefs__readCovered; not run
Link profile countsShow backlink and referring-domain counts for a domain.ahrefs__readCovered; not run
Referring domainsList a few referring domains for a site.ahrefs__readCovered; not run
Backlinks to one pageList a few backlinks that point at one URL.ahrefs__readCovered; not run
Broken backlinksWhich broken backlinks point at my domain, and where do they land?ahrefs__readCovered; not run
Anchor textShow the anchor texts used for links to my domain.ahrefs__readCovered; not run
Ranking keywordsList the organic keywords a site ranks for.ahrefs__readCovered; not run
Keyword overviewGive the Keywords Explorer overview for these keywords in this country.ahrefs__readCovered; not run
Metrics for a pathShow site metrics for a subdomain, a path and an exact URL.ahrefs__readCovered; not run

3 ways to connect Codex to Ahrefs

Three routes lead from Codex to Ahrefs data. The Ryze AI connector is the main way here: the Ahrefs key is saved once in Ryze AI, and one codex mcp add command covers all three Codex surfaces. The other two use the server Ahrefs hosts itself. Ahrefs lists setup pages for ten clients on November 22, 2026, and Codex is not one of them, so the Codex steps for its server come from OpenAI's documentation and were not run.

WayWhere it runsSetup in CodexWhat it reaches in AhrefsPrice and units
Ryze AI connector (the main way)Hosted by Ryze AI, with one address for every usercodex mcp add ryze --url https://connector.get-ryze.ai/mcp and codex mcp login ryze, or Add server in the desktop app or IDE extension. One entry serves all three. The Ahrefs key goes into Ryze AI, never into CodexOne read tool for Ahrefs API v3: Domain Rating, site metrics, backlinks, broken backlinks, referring domains, anchors, organic keywords, Keywords Explorer overview, API limits and usageSEO Starter is $129 per month with a 3-day free trial, or Paid Ads is $89 per month with a 7-day free trial. Calls spend your Ahrefs API units
Ahrefs MCP server with OAuth (Ahrefs's own)Hosted by Ahrefs at https://api.ahrefs.com/mcp/mcp, a Streamable HTTP addresscodex mcp add ahrefs --url https://api.ahrefs.com/mcp/mcp, then codex mcp login ahrefs. Ahrefs says its servers show an authorization consent screen and then create a key tagged with MCP scope. Whether Codex completes that sign-in was not testedTool groups for Site Explorer, Keywords Explorer, SERP overview, Rank Tracker, Site Audit, Brand Radar, Web Analytics, Google Search Console data, social media, Content Helper, batch analysis, account management and subscription infoNeeds an Ahrefs plan from Lite. Calls use your plan's monthly API units, and OAuth keys default to 200,000 units a month per key
Ahrefs MCP server with an MCP keyHosted by AhrefsAhrefs says you can generate an MCP key in your account and use it in your agent's configuration. Codex can read a bearer token from an environment variable through bearer_token_env_var. Whether Ahrefs's server accepts that header form from Codex was not testedSame groups as aboveSame as above. A hand-made key has no per-key limit by default, and workspace plan limits still apply

Ahrefs's server advertises more tools than some clients accept, and lets you choose groups with a tools parameter on the URL, for example ?tools=essentials. An unknown group name is rejected with an invalid tool category error. OpenAI states no maximum number of tools for Codex, so whether Codex needs the parameter was not tested.

Options that do not fit Codex

  • Scripts against Ahrefs's MCP address. Ahrefs states that using its external MCP endpoint through custom scripts, bridges or standalone HTTP and JSON-RPC clients is unsupported and not permitted. For code, use the Ahrefs public API, which takes a key in the Authorization header.
  • Ahrefs's setup pages for Claude, ChatGPT Web, Copilot Studio, Lovable, n8n, Manus, Le Chat and OpenClaw. They are written for those clients. None of them describes Codex, so they are not a Codex route.
  • A community Ahrefs server. Community servers were not reviewed for this guide, so none is recommended or described here.

Which one to pick

Ryze AI is the best way to connect Codex to Ahrefs when you want read-only link and keyword data behind the same sign-in as your other Ryze AI platforms, with one caveat: it has one read tool for Ahrefs, while Ahrefs's own server lists many tool groups, including Site Audit, Rank Tracker and Brand Radar, and the Ryze AI route needs a Ryze AI plan or trial. Pick Ahrefs's server when Ahrefs data is all you need in Codex or you want those groups. Both can sit in config.toml at once under different names, such as ryze and ahrefs, and both spend the same Ahrefs API units.

Sources: Ahrefs MCP introduction, Ahrefs MCP tool categories, Ahrefs MCP setup page for Claude Code, Ahrefs API keys, OpenAI Codex MCP docs, Codex CLI command reference, Ryze AI Ahrefs guide. Checked November 22, 2026.

Sources for the options that do not fit: Ahrefs MCP introduction, Ahrefs MCP setup page for Claude Code. Checked November 22, 2026.

Codex, Ahrefs and MCP: dates that matter

DateWhat happened
October 3, 2025Codex CLI 0.44.0 added support for Streamable HTTP MCP servers, the transport both the Ryze AI connector and Ahrefs's server use.
October 6, 2025Codex CLI 0.45.0 brought experimental OAuth sign-in for MCP servers.
July 9, 2026Codex became part of the ChatGPT desktop app on macOS and Windows.
October 7, 2026Codex CLI 0.161.0 added /mcp login <name> for signing in from a running session.
November 13, 2026Codex CLI 0.169.0 came out. It keeps project configuration and MCP servers off in untrusted directories for codex exec.
November 22, 2026Ahrefs's MCP documentation describes a hosted server at https://api.ahrefs.com/mcp/mcp for users on a Lite plan or higher, with setup pages for ten clients that do not include Codex.

Sources: Codex changelog, Codex CLI 0.44.0, 0.45.0 release notes, Ahrefs MCP introduction, Ahrefs MCP setup page for Claude Code. Checked November 22, 2026.

How this guide was tested

Nothing was run for this guide. No Ahrefs account was connected for the build, so no call to Ahrefs was made, and no step was run inside Codex. The Ahrefs facts were read from Ahrefs documentation on November 22, 2026, the Codex facts from OpenAI pages read on November 14, 2026, and the Ryze AI details from the Ryze AI help center and app source.

What was runWhat came back
Calls to AhrefsNone, because no Ahrefs account was connected for this build. There is no table of tested calls and no error text copied from a test.
The ahrefs__read tool nameNever seen in a live tool list. The name comes from the Ryze AI app source.
The codex mcp add and codex mcp login stepsNone run. They repeat OpenAI's Codex documentation as read on November 14, 2026.
The Codex desktop app and IDE extension stepsNone run. The menu names repeat OpenAI's MCP page.
Ahrefs's own server from CodexNone run. Ahrefs documents no Codex setup, so both Ahrefs routes in the comparison are readings of documentation.

Skipped on purpose: every step inside Codex and every call to Ahrefs. The fixes below come from Ahrefs and OpenAI documentation, not from copied error messages, and the Ryze AI side is described from the help center.

Codex and Ahrefs errors and fixes

Ryze AI says the Ahrefs key is rejected
A plan without API access is rejected. Check the plan, that the key is still active under Account settings, API keys, and that the person who made it is still in the workspace.
Calls stop working during the month
You may have used your Ahrefs API units or a per-key limit. Ask Codex for your API limits and usage, or open Account settings, Limits and usage in Ahrefs.
The Ahrefs tool does not appear in Codex
If the connector was added before Ahrefs was connected in Ryze AI, remove the ryze server, add it again, sign in and start a new session.
The ryze server shows up but Codex answers from general knowledge
Name the ryze server and its Ahrefs tool in the prompt, and check codex mcp list or /mcp to confirm the server is enabled.
Ahrefs rejects the group name on its own server
Ahrefs documents an invalid tool category error for a name that is not in its list. Check the spelling of each group in the tools parameter, and use tools=essentials on its own, never combined with other groups.
codex mcp login opens no browser
Run codex mcp login ryze --no-browser, open the printed URL on another device and paste the full redirect URL back into the terminal.
The server times out on start or on a call
Codex waits 10 seconds to start a server and 60 seconds per tool call by default. Raise startup_timeout_sec or tool_timeout_sec in the [mcp_servers.ryze] table.
Output is cut off
Set tools.ahrefs__read.output_token_limit in config.toml, or ask for fewer rows.
The ryze table in a project config.toml is ignored
Codex reads a project's .codex/config.toml only in a trusted project, and since CLI 0.169.0 codex exec keeps project MCP servers off in an untrusted directory. Trust the project, or move the table to ~/.codex/config.toml.
A tool replies that a subscription is required
The Ahrefs tool runs only on an active Ryze AI plan or free trial. Start the trial in Ryze AI, then retry.
The one-time connection link is refused
The link is refused while Ahrefs is already connected in that workspace. Change the key in the Ryze AI app: View, disconnect, then connect again.
No CLI or IDE extension on a Free or Go plan
OpenAI lists Codex on those plans in the desktop app only, subject to rollout. Use the desktop app steps.

Sources: Ahrefs MCP tool categories, Ahrefs limits consumption, OpenAI Codex MCP docs, Codex changelog. Checked November 22, 2026.

Terms on this page

MCP
The Model Context Protocol, which Codex uses to call tools on outside servers such as the Ryze AI connector.
Streamable HTTP
The transport Codex uses for a server it reaches at an address. Its other transport, STDIO, starts a local process.
API unit
Ahrefs's measure of API use. Each request costs at least 50 units, and your plan gives a monthly allowance.
Domain Rating
Ahrefs's score for the strength of a site's backlink profile.
Referring domain
A separate site that links to your site, counted once however many links it has.
Backlink
A link from another page to your page. A broken backlink points at a page that no longer loads.
Keywords Explorer
The Ahrefs tool for keyword research. Its overview data is for a keyword in a chosen country.

Sources: Ahrefs limits consumption, Ahrefs MCP introduction, OpenAI Codex MCP docs, Ahrefs API keys. Checked November 22, 2026.

Frequently asked questions

How do I connect Codex to Ahrefs?

Generate an Ahrefs API key under Account settings, API keys, and save it on the Ahrefs card in Ryze AI. Then run codex mcp add ryze --url https://connector.get-ryze.ai/mcp, run codex mcp login ryze, sign in on the Ryze AI page and click Allow connection.

Is there an Ahrefs connector for Codex?

Ahrefs hosts its own MCP server at https://api.ahrefs.com/mcp/mcp, but its setup pages on November 22, 2026 list no Codex page. The Ryze AI connector at https://connector.get-ryze.ai/mcp is the other route and has 1 Ahrefs tool. Neither was run inside Codex for this guide.

What is the Ahrefs MCP URL for Codex?

Ahrefs's own server is a Streamable HTTP server at https://api.ahrefs.com/mcp/mcp. The Ryze AI connector uses https://connector.get-ryze.ai/mcp, the same for every user. In Codex either one goes into codex mcp add with the --url flag.

Can Codex use the Ahrefs MCP server directly?

On paper yes: Codex supports Streamable HTTP servers with OAuth or a bearer token, and Ahrefs hosts one. Ahrefs documents no Codex steps, and the sign-in was not tested, so treat codex mcp add ahrefs --url https://api.ahrefs.com/mcp/mcp as untested.

Which should I use, Ryze AI or Ahrefs's own MCP server?

Use Ahrefs's own server when Ahrefs data is all you need or you want groups such as Site Audit, Rank Tracker or Brand Radar. Use the Ryze AI connector when you want Ahrefs behind the same address as your other Ryze AI platforms. Both spend your Ahrefs API units.

Which Codex plan do I need?

OpenAI lists Codex in ChatGPT Free, Go, Plus, Pro, Business, Edu and Enterprise. Free and Go get Codex in the desktop app only, subject to rollout. Plus and higher add the CLI and the IDE extension. OpenAI's MCP page names no plan condition for adding a server.

Can I paste my Ahrefs API key into Codex?

You do not need to. With the Ryze AI connector the key is saved in the Ryze AI app and Codex signs in to Ryze AI through OAuth, or with a Ryze AI API key read from an environment variable. Codex never holds the Ahrefs key.

Can Codex change anything in my Ahrefs account?

Not through the Ryze AI connector. Its one Ahrefs tool only sends GET requests, so it reads data and cannot edit projects, keyword lists or settings.

What can Codex read from Ahrefs through Ryze AI?

Domain Rating and site metrics for a domain, subdomain, path or URL, backlinks, broken backlinks, referring domains, anchors, organic keywords, Keywords Explorer overview data for a country, and your API limits and usage.

Do I need an Ahrefs API subscription?

Yes. The Ryze AI tool uses your own Ahrefs API key and units, and a plan without API access is rejected. Ahrefs says its MCP server is available on paid plans from Lite.

How many Ahrefs API units does a call use?

At least 50. Ahrefs charges the larger of a 50-unit base cost and the per-row cost times the number of rows, where a field costs 1 unit by default and some cost 5 or 10. Cached results use none.

Can I run the Ryze AI connector and the Ahrefs server in Codex at the same time?

Yes. Each server is its own [mcp_servers.<name>] table in config.toml, for example ryze and ahrefs, and the CLI, the desktop app and the IDE extension read both. OpenAI advises turning off servers you do not need, because each adds context to your messages.

Can I connect more than one Ahrefs account?

Not in one workspace. Ryze AI holds one Ahrefs connection per workspace. To switch, disconnect with the trash icon under View on the Ahrefs card and connect again. Another key can live in another workspace.

Does this work in Codex cloud tasks?

This page does not claim it does. OpenAI's MCP page covers the CLI, the desktop app and the IDE extension, its Codex Cloud page does not mention MCP, and the connector was not tested in Codex.

How much does it cost to connect Codex to Ahrefs?

Adding the connector is free, but the Ahrefs tool needs an active Ryze AI plan or free trial. SEO Starter is $129 per month with a 3-day free trial, Paid Ads is $89 per month with a 7-day free trial, and Agency is $279 per month. Annual billing takes 30% off the first year. Ahrefs bills its API units, and Codex is billed under your OpenAI plan or API pricing.

Connect Ahrefs to Codex

Adding the connector is free; the Ahrefs tool needs an active plan or trial. SEO Starter is $129 per month with a 3-day free trial and Paid Ads is $89 per month with a 7-day free trial; annual billing takes 30% off the first year.

Ahrefs MCP server

Need help? Read the Ryze AI Ahrefs guide or email Ryze AI support.