DataForSEO MCP is a Model Context Protocol (MCP) server that integrates the DataForSEO API for comprehensive SEO data analysis. This project is hosted as a Cloudflare Workers application.
This MCP server allows client applications to:
- Perform comprehensive keyword research and competitive analysis
- Analyze SERP results (organic, news, and historical trends)
- Get backlink analysis and domain authority metrics
- Discover competitors and ranked keywords automatically
- Track SEO metrics and trends programmatically
- 🔍 Keyword Research: Search volume and related keywords (2 tools)
- 📊 SERP Analysis: Organic and news SERP data (2 tools)
- 🎯 Domain Analysis: Ranked keywords and domain authority (2 tools)
- 🔄 Real-time Data: Live API endpoints with 2-8 second response times
- 🌐 Multi-language Support: Analyze data for different languages and locations
- 💰 Pay-as-you-go: All tools work with credit-based pricing (no monthly plans required)
- 🛠️ MCP Tools: 6 working tools total, easy integration with MCP-compatible AI assistants
⚠️ Note: Some tools require additional DataForSEO subscriptions or are not available:
- Backlinks API (3 tools) - Requires Backlinks subscription ($99/month)
- Google Trends (1 tool) - API parameter issues (under investigation)
- Keyword Difficulty (1 tool) - Not available via live API
- Keyword Suggestions (2 tools) - Not available via live API
- Competitors Discovery (1 tool) - Not available via live API
- Historical SERP (1 tool) - Not available via live API
- Node.js >= 22.0.0
- Bun runtime and package manager
- DataForSEO account with API credentials
- Navigate to the data-for-seo directory:
cd data-for-seo- Install dependencies:
bun install-
Configure your DataForSEO credentials in the MCP Mesh UI or set them directly:
- API Login: Your DataForSEO API Login (from https://app.dataforseo.com/api-access)
- API Password: Your DataForSEO API Token (NOT your account password)
-
Start the development server:
bun run devThe server will start with hot reload enabled.
bun run buildThis creates a production bundle at dist/server/main.js.
bun run dev- Start development server with hot reloadbun run build- Build for productionbun run check- Type check TypeScript without compiling
⚠️ Important: All tools are ASYNCHRONOUS and make live API calls to DataForSEO. Response times vary from 2-15 seconds depending on the endpoint.
| Category | Tools | Best For | Status |
|---|---|---|---|
| Keywords (2) | Search Volume, Related Keywords | Keyword research and discovery | ✅ Working |
| Domain Analysis (2) | Ranked Keywords, Domain Rank | Competitive intelligence and authority | ✅ Working |
| SERP (2) | Organic SERP, News SERP | Ranking analysis and monitoring | ✅ Working |
| Category | Tools | Status | Reason |
|---|---|---|---|
| Backlinks (3) | Overview, List, Referring Domains | 🔒 Requires Subscription | Need $99/month Backlinks plan |
| Google Trends (1) | Trends Explore | Parameter validation error | |
| Keyword Research (3) | Difficulty, Suggestions, Ideas | ❌ Not Available | Not in live API |
| Domain Analysis (1) | Competitors Discovery | ❌ Not Available | Not in live API |
| SERP (1) | Historical SERP | ❌ Not Available | Not in live API |
[ASYNC - Standard Plan] Get search volume, CPC, and competition data for up to 1000 keywords at once.
Response Time: 2-5 seconds
Cost: ~0.002 credits per keyword
Plan Required: All plans
Input:
{
keywords: string[]; // Array of keywords to analyze (max 1000)
languageName?: string; // e.g., "English"
locationName?: string; // e.g., "United States"
languageCode?: string; // e.g., "en"
locationCode?: number; // e.g., 2840 for US
}Returns: Search volume, CPC, competition level, monthly trends
[ASYNC - DataForSEO Labs] Get keyword suggestions with semantic relationships.
Response Time: 3-10 seconds
Cost: ~0.1 credits per request
Plan Required: All plans (higher cost)
Input:
{
keyword: string; // Seed keyword (single keyword)
locationName?: string; // Default: "United States"
languageName?: string; // Default: "English"
locationCode?: number; // Alternative to locationName
languageCode?: string; // Alternative to languageName
depth?: number; // 1-10 (keyword expansion depth)
limit?: number; // Max results (default: 100)
}Returns: Up to 1000 related keywords with search volume, competition, and SERP data
[ASYNC - Standard Plan] Get Google Trends data for up to 5 keywords including interest over time, regional interest, and related queries.
Response Time: 3-8 seconds
Cost: ~0.01 credits per request (very affordable!)
Plan Required: All plans
Input:
{
keywords: string[]; // 1-5 keywords to compare trends
locationName?: string; // Default: "United States"
locationCode?: number; // Alternative to locationName
timeRange?: string; // "now 1-d", "now 7-d", "today 1-m", "today 3-m",
// "today 12-m", "today 5-y", "2004-present"
category?: number; // Category ID (0 = All categories)
}Returns: Interest over time (trend graphs), regional interest by location, related queries, rising queries
Use Cases:
- Track keyword popularity trends over time
- Identify seasonal patterns in search behavior
- Compare multiple keywords trending patterns
- Find trending related queries
- Analyze regional interest distribution
[ASYNC - DataForSEO Labs] Get keyword difficulty scores (0-100) for up to 100 keywords at once.
Response Time: 3-10 seconds
Cost: ~0.05 credits per keyword (excellent value!)
Plan Required: All plans (DataForSEO Labs)
Input:
{
keywords: string[]; // 1-100 keywords to analyze
languageName?: string; // Default: "English"
locationName?: string; // Default: "United States"
languageCode?: string; // Alternative to languageName
locationCode?: number; // Alternative to locationName
}Returns: Difficulty score (0-100, lower = easier to rank), competitive metrics, top-ranking domains, ranking complexity analysis
Difficulty Score Interpretation:
- 0-20: Very Easy - Low competition, great for new websites
- 21-40: Easy - Moderate competition, achievable with good content
- 41-60: Medium - Competitive, requires SEO strategy
- 61-80: Hard - Highly competitive, established sites dominate
- 81-100: Very Hard - Extremely competitive, major brands/authority sites
Use Cases:
- Evaluate keyword competitiveness before targeting
- Build content strategy around low-difficulty keywords
- Prioritize keyword opportunities by difficulty vs. search volume
- Competitive analysis for SEO planning
- Batch analyze keyword lists for content calendars
[ASYNC - DataForSEO Labs] Get ALL keywords a domain ranks for in Google with positions, search volume, and estimated traffic.
Response Time: 5-15 seconds
Cost: ~0.02 credits per request (excellent value!)
Plan Required: All plans (DataForSEO Labs)
Input:
{
target: string; // Domain to analyze (e.g., "example.com")
languageName?: string; // Default: "English"
locationName?: string; // Default: "United States"
languageCode?: string; // Alternative to languageName
locationCode?: number; // Alternative to locationName
limit?: number; // Max 1000 per request
offset?: number; // For pagination
}Returns: Complete list of keywords with rankings (position 1-100), search volume, CPC, traffic estimates, URL that ranks
Use Cases:
- Discover ALL keywords a competitor ranks for
- Find keyword gaps between your site and competitors
- Identify low-hanging fruit opportunities (high volume, low competition)
- Content strategy based on competitor success
- Estimate organic traffic for any domain
[ASYNC - DataForSEO Labs] Get comprehensive domain authority metrics and organic performance overview.
Response Time: 2-5 seconds
Cost: ~0.01 credits per request (very affordable!)
Plan Required: All plans (DataForSEO Labs)
Input:
{
target: string; // Domain to analyze (e.g., "example.com")
}Returns: Domain rank score, total organic keywords count, estimated traffic, organic cost (traffic value), visibility score
Use Cases:
- Quick domain authority assessment
- Compare domain strength across competitors
- Track domain growth over time
- Complement backlink data with authority metrics
- Evaluate potential link partners or acquisition targets
[ASYNC - DataForSEO Labs] Automatically discover competitor domains based on common keyword rankings.
Response Time: 5-12 seconds
Cost: ~0.05 credits per request (great value!)
Plan Required: All plans (DataForSEO Labs)
Input:
{
target: string; // Your domain (e.g., "yoursite.com")
languageName?: string; // Default: "English"
locationName?: string; // Default: "United States"
languageCode?: string; // Alternative to languageName
locationCode?: number; // Alternative to locationName
limit?: number; // Max 100 competitors
}Returns: List of competitor domains with common keywords count, organic keywords overlap, estimated traffic, competitive metrics
Use Cases:
- Automated competitor discovery (no manual research!)
- Identify direct and indirect competitors
- Analyze keyword overlap and competitive gaps
- Build competitive intelligence reports
- Find new market opportunities
[ASYNC - Standard Plan] Get keyword suggestions from Google Autocomplete with search volume data.
Response Time: 2-5 seconds
Cost: ~0.003 credits per request (extremely affordable!)
Plan Required: All plans
Input:
{
keyword: string; // Seed keyword for suggestions
languageName?: string; // Default: "English"
locationName?: string; // Default: "United States"
languageCode?: string; // Alternative to languageName
locationCode?: number; // Alternative to locationName
limit?: number; // Max 1000 suggestions
}Returns: Google Autocomplete suggestions with search volume, CPC, competition data
Use Cases:
- Discover long-tail keyword variations
- Understand how users actually search
- Content ideation based on user intent
- PPC campaign keyword expansion
- Voice search optimization (natural language queries)
[ASYNC - Standard Plan] Get keyword ideas using Google's internal keyword matching algorithm.
Response Time: 3-8 seconds
Cost: ~0.003 credits per request (very cheap!)
Plan Required: All plans
Input:
{
keywords: string[]; // 1-5 seed keywords
languageName?: string; // Default: "English"
locationName?: string; // Default: "United States"
languageCode?: string; // Alternative to languageName
locationCode?: number; // Alternative to locationName
limit?: number; // Max 1000 ideas
}Returns: Related keyword ideas with search volume, competition, CPC, and relevance metrics
Use Cases:
- Alternative to Related Keywords (different algorithm)
- Keyword brainstorming for content clusters
- Discover semantic keyword variations
- PPC campaign planning
- Content gap analysis
[ASYNC - Live SERP] Get real-time organic search results from Google.
Response Time: 3-8 seconds
Cost: ~0.003 credits per request
Plan Required: All plans
Input:
{
keyword: string;
languageCode?: string; // e.g., "en"
locationCode?: number; // e.g., 2840 for US
device?: "desktop" | "mobile";
depth?: number; // Number of results (default: 100)
}Returns: Rankings, URLs, titles, descriptions, SERP features (featured snippets, knowledge panels)
[ASYNC - Live SERP] Get real-time Google News results.
Response Time: 2-5 seconds
Cost: ~0.003 credits per request
Plan Required: All plans
Input:
{
keyword: string;
languageCode?: string;
locationCode?: number;
sortBy?: "relevance" | "date";
timeRange?: "all" | "1h" | "1d" | "1w" | "1m" | "1y";
}Returns: News articles with titles, sources, timestamps, snippets, thumbnails
[ASYNC - DataForSEO Labs] Get historical SERP ranking data showing how rankings changed over time.
Response Time: 5-12 seconds
Cost: ~0.05 credits per request
Plan Required: All plans (DataForSEO Labs)
Input:
{
keyword: string;
languageName?: string; // Default: "English"
locationName?: string; // Default: "United States"
languageCode?: string; // Alternative to languageName
locationCode?: number; // Alternative to locationName
dateFrom?: string; // YYYY-MM-DD (default: 30 days ago)
dateTo?: string; // YYYY-MM-DD (default: today)
}Returns: Historical ranking data showing position changes for top domains over time, SERP volatility metrics
Use Cases:
- Analyze Google algorithm update impacts
- Track seasonal ranking fluctuations
- Measure SERP volatility and stability
- Understand long-term ranking trends
- Identify ranking patterns and opportunities
[ASYNC - Backlinks Summary] Get comprehensive backlinks overview for any domain.
Response Time: 2-4 seconds
Cost: ~0.05 credits per request
Plan Required: All plans
Input:
{
target: string; // Domain or URL (e.g., "example.com")
}Returns: Total backlinks, referring domains, dofollow/nofollow ratio, gov/edu domains, domain rank, broken backlinks
[ASYNC - Detailed Backlinks] Get paginated list of individual backlinks.
Response Time: 3-8 seconds
Cost: ~0.05 credits per request
Plan Required: All plans
Input:
{
target: string;
limit?: number; // Max 1000 per request
offset?: number; // For pagination
}Returns: Source URL, anchor text, dofollow/nofollow status, domain rank, first seen date
[ASYNC - Referring Domains] Get paginated list of unique domains linking to target.
Response Time: 3-8 seconds
Cost: ~0.05 credits per request
Plan Required: All plans
Input:
{
target: string;
limit?: number; // Max 1000 per request
offset?: number; // For pagination
}Returns: Domain name, domain rank, backlinks count, dofollow/nofollow counts, first seen date
// MCP Client
const result = await client.callTool("DATAFORSEO_GET_SEARCH_VOLUME", {
keywords: ["seo tools", "keyword research"],
languageName: "English",
locationName: "United States"
});const serp = await client.callTool("DATAFORSEO_GET_ORGANIC_SERP", {
keyword: "digital marketing",
languageCode: "en",
locationCode: 2840,
depth: 10
});const backlinks = await client.callTool("DATAFORSEO_GET_BACKLINKS_OVERVIEW", {
target: "example.com"
});data-for-seo/
├── server/ # MCP server code
│ ├── main.ts # Main entry point
│ ├── constants.ts # API constants
│ ├── types/ # TypeScript types
│ │ └── env.ts # Environment & state schema
│ ├── lib/ # Client libraries
│ │ └── dataforseo.ts # DataForSEO API client
│ └── tools/ # MCP tools
│ ├── index.ts # Tools aggregator
│ ├── schemas.ts # Zod schemas
│ ├── keywords.ts # Keyword tools (2 tools)
│ ├── google-trends.ts # Google Trends & Difficulty (2 tools)
│ ├── domain-analysis.ts # Domain Analysis (3 tools)
│ ├── keyword-suggestions.ts # Keyword Suggestions (2 tools)
│ ├── serp.ts # SERP tools (3 tools)
│ └── backlinks.ts # Backlink tools (3 tools)
├── package.json
├── tsconfig.json
└── README.md
The MCP is configured through the Mesh UI with the following fields:
{
API_CREDENTIALS: {
login: string; // DataForSEO API Login
password: string; // DataForSEO API Token
}
}Important: Use the API credentials from https://app.dataforseo.com/api-access, NOT your account password!
DataForSEO has rate limits based on your subscription plan. Be aware of:
- Concurrent request limits: Typically 2-5 simultaneous requests
- Daily/monthly request quotas: Varies by plan
- Cost per API call: See individual tool documentation above
- Response times: All tools are async and take 2-10 seconds
Check your DataForSEO dashboard for current usage and limits: https://app.dataforseo.com/
When using these tools in AI workflows:
- Always use async/await: All tools return Promises and require waiting
- Handle rate limits: Don't make more than 2-3 concurrent requests
- Batch keywords: Use
GET_SEARCH_VOLUMEwith multiple keywords instead of separate calls - Use pagination: For backlinks tools, fetch data in chunks using limit/offset
- Cache results: DataForSEO data changes slowly; cache for 24-48 hours when possible
- Monitor credits: Each call consumes credits; check costs in tool descriptions
- Runtime: Bun
- MCP Framework: @decocms/runtime v1.2.5
- Build Tool: Bun native bundler
- Validation: Zod v4
- Language: TypeScript 5.7
- API: DataForSEO v3
DataForSEO uses separate API credentials for authentication, not your account email/password.
- Sign up at https://dataforseo.com
- Log in to your DataForSEO dashboard
- Get API Credentials at https://app.dataforseo.com/api-access
- You'll see your API Login (usually looks like:
your-email@example.com) - You'll see your API Password (a generated token, NOT your account password)
- You'll see your API Login (usually looks like:
- Copy both credentials and use them when configuring this MCP
If you get error 40100 (Not Authorized):
- ✅ Make sure you're using the API credentials from https://app.dataforseo.com/api-access
- ✅ Verify your API Login (email) is correct
- ✅ Use the API Password (token), NOT your account password
- ✅ Check if your DataForSEO account has sufficient credits
Private - All rights reserved