← Back to articles

How to Connect Ahrefs to ChatGPT?

Published September 9, 2026 · Written by Aanart

This is a two-part setup: generate an API key in Ahrefs and paste it into SourcetoMCP, then add SourcetoMCP as a custom app inside ChatGPT's developer mode. Ahrefs is the one source here where every read draws down a paid allowance, so the section on units below is worth reading before you let an agent loose on it. For everything the connector can pull, see the Ahrefs MCP server page.

Before you start

You need a SourcetoMCP account with a brand created, an Ahrefs subscription that includes API access, and a ChatGPT account on a Pro, Plus, Business, Enterprise or Education plan. Custom MCP connectors run through developer mode, which works on ChatGPT on the web only.

Generate an Ahrefs API key

  1. 1In Ahrefs, open Account settings, then API keys.
  2. 2Create a key and label it so you can tell it apart from any others later.
  3. 3Copy it and keep the tab open until the connection is finished.

Ahrefs keys expire one year after creation and are invalidated if the person who created them leaves the workspace. Neither can be refreshed, so a dead key is replaced rather than repaired. On a shared workspace, generate it from an account that will still be there next year.

Connect Ahrefs to SourcetoMCP

  1. 1From your dashboard, go to ConnectorsAdd a connection.
  2. 2Find the Ahrefs card and select Connect.
  3. 3Paste the key and confirm. SourcetoMCP verifies it against Ahrefs immediately.

Add SourcetoMCP as a connector in ChatGPT

  1. 1In SourcetoMCP, open Connect an agent from the dashboard sidebar and copy your server address (it looks like https://sourcetomcp.com/api/mcp).
  2. 2In ChatGPT, open Settings, then Security and login, and turn on Developer mode. Custom MCP connectors sit behind this toggle, and it only appears on ChatGPT on the web.
  3. 3Open the Plugins menu and select the “+” button to create a developer-mode app.
  4. 4Enter the name SourcetoMCP, paste in your server address, and pick OAuth as the authentication type.
  5. 5Save. The app now sits under Drafts in your app settings, where you can switch individual tools on or off.
  6. 6The first time ChatGPT calls it, you'll be asked to sign in to SourcetoMCP and approve access. After that it reconnects on its own.

Ask ChatGPT about any domain

A developer-mode app stays off until you pick it. Open the Plus menu, choose Developer mode, and select SourcetoMCP for that conversation. Naming the app in your question helps ChatGPT reach for the right tool.

You do not need to own or verify a domain to ask about it, which is the difference between this and Search Console. Competitor domains read exactly like your own. Try something like:

  1. 1Compare the referring domain counts of these three competitors.
  2. 2What anchor text points at this domain most often?
  3. 3Show me the SERP overview for this keyword.
  4. 4Which keywords does this competitor rank for that I do not?

What each question costs you

Every Ahrefs read spends API units from your own monthly allowance. Ahrefs charges the greater of 50 units or the per-row cost times the number of rows returned, and the per-row cost depends on which fields the request touches. That allowance is shared with anything else hitting your Ahrefs API, so a large uncapped pull is a real expense rather than a rate-limit annoyance.

SourcetoMCP fixes the fields each operation requests instead of letting an agent ask for everything, caps the row count well below the Ahrefs default, and returns the units actually consumed alongside the result. Ask ChatGPT what a query cost and it can read the answer out of the response.

Turning off the expensive tools

Developer-mode apps let you enable individual tools, and that control is more useful here than on any other source. If a session is only meant to check keyword ideas, switch the backlink and batch-analysis tools off in the app's settings first. ChatGPT then cannot reach for them, which caps what the conversation can spend regardless of how the question is phrased. Every Ahrefs operation is read-only, so the risk being managed is cost, not damage.

Troubleshooting

The key was rejected: it is wrong, revoked, or past its one-year expiry. Generate a fresh one under Account settings → API keys.

Developer mode is missing from Settings: it is available on Pro, Plus, Business, Enterprise and Education accounts, and only on ChatGPT on the web. The mobile apps do not show it.

It worked last month and now fails: Ahrefs invalidates a key when the person who created it leaves the workspace. Check that first before assuming expiry.

Units run out faster than expected: the allowance is shared across everything using your Ahrefs API. Turn off the tools you are not using for that session, and ask ChatGPT to check the remaining allowance before a large analysis.

Revoking access

Remove the workspace from your Connections page, or delete the key in Ahrefs under Account settings → API keys. Turning Developer mode off in ChatGPT hides every custom app at once without deleting any of them, which is the fastest way to stop spend mid-month.

Still stuck?

Reach us at [email protected].