Deploy MCP in Cherry Studio

Ahrefs MCP Installation and Configuration Guide

A Model Context Protocol Server for connecting Cherry Studio to Ahrefs.

1. Install Node.js and NPM

  • Download Node.js from nodejs.org.
  • Follow the installation instructions for your operating system.
  • Verify the installation by running “npm -v” in your terminal. If successful, the version number will be printed.
  • Windows Users: When installing Node.js, use the official installer and ensure the installation directory is added to the PATH environment variable during the installation process.

  • 2. Install the Ahrefs MCP Server

    • Run the following command in your terminal:

    <BASH>

    npm install --prefix=~/.global-node-modules @ahrefs/mcp -g

    3. Update the Ahrefs MCP Server (if previously installed)

    • If you have previously installed the MCP server and only want to update it, run the following command:

    <BASH>

    npm install --prefix=~/.global-node-modules @ahrefs/mcp@latest -g

    4. Configure the MCP Server in your AI assistant application

    • Add the Ahrefs MCP server configuration to Cherry Studio's configuration file. The below config applies to MacOS.

    <JSON>

    {
        "mcpServers": {
            "ahrefs": {
                "command": "npx",
                "args": [
                    "--prefix=~/.global-node-modules",
                    "@ahrefs/mcp"
                ],
                "env": {
                    "API_KEY": "YOUR_API_KEY_HERE"
                }
            }
        }
    }

    5. Configuration specific to Windows

    • For Windows operating systems, the prefix path in the configuration will be different.

    <JSON>

    {
        "mcpServers": {
            "ahrefs": {
                "command": "npx",
                "args": [
                    "--prefix=C:\\Users\\YOUR_USERNAME_HERE\\.global-node-modules\\node_modules",
                    "@ahrefs/mcp"
                ],
                "env": {
                    "API_KEY": "YOUR_API_KEY_HERE"
                }
            }
        }
    }


    Important Notes for Windows:

    • Note the double-escaped backslashes in the path.
    • Note the different prefix directory.
    • Note the forward slash before @ahrefs/mcp.

    Remember to replace YOUR_API_KEY_HERE and YOUR_USERNAME_HERE with your actual API key and Windows username. Good luck!

    If you encounter any problems, please Contact us promptly!
    Email: support@seobus.io
    Phone: +852 9374 0262
    WhatsApp: https://wa.me/85293740262

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.