Announcing Dome Managed Agents.

Try it now

How to set up the Ahrefs MCP server

Configure Ahrefs MCP with OAuth, an MCP key, or an Enterprise API key, then verify the intended data boundary.
Tu Nguyen

Ahrefs is an SEO intelligence platform for researching search performance, backlinks, keywords, and sites. Its hosted MCP server supports interactive OAuth, a manually generated MCP key, and—on Enterprise plans—an API key.

This guide prepares Ahrefs for an MCP client. The Ahrefs agent template is separate from vendor credential setup.

Choose a connection method

Ahrefs MCP is available on Lite plans and above. Choose OAuth for an interactive MCP client, an MCP key for a shared non-interactive connection, or an Enterprise API key only when that is the credential your plan permits. Ahrefs documents all three in its MCP guide.

OAuth is the normal hosted-MCP flow. It creates a dedicated API key with the MCP scope after the user approves consent.

  1. Add https://api.ahrefs.com/mcp/mcp as the remote MCP server in an OAuth-capable client.
  2. Sign in to the intended Ahrefs account, choose the intended workspace, and approve consent.
  3. In Ahrefs' API keys report, confirm the new key is tagged MCP and set an appropriate per-key API-unit limit.
  4. Query a known test property, then confirm that a property outside the intended account or project is unavailable.

Alternative: Manually generated MCP key

Use a manually generated MCP key for a shared, non-interactive connection.

  • Generate an MCP key in Ahrefs for the intended account.
  • Store it only in the MCP client's secret storage as Authorization: Bearer <MCP key>.
  • Set a named owner, a rotation date, and a conservative API-unit limit.

Alternative: Enterprise API key

Enterprise customers can use an Ahrefs API key instead of an MCP key. API keys and MCP keys are not interchangeable, so configure the connection with the credential type you created and apply the same owner, usage-limit, and rotation controls.

Verify Ahrefs MCP

Use this checklist to confirm the MCP server is connected with the intended access.

  • Connect the MCP client using the newly created authorization.
  • Confirm that Ahrefs MCP tools are discovered.
  • Read one known test resource that the authorized identity is allowed to access.
  • Attempt to read a resource outside the approved Ahrefs boundary; it should be unavailable or denied.
  • Confirm that no write capability beyond the reviewed setup is available.

Troubleshooting

Authentication errors often mean that the subscription does not include the requested API product. Successful authentication with unexpected data requires an account/project access review and credential rotation—not prompt-level filtering.

Next steps

Deploy the Ahrefs agent template to create a governed agent in Dome that can research search performance, backlinks, and keywords, with the template's included model, tools, and rules.

More from the blog.

Audit schema v2
Existing detectorPass
New fieldactor_scope
CompatibilityChecked
decision_id dec_42tool_call call_8fbackend_req req_91
MCP setup

Next perspective,straight to your inbox.

Subscribe

Each new perspective and field guide, the week it publishes. Nothing else.

Product updates

Release notes and platform changes live on the updates page.

Every agent you run,under one system of control.