DataForSEO
Интеграция DataForSEO API с Claude! Получайте данные SERP в реальном времени, исследования ключевых слов и SEO-метрики на странице. Автоматизируйте SEO-задачи и получайте конкурентные инсайты.
DataForSEO позволяет Claude получать доступ и использовать SEO-данные из различных API DataForSEO через стандартизированный интерфейс Model Context Protocol. Эта реализация сервера предоставляет доступ к данным поисковой выдачи (SERP) в реальном времени, данным исследования ключевых слов и кликстрима, метрикам производительности on-page SEO, а также данным из внутренних баз данных и алгоритмов DataForSEO. Разработчики могут расширять его функциональность, добавляя новые инструменты и модули для поддержки дополнительных конечных точек API DataForSEO, расширяя возможности сервера для решения конкретных задач SEO-анализа и отчетности.
Ключевые особенности
Варианты использования
Model Context Protocol (MCP) server implementation for DataForSEO, enabling Claude to interact with selected DataForSEO APIs and obtain SEO data through a standardized interface.
- SERP API: real-time Search Engine Results Page (SERP) data for Google, Bing, and Yahoo;
- KEYWORDS_DATA API: keyword research and clickstream data, including search volume, cost-per-click, and other metrics;
- ONPAGE API: allows crawling websites and webpages according to customizable parameters to obtain on-page SEO performance metrics;
- DATAFORSEO_LABS API: data on keywords, SERPs, and domains based on DataForSEO's in-house databases and proprietary algorithms.
- Node.js (v14 or higher)
- DataForSEO API credentials (API login and password)
- Clone the repository:
git clone https://github.com/dataforseo/mcp-server-typescript
cd mcp-server-typescript- Install dependencies:
npm install- Set up environment variables:
# Required
export DATAFORSEO_USERNAME=your_username
export DATAFORSEO_PASSWORD=your_password
# Optional: specify which modules to enable (comma-separated)
# If not set, all modules will be enabled
export ENABLED_MODULES="SERP,KEYWORDS_DATA,ONPAGE,DATAFORSEO_LABS,BACKLINKS,BUSINESS_DATA,DOMAIN_ANALYTICS"
# Optional: enable full API responses
# If not set or set to false, the server will filter and transform API responses to a more concise format
# If set to true, the server will return the full, unmodified API responses
export DATAFORSEO_FULL_RESPONSE="false"You can install the package globally:
npm install -g dataforseo-mcp-serverOr run it directly without installation:
npx dataforseo-mcp-serverRemember to set environment variables before running the command:
# Required environment variables
export DATAFORSEO_USERNAME=your_username
export DATAFORSEO_PASSWORD=your_password
# Run with npx
npx dataforseo-mcp-serverBuild the project:
npm run buildRun the server:
npm startThe following modules are available to be enabled/disabled:
SERP: real-time SERP data for Google, Bing, and Yahoo;KEYWORDS_DATA: keyword research and clickstream data;ONPAGE: crawl websites and webpages to obtain on-page SEO performance metrics;DATAFORSEO_LABS: data on keywords, SERPs, and domains based on DataForSEO's databases and algorithms;BACKLINKS: data on inbound links, referring domains and referring pages for any domain, subdomain, or webpage;BUSINESS_DATA: based on business reviews and business information publicly shared on the following platforms: Google, Trustpilot, Tripadvisor;DOMAIN_ANALYTICS: helps identify all possible technologies used for building websites and offers Whois data;
Each module corresponds to a specific DataForSEO API:
SERPmodule → SERP APIKEYWORDS_DATAmodule → Keywords Data APIONPAGEmodule → OnPage APIDATAFORSEO_LABSmodule → DataForSEO Labs APIBACKLINKS: module → Backlinks APIBUSINESS_DATA: module → Business Data APIDOMAIN_ANALYTICS: module → Domain Analytics API
You can either:
- Add a new tool to an existing module
- Create a completely new module
Here's how to add a new tool to any new or pre-existing module:
// src/modules/your-module/tools/your-tool.tool.ts
import { BaseTool } from '../../base.tool';
import { DataForSEOClient } from '../../../client/dataforseo.client';
import { z } from 'zod';
export class YourTool extends BaseTool {
constructor(private client: DataForSEOClient) {
super(client);
// DataForSEO API returns extensive data with many fields, which can be overwhelming
// for AI agents to process. We select only the most relevant fields to ensure
// efficient and focused responses.
this.fields = [
'title', // Example: Include the title field
'description', // Example: Include the description field
'url', // Example: Include the URL field
// Add more fields as needed
];
}
getName() {
return 'your-tool-name';
}
getDescription() {
return 'Description of what your tool does';
}
getParams(): z.ZodRawShape {
return {
// Required parameters
keyword: z.string().describe('The keyword to search for'),
location: z.string().describe('Location in format "City,Region,Country" or just "Country"'),
// Optional parameters
fields: z.array(z.string()).optional().describe('Specific fields to return in the response. If not specified, all fields will be returned'),
language: z.string().optional().describe('Language code (e.g., "en")'),
};
}
async handle(params: any) {
try {
// Make the API call
const response = await this.client.makeRequest({
endpoint: '/v3/dataforseo_endpoint_path',
method: 'POST',
body: [{
// Your request parameters
keyword: params.keyword,
location: params.location,
language: params.language,
}],
});
// Validate the response for errors
this.validateResponse(response);
//if the main data array is specified in tasks[0].result[:] field
const result = this.handleDirectResult(response);
//if main data array specified in tasks[0].result[0].items field
const result = this.handleItemsResult(response);
// Format and return the response
return this.formatResponse(result);
} catch (error) {
// Handle and format any errors
return this.formatErrorResponse(error);
}
}
}- Create a new directory under
src/modules/for your module:
mkdir -p src/modules/your-module-name- Create module files:
// src/modules/your-module-name/your-module-name.module.ts
import { BaseModule } from '../base.module';
import { DataForSEOClient } from '../../client/dataforseo.client';
import { YourTool } from './tools/your-tool.tool';
export class YourModuleNameModule extends BaseModule {
constructor(private client: DataForSEOClient) {
super();
}
getTools() {
return {
'your-tool-name': new YourTool(this.client),
};
}
}- Register your module in
src/config/modules.config.ts:
export const AVAILABLE_MODULES = [
'SERP',
'KEYWORDS_DATA',
'ONPAGE',
'DATAFORSEO_LABS',
'YOUR_MODULE_NAME' // Add your module name here
] as const;- Initialize your module in
src/index.ts:
if (isModuleEnabled('YOUR_MODULE_NAME', enabledModules)) {
modules.push(new YourModuleNameModule(dataForSEOClient));
}We're always looking to expand the capabilities of this MCP server. If you have specific DataForSEO endpoints or APIs you'd like to see supported, please:
- Check the DataForSEO API Documentation to see what's available
- Open an issue in our GitHub repository with:
- The API/endpoint you'd like to see supported;
- A brief description of your use case;
- Describe any specific features you'd like to see implemented.
Your feedback helps us prioritize which APIs to support next!
MCP-сервер DataForSEO
Реализация протокола Model Context Protocol (MCP) для API DataForSEO. Сервер позволяет ИИ-агентам (например, Claude) получать SEO-данные через унифицированный интерфейс: результаты поиска, данные по ключевым словам, информацию об обратных ссылках, аналитику доменов и многое другое.
Возможности
- SERP API — данные со страниц результатов поиска Google, Bing и Yahoo в реальном времени.
- KEYWORDS_DATA API — исследование ключевых слов и кликстрим-данные: объём поиска, цена за клик (CPC) и другие метрики.
- ONPAGE API — гибкий краулинг сайтов и страниц для получения метрик SEO-производительности.
- DATAFORSEO_LABS API — данные по ключевым словам, SERP и доменам на основе собственных баз DataForSEO.
- BACKLINKS API — данные об обратных ссылках, ссылающихся доменах и страницах.
- BUSINESS_DATA API — бизнес-отзывы и информация с Google, Trustpilot и Tripadvisor.
- DOMAIN_ANALYTICS API — определение технологического стека сайтов и данные Whois.
Требования
- Node.js v14 или выше
- Учётные данные DataForSEO (логин и пароль API)
Установка
Клонирование репозитория
git clone https://github.com/dataforseo/mcp-server-typescript
cd mcp-server-typescript
npm install
Установка как глобального NPM-пакета
npm install -g dataforseo-mcp-server
Либо запускайте без установки через npx:
npx dataforseo-mcp-server
Конфигурация
Перед запуском обязательно задайте переменные окружения:
DATAFORSEO_USERNAME— ваш логин (обязательно)DATAFORSEO_PASSWORD— ваш пароль (обязательно)ENABLED_MODULES— список модулей через запятую. Если не задано, включены все. Пример:
export ENABLED_MODULES="SERP,KEYWORDS_DATA,ONPAGE,DATAFORSEO_LABS,BACKLINKS,BUSINESS_DATA,DOMAIN_ANALYTICS"
DATAFORSEO_FULL_RESPONSE— еслиtrue, сервер возвращает полный нефильтрованный ответ API. По умолчанию ответы сокращаются для удобства ИИ-агентов.
Запуск
npm run build
npm start
Доступные модули
| Модуль | Описание |
|---|---|
| SERP | Результаты поиска Google, Bing, Yahoo |
| KEYWORDS_DATA | Исследование ключевых слов и кликстрим |
| ONPAGE | Краулинг и анализ on-page SEO |
| DATAFORSEO_LABS | Расширенные данные об关键词, SERP и доменах |
| BACKLINKS | Обратные ссылки, рефереры |
| BUSINESS_DATA | Бизнес-отзывы и информация (Google, Trustpilot, Tripadvisor) |
| DOMAIN_ANALYTICS | Технологический стек и Whois |
Расширение функциональности
Вы можете добавлять свои инструменты и модули. Вот минимальная структура:
1. Создание инструмента
Создайте файл src/modules/your-module/tools/your-tool.tool.ts:
import { BaseTool } from '../../base.tool';
import { DataForSEOClient } from '../../../client/dataforseo.client';
import { z } from 'zod';
export class YourTool extends BaseTool {
constructor(private client: DataForSEOClient) {
super(client);
this.fields = ['title', 'description', 'url']; // поля, которые вернутся
}
getName() { return 'your-tool-name'; }
getDescription() { return 'Описание инструмента'; }
getParams(): z.ZodRawShape {
return {
keyword: z.string().describe('Ключевое слово'),
location: z.string().describe('Локация'),
};
}
async handle(params: any) {
const response = await this.client.makeRequest({
endpoint: '/v3/dataforseo_endpoint_path',
method: 'POST',
body: [{ keyword: params.keyword, location: params.location }],
});
this.validateResponse(response);
const result = this.handleDirectResult(response); // или handleItemsResult
return this.formatResponse(result);
}
}
2. Регистрация модуля
Создайте src/modules/your-module-name/your-module-name.module.ts и зарегистрируйте его в src/config/modules.config.ts и src/index.ts. Подробные примеры смотрите в репозитории.
Обратная связь по новым API
Если вам не хватает какого-либо эндпоинта DataForSEO, создайте issue на GitHub с описанием use case. Это поможет приоритизировать разработку.
Полезные ссылки
Как установить и настроить сервер DataForSEO MCP?
Вам понадобятся Node.js и учетные данные API DataForSEO. Клонируйте репозиторий, установите зависимости, задайте переменные окружения для имени пользователя и пароля, затем соберите и запустите сервер.
Могу ли я расширить сервер новыми конечными точками API DataForSEO?
Да, вы можете добавлять новые инструменты в существующие модули или создавать совершенно новые модули для поддержки дополнительных конечных точек API DataForSEO, следуя предоставленным инструкциям и примерам кода.
Какие SEO-данные я могу получить с помощью этого инструмента?
Вы можете получать данные SERP в реальном времени, данные по исследованию ключевых слов и кликстрим, показатели эффективности SEO на странице, а также данные из баз данных DataForSEO.
Что такое сервер DataForSEO MCP?
Это сервер протокола контекста модели (MCP), который позволяет Claude взаимодействовать с API DataForSEO для SEO-данных, предоставляя стандартизированный интерфейс для бесшовной интеграции.
Какие API DataForSEO сейчас поддерживаются?
Сервер поддерживает API SERP, Keywords Data, OnPage, DataForSEO Labs, Backlinks, Business Data и Domain Analytics.
Serp Organic Live Advanced
Get organic search results for a keyword in specified search engine
Parameters
8Serp Locations
Utility tool for serp_organic_live_advanced to get list of availible locations.
Parameters
4Serp Youtube Locations
Utility tool to get list of available locations for: serp_youtube_organic_live_advanced, serp_youtube_video_info_live_advanced, serp_youtube_video_comments_live_advanced, serp_youtube_video_subtitles_...
Parameters
3Serp Youtube Organic Live Advanced
provides top 20 blocks of youtube search engine results for a keyword
Parameters
6Serp Youtube Video Info Live Advanced
provides data on the video you specify
Parameters
5Serp Youtube Video Comments Live Advanced
provides data on the video comments you specify
Parameters
6Serp Youtube Video Subtitles Live Advanced
provides data on the video subtitles you specify
Parameters
7Keywords Data Google Ads Search Volume
Get search volume data for keywords from Google Ads
Parameters
3Keywords Data Dataforseo Trends Demography
This endpoint will provide you with the demographic breakdown (by age and gender) of keyword popularity per each specified term based on DataForSEO Trends data
Parameters
6Keywords Data Dataforseo Trends Subregion Interests
This endpoint will provide you with location-specific keyword popularity data from DataForSEO Trends
Parameters
6Keywords Data Dataforseo Trends Explore
This endpoint will provide you with the keyword popularity data from DataForSEO Trends. You can check keyword trends for Google Search, Google News, and Google Shopping
Parameters
6Keywords Data Google Trends Categories
This endpoint will provide you list of Google Trends Categories
Keywords Data Google Trends Explore
This endpoint will provide you with the keyword popularity data from the ‘Explore’ feature of Google Trends. You can check keyword trends for Google Search, Google News, Google Images, Google Shopping...
Parameters
9On Page Content Parsing
This endpoint allows parsing the content on any page you specify and will return the structured content of the target page, including link URLs, anchors, headings, and textual content.
Parameters
5On Page Instant Pages
Using this function you will get page-specific data with detailed information on how well a particular page is optimized for organic search
Parameters
5On Page Lighthouse
The OnPage Lighthouse API is based on Google’s open-source Lighthouse project for measuring the quality of web pages and web apps.
Parameters
5Dataforseo Labs Google Ranked Keywords
This endpoint will provide you with the list of keywords that any domain or webpage is ranking for. You will also get SERP elements related to the keyword position, as well as impressions, monthly sea...
Parameters
9Dataforseo Labs Google Competitors Domain
This endpoint will provide you with a full overview of ranking and traffic data of the competitor domains from organic and paid search. In addition to that, you will get the metrics specific to the ke...
Parameters
10Dataforseo Labs Google Domain Rank Overview
This endpoint will provide you with ranking and traffic data from organic and paid search for the specified domain. You will be able to review the domain ranking distribution in SERPs as well as estim...
Parameters
4Dataforseo Labs Google Keyword Ideas
The Keyword Ideas provides search terms that are relevant to the product or service categories of the specified keywords. The algorithm selects the keywords which fall into the same categories as the ...
Parameters
8Dataforseo Labs Google Related Keywords
The Related Keywords endpoint provides keywords appearing in the "searches related to" SERP element You can get up to 4680 keyword ideas by specifying the search depth. Each related keyword comes wit...
Parameters
9Dataforseo Labs Google Keyword Suggestions
The Keyword Suggestions provides search queries that include the specified seed keyword. The algorithm is based on the full-text search for the specified keyword and therefore returns only those sear...
Parameters
8Dataforseo Labs Google Historical Serp
This endpoint will provide you with Google SERPs collected within the specified time frame. You will also receive a complete overview of featured snippets and other extra elements that were present wi...
Parameters
3Dataforseo Labs Google Serp Competitors
This endpoint will provide you with a list of domains ranking for the keywords you specify. You will also get SERP rankings, rating, estimated traffic volume, and visibility values the provided domain...
Parameters
8Dataforseo Labs Bulk Keyword Difficulty
This endpoint will provide you with the Keyword Difficulty metric for a maximum of 1,000 keywords in one API request. Keyword Difficulty stands for the relative difficulty of ranking in the first top-...
Parameters
3Dataforseo Labs Google Subdomains
This endpoint will provide you with a list of subdomains of the specified domain, along with the ranking distribution across organic and paid search. In addition to that, you will also get the estimat...
Parameters
10Dataforseo Labs Google Keyword Overview
This endpoint provides Google keyword data for specified keywords. For each keyword, you will receive current cost-per-click, competition values for paid search, search volume, search intent, monthly ...
Parameters
4Dataforseo Labs Google Top Searches
The Top Searches endpoint of DataForSEO Labs API can provide you with over 7 billion keywords from the DataForSEO Keyword Database. Each keyword in the API response is provided with a set of relevant ...
Parameters
7Dataforseo Labs Search Intent
This endpoint will provide you with search intent data for up to 1,000 keywords. For each keyword that you specify when setting a task, the API will return the keyword's search intent and intent proba...
Parameters
2Dataforseo Labs Google Keywords For Site
The Keywords For Site endpoint will provide you with a list of keywords relevant to the target domain. Each keyword is supplied with relevant, search volume data for the last month, cost-per-click, co...
Parameters
9Dataforseo Labs Google Domain Intersection
This endpoint will provide you with the keywords for which both specified domains rank within the same SERP. You will get search volume, competition, cost-per-click and impressions data on each inters...
Parameters
11Dataforseo Labs Google Historical Rank Overview
This endpoint will provide you with historical data on rankings and traffic of the specified domain, such as domain ranking distribution in SERPs and estimated monthly traffic volume for both organic ...
Parameters
5Dataforseo Labs Google Page Intersection
This endpoint will provide you with the keywords for which specified pages rank within the same SERP. You will get search volume, competition, cost-per-click and impressions data on each intersecting ...
Parameters
11Dataforseo Labs Bulk Traffic Estimation
This endpoint will provide you with estimated monthly traffic volumes for up to 1,000 domains, subdomains, or webpages. Along with organic search traffic estimations, you will also get separate values...
Parameters
4Dataforseo Labs Available Filters
Here you will find all the necessary information about filters that can be used with DataForSEO Labs API endpoints. Please, keep in mind that filters are associated with a certain object in the resul...
Parameters
1Dataforseo Labs Google Historical Keyword Data
This endpoint provides Google historical keyword data for specified keywords, including search volume, cost-per-click, competition values for paid search, monthly searches, and search volume trends. Y...
Parameters
3Dataforseo Labs Google Relevant Pages
This endpoint will provide you with rankings and traffic data for the web pages of the specified domain. You will be able to review each page’s ranking distribution and estimated monthly traffic volum...
Parameters
11Backlinks Backlinks
This endpoint will provide you with a list of backlinks and relevant data for the specified domain, subdomain, or webpage
Parameters
6Backlinks Anchors
This endpoint will provide you with a detailed overview of anchors used when linking to the specified website with relevant backlink data for each of them
Parameters
5Backlinks Bulk Backlinks
This endpoint will provide you with the number of backlinks pointing to domains, subdomains, and pages specified in the targets array. The returned numbers correspond to all live backlinks, that is, t...
Parameters
1Backlinks Bulk New Lost Referring Domains
This endpoint will provide you with the number of referring domains pointing to the domains, subdomains and pages specified in the targets array. Note that if you indicate a domain as a target, you wi...
Parameters
2Backlinks Bulk New Lost Backlinks
This endpoint will provide you with the number of referring domains pointing to domains, subdomains, and pages specified in the targets array. The returned numbers are based on all live referring doma...
Parameters
2Backlinks Bulk Ranks
This endpoint will provide you with rank scores of the domains, subdomains, and pages specified in the targets array. The score is based on the number of referring domains pointing to the specified do...
Parameters
2Backlinks Bulk Referring Domains
This endpoint will provide you with the number of referring domains pointing to domains, subdomains, and pages specified in the targets array. The returned numbers are based on all live referring doma...
Parameters
1Backlinks Bulk Spam Score
This endpoint will provide you with spam scores of the domains, subdomains, and pages you specified in the targets array. Spam Score is DataForSEO’s proprietary metric that indicates how “spammy” your...
Parameters
1Backlinks Competitors
This endpoint will provide you with a list of competitors that share some part of the backlink profile with a target website, along with a number of backlink intersections and the rank of every compet...
Parameters
8Backlinks Domain Intersection
This endpoint will provide you with the list of domains pointing to the specified websites. This endpoint is especially useful for creating a Link Gap feature that shows what domains link to your comp...
Parameters
5Backlinks Domain Pages Summary
This endpoint will provide you with detailed summary data on all backlinks and related metrics for each page of the target domain or subdomain you specify. If you indicate a single page as a target, y...
Parameters
5Backlinks Domain Pages
This endpoint will provide you with a detailed overview of domain pages with backlink data for each page
Parameters
5Backlinks Page Intersection
This endpoint will provide you with the list of domains pointing to the specified websites. This endpoint is especially useful for creating a Link Gap feature that shows what domains link to your comp...
Parameters
5Backlinks Referring Domains
This endpoint will provide you with a detailed overview of referring domains pointing to the target you specify
Parameters
5Backlinks Referring Networks
This endpoint will provide you with a detailed overview of referring domains pointing to the target you specify
Parameters
6Backlinks Summary
This endpoint will provide you with an overview of backlinks data available for a given domain, subdomain, or webpage
Parameters
3Backlinks Timeseries New Lost Summary
This endpoint will provide you with the number of new and lost backlinks and referring domains for the domain specified in the target field. The results will be provided for a period between the two i...
Parameters
4Backlinks Timeseries Summary
This endpoint will provide you with an overview of backlink data for the target domain available during a period between the two indicated dates. Backlink metrics will be grouped by the time range tha...
Parameters
4Backlinks Bulk Pages Summary
This endpoint will provide you with a comprehensive overview of backlinks and related data for a bulk of up to 1000 pages, domains, or subdomains. If you indicate a single page as a target, you will g...
Parameters
2Backlinks Available Filters
Here you will find all the necessary information about filters that can be used with DataForSEO Backlinks API endpoints. Please, keep in mind that filters are associated with a certain object in the ...
Parameters
1Business Data Business Listings Search
Business Listings Search API provides results containing information about business entities listed on Google Maps in the specified categories. You will receive the address, contacts, rating, working ...
Parameters
9Domain Analytics Whois Overview
This endpoint will provide you with Whois data enriched with backlink stats, and ranking and traffic info from organic and paid search results. Using this endpoint you will be able to get all these da...
Parameters
5Domain Analytics Whois Available Filters
Here you will find all the necessary information about filters that can be used with DataForSEO WHOIS API endpoints. Please, keep in mind that filters are associated with a certain object in the resu...
Parameters
1Domain Analytics Technologies Domain Technologies
Using this endpoint you will get a list of technologies used in a particular domain
Parameters
1Domain Analytics Technologies Available Filters
Here you will find all the necessary information about filters that can be used with DataForSEO Technologies API endpoints. Please, keep in mind that filters are associated with a certain object in t...
Комментарии
Комментариев пока нет. Будьте первым.