
Your agent needs to read Ahrefs. It has to pull backlinks, compare organic keywords, check rank positions, and diagnose why a client's traffic dropped last month. Ahrefs ships a hosted remote MCP server and a REST API v3, and it is tempting to treat them as two interchangeable ways to reach the same data. They are not. One is built for interactive AI assistants; the other is the only path Ahrefs supports for programmatic agents. Picking the wrong one is not a style choice; it is a terms-of-use problem. Here is how to choose.
Ahrefs runs a hosted remote MCP server at https://api.ahrefs.com/mcp/mcp over Streamable HTTP. It is available on paid plans from Lite and up, and it connects Ahrefs data to supported AI assistants through natural language.
Connection is an OAuth consent screen. Once approved, a dedicated API key tagged with MCP scope appears in your account; you can also mint an MCP key manually, and Enterprise customers can connect with existing keys. The official docs, setup guides per client, and connection URLs live at the Ahrefs MCP reference.
One constraint defines the whole comparison: Ahrefs states that using the external MCP endpoint via custom scripts, bridges, or standalone HTTP or JSON-RPC clients is unsupported and not permitted, and that the MCP server is not a general-purpose programmatic API.
The Ahrefs API v3 is a REST interface over the same underlying data, plus surfaces the MCP does not expose. It covers Site Explorer, Keywords Explorer, Site Audit, Rank Tracker, SERP Overview, Batch Analysis, Brand Radar, Web Analytics, GSC Insights, Social Media Management, Management, Subscription Information, and Public endpoints.
Auth is a bearer key: Authorization: Bearer YOUR_API_KEY. Only workspace owners and admins create keys. This is the path Ahrefs points you to for any programmatic access, which for an agent backend means the API is the default, not the alternative.
The MCP and the API overlap heavily on data retrieval. They diverge on programmatic eligibility, writes, and the surfaces that never made it into the MCP. The table uses plain labels, not icons.
This is the section that saves you a wrong bet. Read the two official navigations side by side and the gap is unambiguous.
The MCP tool surface mirrors the API's read endpoints, exposed as tools for an assistant. Every tool in the connector catalog resolves to a data pull: batch_analysis, the brand_radar_* family, the gsc_* family, and the Site Explorer and Keywords Explorer reads. There is a doc tool whose only job is to return the input schema for the other tools.
Three things sit in the API navigation and not in the MCP.
If your agent has to create a project, write a list, or run a scheduled crawl, the MCP cannot express it. That is not a missing tool shipping next month; the MCP was scoped for assistants reading data, and Ahrefs routes everything else to the API.
The split is real but narrower than it looks, so state it precisely.
That last detail matters for offboarding: Ahrefs ties key validity to workspace membership, but only for the person who minted it, not for the tenant your agent serves.
Neither path is a free lane. Ahrefs is explicit that when a third-party app makes an MCP call on your behalf, it consumes API units from the same monthly allowance as direct API usage. The minimum cost for a request is 50 units, and cost scales with rows returned and fields selected.
For an agent, that reframes the API's select parameter from a nicety into a cost lever. A chat client cannot trim fields to save units; your code can.
Schema drift differs too. MCP tool schemas change when Ahrefs updates the hosted server; the API is versioned so you control when you move.
Use Ahrefs MCP when:
Use the Ahrefs API when:
Both paths hand you a key. Neither hands you a vault, a rotation schedule, or a revocation flow.
A multi-tenant SEO agent is the norm, not the exception: an agency-style product where each customer org has its own Ahrefs subscription and its own key. That is N keys to store encrypted, N keys to rotate before the one-year expiry, and N keys to revoke when a customer churns. The MCP's OAuth path produces per-user keys, but only inside a supported assistant, so it does nothing for your backend.
An Ahrefs key grants access to the full database, not just tracked projects. So a key belonging to tenant A, if resolved for a request triggered by tenant B, reaches tenant A's subscription and burns tenant A's units. Per-tenant isolation, correct attribution, and scope enforcement are infrastructure you build, and they are identical whether the underlying token came from the MCP consent or a manually created API key.
Scalekit's Ahrefs connector vaults the Ahrefs key per tenant in an AES-256 token vault, resolves it server-side on every call so it never enters the agent runtime or the LLM context, and logs each call against the user who authorized it. The same infrastructure works whether your team connects through the assistant-facing MCP or builds directly on the API, so the path decision does not change what you need at the credential layer.
An SEO agent is a multi-tool, multi-tenant problem by default. It reaches into Ahrefs for keyword and backlink data, then writes to Slack, Notion, or a sheet, on behalf of a specific customer. Scalekit gives that agent one execute_tool interface across every connector, resolves the right tenant's Ahrefs credential at request time, and keeps the raw key out of your prompts and logs. You build the agent; not the auth plumbing for each connector.
The pattern is discovery, then execution. First retrieve the tools this user's connected Ahrefs account is authorized to call, then execute one. The connectionNames value must match the connection name configured in your Scalekit dashboard exactly; a mismatch here is the most common integration error.
The Python SDK follows the same discovery-then-execution sequence with snake_case methods. Exact method signatures and the authoritative tool list live in the connector docs.
Pass the scoped Ahrefs tools straight into the Anthropic messages call. The agent sees only the subset you authorized for this user, which keeps the tool surface small and tool selection accurate.
For a LangChain agent, wrap each scoped tool so its callable routes back through executeTool, which resolves the vaulted credential per user on every call.
Scalekit also ships adapters for OpenAI, Google ADK, Vercel AI, and Mastra. If the framework you run is not documented yet, ask for it in the Scalekit community Slack or talk to Scalekit's engineers.
The benefit compounds as the agent grows. Scoping each user to the handful of Ahrefs tools their account authorizes keeps the tool surface small, which keeps tool selection accurate and the token overhead low. Adding the next connector, Slack, Notion, a CRM, inherits the same vault and audit chain with no new OAuth code. What the user cannot do, the agent cannot do, because scope is a function of identity, not connector configuration.
Every execute_tool call is logged: which user triggered it, which tool ran, and what came back, with history you can export to a SIEM. For a multi-tenant SEO agent that spends real API units per tenant, that log is how you answer the questions that actually get asked in production. Whose subscription served this request, was the call in scope, and why did tenant B's unit budget move. Shared keys cannot answer any of those; per-user resolution answers all three. See Auth Logs for the queryable event trail.
If your workflow needs an Ahrefs surface Scalekit has not exposed, or a write path the MCP cannot express, request it rather than building a one-off. Start a thread in the community Slack, or book a working session with the team.
If your Ahrefs work happens inside a supported assistant with a human present, and the job is reading and searching data, the MCP is the faster route and needs no connector code. If you are shipping an agent backend, a scheduled job, or anything that writes or manages projects, build on the API v3, because the MCP endpoint is not open to programmatic clients and the write surface lives in the API. Most production SEO agents will land on the API for exactly those reasons. Either way, the credential problem is the same: N keys per tenant, stored, scoped, rotated, and revoked, and that is the part that needs production-grade infrastructure.
Browse the Scalekit Ahrefs connector: scalekit.com/connectors/ahrefsmcp