home / mcp / dataforseo mcp server
DataForSEO API modelcontextprotocol server
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.
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.
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 httpYou 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
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.jsKeep 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.
API providing data for keyword discovery, conversational optimization, and real-time benchmarking for language model evaluation.
Real-time SERP data for Google, Bing, and Yahoo.
Keyword research and clickstream data including search volume and CPC.
Crawl websites and pages to obtain on-page SEO performance metrics.
Data from DataForSEO databases and proprietary algorithms.
Backlink analysis including referring domains and anchor text distribution.
Public business data from multiple sources.
Technology footprint, traffic, and Whois details for domains.
Brand monitoring, sentiment analysis, and citation management.