DataForSEO MCP
DataForSEO MCP Server enables AI assistants to access real-time SEO data via standardized APIs. It supports keyword discovery, SERP, backlinks, on-page metrics, and domain analytics for optimized SEO insights.
How to Install and Use DataForSEO MCP
If you want a simple way to use DataForSEO’s powerful SEO data with AI assistants, then the DataForSEO MCP (Model Context Protocol) server is the tool for you. This guide will show you how to install and run it. Follow these easy steps to get started quickly.
Setting Up Your Environment
Before installing the DataForSEO MCP server, you need a couple of things ready. First, make sure you have Node.js version 14 or higher installed on your computer. This tool runs on Node.js, so it’s essential.
Next, you will need your DataForSEO API credentials. This means you must have a username and a password from DataForSEO to access their API.
Installing DataForSEO MCP Server
Once your environment is ready, you can install the server. Here is how to get it running:
-
Clone the Repository
This means downloading the server code from GitHub to your computer. Open your command prompt or terminal and run:
git clone https://github.com/dataforseo/mcp-server-typescript cd mcp-server-typescript -
Install Dependencies
The server needs additional code libraries to work. Install them by typing:
npm install -
Set Environment Variables
You need to tell the server your API login details. Set these environment variables:
export DATAFORSEO_USERNAME=your_username export DATAFORSEO_PASSWORD=your_passwordYou can also enable specific modules by setting:
export ENABLED_MODULES="SERP,KEYWORDS_DATA,ONPAGE,DATAFORSEO_LABS,BACKLINKS,BUSINESS_DATA,DOMAIN_ANALYTICS"This controls which parts of the API you want available. If not set, all modules are enabled by default.
Starting the Server
After installation is complete, you are ready to run the server. First, build the project with:
npm run build
Now, you can start the server. You have two options:
-
Local Server (for direct MCP communication):
npx dataforseo-mcp-server -
HTTP Server (runs on port 3000, supports Basic Auth):
npm run http
When running the HTTP server, you can send requests with Basic Authentication or use your environment variables for login.
Running Without Installing (Quick Start)
If you want to use it right away without downloading the code, you can run the package directly with:
# Make sure environment variables are set first:
export DATAFORSEO_USERNAME=your_username
export DATAFORSEO_PASSWORD=your_password
# Run the server using npx:
npx dataforseo-mcp-server
This is useful when you want to try it fast or run it on another machine with minimal setup.
Using the Server with Your AI Assistant
Once the server is running, your AI assistant can interact with DataForSEO APIs easily. If you deploy the server on Cloudflare Worker, it provides extra benefits like edge distribution and auto-scaling.
For example, after deploying the MCP server to Cloudflare, configure your AI tool with this transport setting:
{
"name": "DataForSEO",
"description": "Access DataForSEO APIs via Cloudflare Worker",
"transport": {
"type": "http",
"baseUrl": "https://your-worker.your-subdomain.workers.dev/mcp"
}
}
Summary
To install and use DataForSEO MCP, you:
- Prepare Node.js and API credentials
- Clone the repository and install dependencies
- Set environment variables
- Build and run the server locally or as an HTTP server
- Optionally run it quickly with npx without installation
Following these steps, you can easily access SEO data from DataForSEO through a unified AI-friendly interface.