home / mcp / dataforseo mcp server

DataForSEO MCP Server

DataForSEO API modelcontextprotocol server

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "dataforseo-mcp-server-typescript": {
      "url": "https://mcp.dataForSEO.example/mcp",
      "headers": {
        "ENABLED_MODULES": "SERP,KEYWORDS_DATA,ONPAGE,DATAFORSEO_LABS,BACKLINKS,BUSINESS_DATA,DOMAIN_ANALYTICS",
        "ENABLED_PROMPTS": "top_3_google_result_domains,top_5_serp_paid_and_organic",
        "DATAFORSEO_PASSWORD": "YOUR_PASSWORD",
        "DATAFORSEO_USERNAME": "YOUR_USERNAME",
        "DATAFORSEO_FULL_RESPONSE": "false",
        "DATAFORSEO_SIMPLE_FILTER": "false"
      }
    }
  }
}

You can deploy and run the DataForSEO MCP Server to query DataForSEO APIs through a consistent MCP interface. It enables AI assistants to discover keywords, analyze SERPs, crawl pages, and access various DataForSEO data sources via modular, configurable endpoints.

How to use

Start the MCP server locally or via a remote HTTP endpoint to let your AI agents query DataForSEO APIs. Before you begin, ensure your credentials are available and you know which modules you want enabled. You can run the server in standard MCP mode or expose it over HTTP for clients to reach.

How to install

Prerequisites: Node.js v14 or higher and DataForSEO API credentials (username and password). Ensure you have a compatible shell to set environment variables and run commands.

Step by step commands to get started locally:

# 1. Clone the MCP server repository
git clone https://github.com/dataforseo/mcp-server-typescript
cd mcp-server-typescript

# 2. Install dependencies
npm install

# 3. Set credentials and optional preferences
export DATAFORSEO_USERNAME=your_username
export DATAFORSEO_PASSWORD=your_password

# Optional: enable specific modules (e.g., SERP, KEYWORDS_DATA, ONPAGE, DATAFORSEO_LABS, BACKLINKS, BUSINESS_DATA, DOMAIN_ANALYTICS)
export ENABLED_MODULES="SERP,KEYWORDS_DATA,ONPAGE,DATAFORSEO_LABS,BACKLINKS,BUSINESS_DATA,DOMAIN_ANALYTICS"

# Optional: enable specific prompts within enabled modules
export ENABLED_PROMPTS="top_3_google_result_domains,top_5_serp_paid_and_organic"

# Optional: request full API responses and simple filter behavior
export DATAFORSEO_FULL_RESPONSE="false"
export DATAFORSEO_SIMPLE_FILTER="false"

Step to run the server in MCP mode or HTTP mode:

# Start in standard MCP communication mode
npx dataforseo-mcp-server

# Start an HTTP server for MCP access
npx dataforseo-mcp-server http

Configuration

You control which modules and prompts are active via environment variables. These settings tailor the MCP server to your use case and can help optimize responses for your AI workflows.

Environment variables shown in the setup include:

- DATAFORSEO_USERNAME: DataForSEO username (required) - DATAFORSEO_PASSWORD: DataForSEO password (required) - ENABLED_MODULES: comma-separated list of modules to enable - ENABLED_PROMPTS: comma-separated list of prompts to enable within the enabled modules - DATAFORSEO_FULL_RESPONSE: true to return full API responses, false to return concise results - DATAFORSEO_SIMPLE_FILTER: true to enable a simplified filters schema for compatibility with certain clients

Cloudflare Worker Deployment

Optionally, you can deploy the MCP server as a Cloudflare Worker for edge-based access to DataForSEO APIs. This setup offers global distribution, serverless operation, and automatic scaling.

Quick start steps include installing Wrangler, configuring credentials as secrets, and deploying the worker.

# Install Wrangler
npm install -g wrangler

# Login and configure secrets
wrangler login
wrangler secret put DATAFORSEO_USERNAME
wrangler secret put DATAFORSEO_PASSWORD

# Build and deploy
npm run build
wrangler deploy --main build/index-worker.js

Notes on usage and security

Keep credentials secure. Use environment variables or Cloudflare Secrets to avoid exposing sensitive information in logs or code. If you expose credentials to a client, rotate them regularly and limit the scope of each credential.

Available tools

AI_OPTIMIZATION

API providing data for keyword discovery, conversational optimization, and real-time benchmarking for language model evaluation.

SERP

Real-time SERP data for Google, Bing, and Yahoo.

KEYWORDS_DATA

Keyword research and clickstream data including search volume and CPC.

ONPAGE

Crawl websites and pages to obtain on-page SEO performance metrics.

DATAFORSEO_LABS

Data from DataForSEO databases and proprietary algorithms.

BACKLINKS

Backlink analysis including referring domains and anchor text distribution.

BUSINESS_DATA

Public business data from multiple sources.

DOMAIN_ANALYTICS

Technology footprint, traffic, and Whois details for domains.

CONTENT_ANALYSIS

Brand monitoring, sentiment analysis, and citation management.