How to add the Ahrefs MCP Server to Cursor

I've been testing out using the Ahrefs MCP server inside of the Claude desktop app, but honestly have been less than thrilled about it's skill at keyword research and analysis. It's not very creative, and comes back with the same kind of suggestions each time.

I also haven't enjoyed swapping back and forth between Claude and whatever I'm doing.

But then I realized that I can add MCP servers to Cursor, and that the Ahrefs MCP might become a lot more useful paired with access to the code context of my marketing site and other content.

The Ahrefs MCP docs don't show this step by step, but with some fiddling I got it worked out.

First, you go to your API Keys page of your Ahrefs dashboard. Here, you'll want to click on the "Generate MCP key" button:

generate mcp key

Create an MCP Key, copy it and save it somewhere.

Then, go to Cursor, and go to View: Open MCP Settings (or Settings => Cursor Settings => Tools and MCP). Click add "New MCP Server" and it will either open up or create a little mcp.json folder for you.

Here's what you'll want to put in there (replace INSERT_KEY_HERE) with the MCP key you copied from Ahrefs.

{
	"mcpServers": {
		"ahrefs": {
			"url": "https://api.ahrefs.com/mcp/mcp",
			"headers": {
				"Authorization": "Bearer INSERT_KEY_HERE"
			}
		}
	}
}

Then in your agent conversation, you can just ask the agent to check stuff using Ahrefs. For example, I wanted to dig into my recent site audit and fix a few issues, so I asked "can you check the site audit results in ahrefs for colorbliss.com" and it was able to find the site, get the score, and explain the issues. Example convo: ahrefs mcp convo 2

This will be an interesting addition to my workflow, both for fixing issues and for writing / updating content in Cursor!