Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AIFire in da houseCheck it out free

mcp-dataforseo

MCP.Pizza Chef: Skobyn

The mcp-dataforseo is a Model Context Protocol server that interfaces with the DataForSEO API, enabling real-time, structured access to SEO-related data such as search engine results pages (SERP), keyword data, and other SEO metrics. It operates via stdio, accepting JSON requests and returning JSON responses, making it easy to integrate into AI workflows and applications that require SEO insights.

Use This MCP server To

Fetch real-time SERP data for specific keywords and locations Retrieve keyword metrics for SEO analysis and optimization Integrate SEO data into AI-driven content generation workflows Automate SEO reporting by querying DataForSEO API via MCP Combine SEO insights with LLMs for enhanced search intent understanding

README

DataForSEO MCP Server

A stdio-based Model Context Protocol (MCP) server for DataForSEO API.

Installation

You can run directly with npx:

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

Or install globally:

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

Usage

Send JSON requests to stdin and receive JSON responses from stdout:

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

Supported Request Types

SERP API

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

Keywords Data API

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

Backlinks API

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

On-Page API

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

Domain Analytics API

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

App Data API

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

Merchant API

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

Business Data API

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

Integration Example

Here's how to use this 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}`);
});

Environment Variables

You can also use environment variables instead of the config:

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

Publishing

To publish this package to npm:

  1. Login to npm if not already logged in:

    npm login
  2. Publish the package:

    npm publish --access public
  3. To update the package later:

    npm version patch
    npm publish

mcp-dataforseo FAQ

How do I configure authentication for mcp-dataforseo?
You provide your DataForSEO username and password in the --config JSON when starting the server.
What request formats does mcp-dataforseo support?
It supports JSON requests for SERP data and keyword data APIs, specifying parameters like keyword, location_code, language_code, device, and OS.
How does mcp-dataforseo communicate with clients?
It uses stdio for input/output, accepting JSON requests on stdin and returning JSON responses on stdout.
Can I use mcp-dataforseo with multiple LLM providers?
Yes, it is provider-agnostic and can be integrated with models like OpenAI, Claude, and Gemini.
Is it possible to run mcp-dataforseo without global installation?
Yes, you can run it directly using npx without installing globally.
What are the main SEO data types accessible via this MCP server?
The server provides access to SERP data and keyword data from the DataForSEO API.
How do I send a request to the mcp-dataforseo server?
Send a JSON-formatted request to stdin, for example using echo and pipe commands in a terminal.
Does mcp-dataforseo support localization in SEO queries?
Yes, you can specify location_code and language_code to tailor SEO data to specific regions and languages.