DataForSEO MCP server

Connects to DataForSEO's API suite to provide access to comprehensive SEO data including search results, keyword metrics, backlinks, domain analytics, and business listings for SEO analysis and content optimization workflows.
Back to servers
Setup instructions
Provider
skobyn
Release date
Mar 20, 2025
Language
TypeScript
Package
Stats
603 downloads
7 stars

The DataForSEO MCP server provides a standardized interface to access various DataForSEO API services using the Model Context Protocol (MCP). This server allows you to query search engine results, keyword data, backlinks, and other SEO-related information through a simple JSON-based interface.

Installation Options

You can run the DataForSEO MCP server directly with npx:

npx @skobyn/mcp-dataforseo --config '{"username":"your_username","password":"your_password"}'

Or install it globally for easier access:

npm install -g @skobyn/mcp-dataforseo
mcp-dataforseo --config '{"username":"your_username","password":"your_password"}'

Basic Usage

The server operates through standard input/output, accepting JSON requests and returning JSON responses:

echo '{"type":"dataforseo_serp","keyword":"artificial intelligence"}' | npx @skobyn/mcp-dataforseo --config '{"username":"your_username","password":"your_password"}'

Supported API Endpoints

SERP API

Query search engine results:

{
  "type": "dataforseo_serp",
  "keyword": "artificial intelligence",
  "location_code": 2840,
  "language_code": "en",
  "device": "desktop",
  "os": "windows"
}

Keywords Data API

Get information about specific keywords:

{
  "type": "dataforseo_keywords_data",
  "keywords": ["seo", "search engine optimization"],
  "location_code": 2840,
  "language_code": "en"
}

Backlinks API

Analyze backlinks for a domain:

{
  "type": "dataforseo_backlinks",
  "target": "example.com",
  "limit": 100
}

On-Page API

Analyze on-page SEO factors:

{
  "type": "dataforseo_onpage",
  "url": "https://example.com",
  "check_spell": true,
  "enable_javascript": true
}

Domain Analytics API

Get analytics for a specific domain:

{
  "type": "dataforseo_domain_analytics",
  "domain": "example.com"
}

App Data API

Get data about mobile applications:

{
  "type": "dataforseo_app_data",
  "app_id": "com.example.app"
}

Merchant API

Query e-commerce product data:

{
  "type": "dataforseo_merchant",
  "keyword": "bluetooth speakers",
  "location_code": 2840,
  "language_code": "en"
}

Business Data API

Get local business information:

{
  "type": "dataforseo_business_data",
  "keyword": "pizza delivery",
  "location_code": 2840,
  "language_code": "en"
}

Node.js Integration Example

Here's how to integrate the MCP server in your Node.js code:

const { spawn } = require('child_process');

// Start the MCP server
const server = spawn('npx', ['@skobyn/mcp-dataforseo', '--config', '{"username":"your_username","password":"your_password"}']);

// Define the request
const request = {
  type: 'dataforseo_serp',
  keyword: 'artificial intelligence'
};

// Send the request
server.stdin.write(JSON.stringify(request) + '\n');
server.stdin.end();

// Process the response
server.stdout.on('data', (data) => {
  const response = JSON.parse(data.toString());
  console.log(response);
});

// Handle errors
server.stderr.on('data', (data) => {
  console.error(`Error: ${data}`);
});

Using Environment Variables

Instead of passing credentials in the config parameter, you can use environment variables:

export DATAFORSEO_USERNAME=your_username
export DATAFORSEO_PASSWORD=your_password
npx @skobyn/mcp-dataforseo

This approach is often preferred for security reasons, especially in production environments.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "dataforseo" '{"command":"npx","args":["@skobyn/mcp-dataforseo"],"config":{"username":"your_username","password":"your_password"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "dataforseo": {
            "command": "npx",
            "args": [
                "@skobyn/mcp-dataforseo"
            ],
            "config": {
                "username": "your_username",
                "password": "your_password"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "dataforseo": {
            "command": "npx",
            "args": [
                "@skobyn/mcp-dataforseo"
            ],
            "config": {
                "username": "your_username",
                "password": "your_password"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later