SEO Tools MCP Server
SEO 工具 MCP 服务器
一个用于 SEO API 的综合 stdio MCP(模型上下文协议)服务器。该服务器允许 LLM(大语言模型)与 DataForSEO API 功能及其他 SEO 工具进行交互。
概述
SEO 工具 MCP 服务器实现了 Claude 等 LLM 与各种 SEO API 之间的无缝集成,使得通过自然语言交互直接执行 SEO 分析、关键词研究、反向链接分析以及许多其他 SEO 相关任务成为可能。
此实现将所有主要的 DataForSEO API 端点公开为 MCP 工具,LLM 可以调用这些工具来检索特定的 SEO 数据。该服务器使用 stdio 作为其传输层,使其易于与各种 LLM 平台集成。
Related MCP server: DataForSEO MCP Server
功能
全面覆盖 DataForSEO API 端点
可选集成 Local Falcon 和其他第三方 SEO 工具
用于轻松集成的 stdio 传输
身份验证处理
详细的错误报告
带有 Zod 模式的类型安全工具定义
用于添加新 API 集成的可扩展架构
通过环境变量进行模块和工具的选择性过滤
注册 Data for Seo
https://dataforseo.com/?aff=200885
已实现的 API 类别
DataForSEO API
SERP API - 来自 Google、Bing、Yahoo 等的搜索引擎结果数据
Keywords Data API - 关键词研究、建议和搜索量数据
DataForSEO Labs API - 高级 SEO 分析、域名比较和关键词分析
Backlinks API - 反向链接概况、引荐域名和锚文本分析
OnPage API - 网站审计、内容分析和技术 SEO 检查
Domain Analytics API - 技术栈检测和域名数据分析
Content Analysis API - 内容质量评估和语义分析
Content Generation API - AI 驱动的内容生成工具
Merchant API - 来自 Amazon 和 Google Shopping 的电子商务数据
App Data API - 来自 Google Play 和 App Store 的移动应用数据
Business Data API - 来自 Google My Business、Trustpilot 等的商家列表数据
AI Optimization API - 来自 ChatGPT、Claude、Gemini 和 Perplexity 的 LLM 响应、AI 抓取器和 AI 关键词数据
Local Falcon API (可选)
Calculate Grid Points - 生成用于本地排名分析的网格坐标
Search GMB Locations - 按查询查找 Google My Business 地点
Get Ranking at Coordinate - 检查特定坐标处的商家排名
Keyword Search at Coordinate - 在特定地点测试搜索词
Run Grid Search - 执行完整的基于网格的本地排名分析
安装
# Clone the repository
git clone https://github.com/Skobyn/dataforseo-mcp-server.git
# Change to the project directory
cd dataforseo-mcp-server
# Install dependencies
npm install
# Build the project
npm run build使用
要使用此 MCP 服务器,您需要为您想要使用的服务提供 API 凭据。
使用 DataForSEO 运行服务器
# Set environment variables for DataForSEO authentication
export DATAFORSEO_LOGIN="your_login"
export DATAFORSEO_PASSWORD="your_password"
# Run the server
npm start使用 DataForSEO 和 Local Falcon 运行服务器
# Set environment variables for all API authentications
export DATAFORSEO_LOGIN="your_login"
export DATAFORSEO_PASSWORD="your_password"
export LOCALFALCON_API_KEY="your_localfalcon_api_key"
# Optional: Set custom Local Falcon API URL if needed
# export LOCALFALCON_API_URL="https://custom-localfalcon-url.com/api"
# Run the server
npm start过滤模块和工具
服务器默认公开数百个工具。当与 LLM 一起使用时,完整的工具列表会占用大量的上下文窗口空间。您可以使用环境变量来减少公开的工具数量,仅启用您需要的模块或工具。
为什么要过滤?
减少上下文使用
LLM 更快地发现工具
响应更具针对性
按模块过滤
使用 ENABLED_MODULES 仅启用特定的 API 类别(逗号分隔,不区分大小写):
export ENABLED_MODULES="SERP,BUSINESS_DATA,LABS"可用模块:
SERP- 搜索引擎结果KEYWORDS_DATA- 关键词研究LABS或DATAFORSEO_LABS- 高级 SEO 分析BACKLINKS- 反向链接分析ONPAGE- 网站审计DOMAIN_ANALYTICS- 域名数据CONTENT_ANALYSIS- 内容评估CONTENT_GENERATION- AI 内容生成MERCHANT- 电子商务数据APP_DATA- 移动应用数据BUSINESS_DATA- 商家列表AI_OPTIMIZATION- LLM 响应和 AI 数据
按单个工具过滤
使用 ENABLED_TOOLS 对特定工具进行细粒度控制(逗号分隔,不区分大小写):
export ENABLED_TOOLS="serp_google_maps_live,business_data_google_my_business_info"如果未设置任何变量,则默认启用所有模块和工具。
模块范围的订阅和 404 错误
DataForSEO 的访问权限通常是按模块授予的,而不是作为单一的“全有或全无”订阅。这意味着某些端点可能有效,而其他端点则返回 404。
重要的解释规则:
在已知的实时端点(如
SERP、App Data、DataForSEO Labs App Store或Content Generation)上出现404可能意味着该模块未针对当前账户启用这不一定是 MCP 服务器中的错误或错误的端点路径
即使在同一大类中付费实时端点不可用时,免费的发现端点(如地点或语言)可能仍然有效
服务器现在将已知的模块范围 404 响应规范化为更清晰的消息:
DataForSEO module not enabled: <module> ...
发生这种情况时,请在 DataForSEO 仪表板中启用该模块,或切换到当前账户已启用的模块中的工具。
与 Claude 或其他 LLM 一起使用
此服务器实现了模型上下文协议,允许 LLM 以标准化的方式与外部系统进行交互。要将其与 Claude 一起使用,您需要根据其特定的 MCP 实现将其与您的 LLM 平台集成。
有关使用示例,请参阅 examples 目录。
开发
# Run in development mode with hot reloading
npm run dev
# Run tests
npm test示例
查看 examples 目录以获取展示如何使用 SEO 工具 MCP 服务器的示例代码。
基本示例演示了:
启动服务器
从客户端连接到它
调用不同的 API 端点
处理结果
可用工具
服务器在所有集成的 API 类别中公开了数百个工具。以下是一些最常用工具的示例:
DataForSEO SERP API 工具
serp_google_organic_live- 获取 Google 自然搜索结果serp_google_organic_task_post- 创建 Google 自然搜索任务serp_google_maps_live- 获取 Google 地图搜索结果
DataForSEO Keywords Data 工具
keywords_google_ads_search_volume- 获取关键词的搜索量keywords_google_ads_keywords_for_site- 获取域名的关键词建议keywords_google_trends_explore- 探索关键词随时间变化的趋势
DataForSEO Labs 工具
labs_google_keyword_ideas- 基于种子关键词获取关键词建议labs_google_related_keywords- 获取相关关键词labs_google_domain_rank_overview- 获取域名排名概览
DataForSEO Backlinks 工具
backlinks_summary- 获取域名的反向链接概况摘要backlinks_backlinks- 获取域名的反向链接列表backlinks_referring_domains- 获取目标的引荐域名backlinks_history- 获取目标的历史反向链接数据backlinks_timeseries_summary- 获取反向链接的时间序列数据backlinks_bulk_new_lost_backlinks- 获取多个目标的新增和丢失反向链接backlinks_bulk_new_lost_referring_domains- 获取多个目标的新增和丢失引荐域名backlinks_bulk_pages_summary- 获取多个目标的页面摘要
DataForSEO AI Optimization 工具
ai_chatgpt_models- 获取可用 ChatGPT 模型列表ai_chatgpt_llm_responses_live- 获取来自 ChatGPT 的实时响应ai_chatgpt_scraper_locations- 获取 ChatGPT 抓取器的可用地点ai_chatgpt_scraper_languages- 获取 ChatGPT 抓取器的可用语言ai_claude_models- 获取可用 Claude 模型列表ai_claude_llm_responses_live- 获取来自 Claude 的实时响应ai_gemini_models- 获取可用 Gemini 模型列表ai_gemini_llm_responses_live- 获取来自 Gemini 的实时响应ai_perplexity_models- 获取可用 Perplexity 模型列表ai_perplexity_llm_responses_live- 获取来自 Perplexity 的实时响应ai_keyword_data_search_volume_live- 获取 AI 关键词搜索量数据ai_keyword_data_locations_and_languages- 获取 AI 关键词数据的可用地点和语言
Local Falcon 工具(如果已配置)
localfalcon_calculate_grid_points- 计算基准坐标周围的网格点localfalcon_search_gmb_locations- 搜索 Google My Business 地点localfalcon_get_ranking_at_coordinate- 获取特定坐标处的商家排名localfalcon_keyword_search_at_coordinate- 在特定地点搜索关键词localfalcon_run_grid_search- 运行本地排名的完整网格搜索
完整工具列表
有关所有可用工具及其参数的完整列表,请查看 src/api 目录中的实现。
扩展服务器
该服务器旨在实现可扩展性。要添加对其他 SEO API 的支持:
在
src/api/中为您的集成创建一个新目录实现客户端处理和工具注册
将您的集成添加到
src/index.ts添加用于身份验证的环境变量处理
有关模板,请参阅 src/api/localfalcon/ 中的 Local Falcon 集成。
许可证
MIT
Available Tools
146 toolsapp_data_app_store_app_infoD
Inputs: app_id (required), language_code, language_name, location_code, +1 more.
app_data_app_store_languagesD
Inputs: no named parameters.
app_data_app_store_locationsD
Inputs: country.
app_data_app_store_reviewsD
Inputs: app_id (required), depth, language_code, language_name, +5 more.
app_data_app_store_searchD
Inputs: keyword (required), depth, language_code, language_name, +4 more.
app_data_google_play_app_infoD
Inputs: app_id (required), language_code, language_name, location_code, +1 more.
app_data_google_play_languagesD
Inputs: no named parameters.
app_data_google_play_locationsD
Inputs: country.
app_data_google_play_reviewsD
Inputs: app_id (required), depth, language_code, language_name, +5 more.
app_data_google_play_searchD
Inputs: keyword (required), depth, language_code, language_name, +4 more.
backlinks_anchorsD
Inputs: target (required), filters, limit, offset.
backlinks_backlinksD
Inputs: target (required), filters, limit, mode, +1 more.
backlinks_bulk_backlinksD
Inputs: targets (required), internal_list_limit, limit, offset.
backlinks_bulk_ranksD
Inputs: targets (required).
backlinks_bulk_referring_domainsD
Inputs: targets (required), internal_list_limit, limit, offset.
backlinks_bulk_spam_scoreD
Inputs: targets (required).
backlinks_competitorsD
Inputs: target (required), filters, limit, offset.
backlinks_domain_intersectionD
Inputs: targets (required), exclude_targets, limit, offset.
backlinks_domain_pagesD
Inputs: target (required), filters, limit, offset.
backlinks_domain_pages_summaryD
Inputs: target (required), filters, limit, offset.
backlinks_errorsD
Inputs: no named parameters.
backlinks_indexD
Inputs: no named parameters.
backlinks_page_intersectionD
Inputs: targets (required), exclude_targets, limit, offset.
backlinks_referring_domainsD
Inputs: target (required), filters, limit, offset.
backlinks_referring_networksD
Inputs: target (required), filters, limit, offset.
backlinks_summaryD
Inputs: target (required), filters, limit, offset.
backlinks_timeseries_new_lost_summaryD
Inputs: date_from (required), date_to (required), target (required), filters, +2 more.
business_data_business_listings_categoriesD
Inputs: country.
business_data_business_listings_locationsD
Inputs: country.
business_data_business_listings_searchD
Inputs: keyword (required), depth, language_code, language_name, +4 more.
business_data_facebook_overviewD
Inputs: id (required), language_code, language_name.
business_data_facebook_searchD
Inputs: keyword (required), depth, limit, location_name, +1 more.
business_data_google_hotels_infoD
Inputs: hotel_id (required), check_in, check_out, currency, +5 more.
business_data_google_hotels_reviewsD
Inputs: hotel_id (required), depth, language_code, language_name, +2 more.
business_data_google_hotels_searchD
Inputs: keyword (required), check_in, check_out, currency, +8 more.
business_data_google_languagesD
Inputs: no named parameters.
business_data_google_locationsD
Inputs: country.
business_data_google_my_business_infoD
Inputs: keyword (required), language_code, language_name, location_code, +1 more.
business_data_google_reviewsD
Inputs: depth, keyword, language_code, language_name, +2 more.
business_data_pinterest_infoD
Inputs: url (required), language_code, language_name.
business_data_pinterest_searchD
Inputs: keyword (required), depth, limit, offset.
business_data_reddit_infoD
Inputs: url (required), language_code, language_name.
business_data_reddit_searchD
Inputs: keyword (required), depth, limit, offset, +2 more.
business_data_tripadvisor_reviewsD
Inputs: location_id (required), depth, language_code, language_name, +2 more.
business_data_tripadvisor_searchD
Inputs: keyword (required), depth, limit, location_name, +2 more.
business_data_trustpilot_reviewsD
Inputs: domain (required), depth, language_code, language_name, +3 more.
business_data_trustpilot_searchD
Inputs: keyword (required), depth, language_code, language_name, +3 more.
content_analysis_categoryD
Inputs: url (required), language_code, language_name.
content_analysis_rating_distributionD
Inputs: rating_values (required), algo.
content_analysis_searchD
Inputs: query (required), calculate_adult_score, calculate_information_score, calculate_keyword_density, +8 more.
content_analysis_sentiment_analysisD
Inputs: text (required), language_code, language_name.
content_analysis_summaryD
Inputs: url (required), calculate_adult_score, calculate_information_score, calculate_keyword_density, +5 more.
content_generation_explain_codeD
Inputs: code (required), code_language, explanation_type, language_code, +1 more.
content_generation_meta_tagsD
Inputs: creative_level, language_code, language_name, text, +1 more.
content_generation_paraphraseD
Inputs: text (required), creative_level, language_code, language_name, +1 more.
content_generation_summarizeD
Inputs: language_code, language_name, summary_size, text, +1 more.
content_generation_textD
Inputs: topic (required), creative_level, language_code, language_name, +5 more.
content_generation_titleD
Inputs: creative_level, language_code, language_name, text, +1 more.
domain_analytics_technologies_domains_by_html_termsD
Inputs: terms (required), intersection_mode, limit, offset.
domain_analytics_technologies_domains_by_technologyD
Inputs: technology_name (required), category, limit, offset, +1 more.
domain_analytics_technologies_domain_technologiesD
Inputs: target (required), limit, offset.
domain_analytics_technologies_summaryD
Inputs: category, technology_group, technology_name.
domain_analytics_technologies_technologiesD
Inputs: category, technology_group, technology_name.
domain_analytics_technologies_technology_statsD
Inputs: technology_name (required), limit, offset.
domain_analytics_whois_overviewD
Inputs: domain (required).
keywords_bing_keywords_for_keywordsD
Inputs: keyword (required), language_code, location_code.
keywords_google_ads_categoriesD
Inputs: no named parameters.
keywords_google_ads_keywords_for_keywordD
Inputs: keyword (required), language_code, location_code.
keywords_google_ads_keywords_for_siteD
Inputs: target (required), language_code, location_code.
keywords_google_ads_languagesD
Inputs: no named parameters.
keywords_google_ads_locationsD
Inputs: country.
keywords_google_ads_search_volumeD
Inputs: keywords (required), language_code, location_code.
keywords_google_trends_exploreD
Inputs: keywords (required), category_code, date_from, date_to, +2 more.
labs_amazon_bulk_search_volumeD
Inputs: keywords (required), language_code, location_code.
labs_amazon_product_competitorsD
Inputs: asin (required), language_code, limit, location_code, +2 more.
labs_amazon_ranked_keywordsD
Inputs: target (required), filters, language_code, limit, +3 more.
labs_app_store_app_competitorsD
Inputs: app_id (required), language_code, limit, location_code, +1 more.
labs_app_store_keywords_for_appD
Inputs: app_id (required), language_code, limit, location_code, +1 more.
labs_app_store_ranked_appsD
Inputs: keyword (required), filters, include_seed_keyword, language_code, +3 more.
labs_available_historyD
Inputs: engine (required), function (required).
labs_bing_competitors_domainD
Inputs: target (required), filters, language_code, limit, +2 more.
labs_bing_domain_rank_overviewD
Inputs: target (required), language_code, limit, location_code, +1 more.
labs_bing_keywords_for_siteD
Inputs: target (required), include_serp_info, language_code, limit, +2 more.
labs_bing_ranked_keywordsD
Inputs: target (required), filters, include_serp_info, language_code, +3 more.
labs_categoriesD
Inputs: engine (required), category_code, language_code.
labs_google_bulk_keyword_difficultyD
Inputs: keywords (required), language_code, location_code.
labs_google_bulk_traffic_estimationD
Inputs: targets (required), language_code, location_code.
labs_google_categories_for_domainD
Inputs: target (required), language_code, limit, location_code, +1 more.
labs_google_competitors_domainD
Inputs: target (required), filters, language_code, limit, +2 more.
labs_google_domain_intersectionD
Inputs: domains (required), filters, language_code, limit, +2 more.
labs_google_domain_rank_overviewD
Inputs: target (required), language_code, limit, location_code, +1 more.
labs_google_historical_search_volumeD
Inputs: keywords (required), include_serp_info, language_code, location_code.
labs_google_keyword_ideasD
Inputs: keyword (required), include_seed_keyword, language_code, limit, +2 more.
labs_google_keywords_for_siteD
Inputs: target (required), include_serp_info, language_code, limit, +2 more.
labs_google_keyword_suggestionsD
Inputs: keyword (required), include_seed_keyword, language_code, limit, +2 more.
labs_google_play_app_competitorsD
Inputs: app_id (required), language_code, limit, location_code, +1 more.
labs_google_play_keywords_for_appD
Inputs: app_id (required), language_code, limit, location_code, +1 more.
labs_google_play_ranked_appsD
Inputs: keyword (required), filters, include_seed_keyword, language_code, +3 more.
labs_google_ranked_keywordsD
Inputs: target (required), filters, include_serp_info, language_code, +3 more.
labs_google_relevant_pagesD
Inputs: target (required), filters, language_code, limit, +2 more.
labs_google_search_intentD
Inputs: keywords (required), language_code, location_code.
labs_google_subdomainsD
Inputs: target (required), filters, language_code, limit, +2 more.
labs_languagesD
Inputs: engine (required).
labs_locationsD
Inputs: engine (required), country.
localfalcon_calculate_grid_pointsD
Inputs: distance (required), lat (required), lng (required), points, +1 more.
localfalcon_get_ranking_at_coordinateD
Inputs: keyword (required), lat (required), lng (required), place_id (required), +2 more.
localfalcon_keyword_search_at_coordinateD
Inputs: keyword (required), lat (required), lng (required), country, +2 more.
localfalcon_run_grid_searchD
Inputs: distance (required), keyword (required), lat (required), lng (required), +5 more.
localfalcon_search_gmb_locationsD
Inputs: query (required), include_sabs, lat, lng.
merchant_amazon_languagesD
Inputs: no named parameters.
merchant_amazon_locationsD
Inputs: country.
merchant_amazon_product_infoD
Inputs: asin (required), language_code, language_name, location_code, +1 more.
merchant_amazon_reviewsD
Inputs: asin (required), depth, language_code, language_name, +3 more.
merchant_amazon_searchD
Inputs: keyword (required), depth, language_code, language_name, +4 more.
merchant_google_languagesD
Inputs: no named parameters.
merchant_google_locationsD
Inputs: country.
merchant_google_product_infoD
Inputs: product_id (required), language_code, language_name, location_code, +1 more.
merchant_google_product_specsD
Inputs: product_id (required), language_code, language_name, location_code, +1 more.
merchant_google_reviewsD
Inputs: product_id (required), depth, language_code, language_name, +3 more.
merchant_google_searchD
Inputs: keyword (required), depth, language_code, language_name, +4 more.
merchant_google_sellersD
Inputs: product_id (required), language_code, language_name, location_code, +1 more.
onpage_duplicate_contentD
Inputs: id (required), limit, offset.
onpage_pagesD
Inputs: id (required), filters, limit, offset.
onpage_resourcesD
Inputs: id (required), url (required), filters, limit, +1 more.
onpage_summaryD
Inputs: id (required).
onpage_task_force_stopD
Inputs: id (required).
onpage_task_postD
Inputs: target (required), enable_javascript, limit, load_resources, +1 more.
onpage_tasks_readyD
Inputs: no named parameters.
serp_baidu_organic_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +3 more.
serp_bing_organic_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +3 more.
serp_google_images_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +3 more.
serp_google_jobs_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +3 more.
serp_google_languagesD
Inputs: no named parameters.
serp_google_locationsD
Inputs: country.
serp_google_maps_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +4 more.
serp_google_news_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +3 more.
serp_google_organic_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +3 more.
serp_google_organic_task_getD
Inputs: id (required).
serp_google_organic_task_postD
Inputs: keyword (required), language_code (required), location_code (required), depth, +7 more.
serp_google_organic_task_readyD
Inputs: no named parameters.
serp_google_shopping_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +3 more.
serp_yahoo_organic_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +3 more.
serp_youtube_organic_liveD
Inputs: keyword (required), language_code (required), location_code (required), depth, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 146 tools
The tools are organized into clear categories (e.g., backlinks, keywords, serp) with distinct purposes within each category, reducing overlap. However, some categories like 'labs' have many similar-sounding tools (e.g., google_keywords_for_site, google_ranked_keywords) that could cause minor confusion without descriptions.
Tool names follow a highly consistent pattern of category_subcategory_action (e.g., backlinks_summary, keywords_google_ads_search_volume) throughout the entire set. This structured naming makes it easy to predict tool functions and navigate the large collection.
With 146 tools, the count is excessively high for an MCP server, likely overwhelming for agents and users. While SEO is a broad domain, this many tools suggests poor scoping or aggregation of multiple services into one server, making it cumbersome and inefficient.
The tool set comprehensively covers SEO domains including backlinks, keywords, SERP, content analysis, and more, with no obvious gaps. Each category includes multiple related tools, providing extensive coverage for typical SEO workflows and data needs.
Maintenance
Related MCP Connectors
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
Enables AI assistants to natively interact with the Serpzilla link-building marketplace.
Real SEO data for AI assistants: page audits, Keyword Planner volumes, Search Console history.
SEO data for AI agents: keywords, SERPs, rank tracking, audits, backlinks, GSC and AI visibility.
Related MCP Servers
- AlicenseCqualityNot gradedmaintenanceEnables AI assistants to interact with DataForSEO APIs and obtain SEO data including SERP results, keyword research, on-page metrics, backlink analysis, and domain analytics through a standardized interface.7610,513 npm-
- -licenseCqualityNot gradedmaintenanceEnables AI assistants to access comprehensive SEO data through DataForSEO APIs, including SERP results, keyword research, backlink analysis, on-page metrics, and domain analytics. Supports real-time search engine data from Google, Bing, and Yahoo with customizable filtering and multiple deployment options.36-
- AlicenseNot gradedqualityDmaintenanceConnects AI assistants to SEO APIs for backlinks analysis, keyword research, and traffic analysis.129 npm28MIT
- FlicenseBqualityDmaintenanceEnables SEO analysis and data retrieval through DataForSEO API, including keyword research, backlinks, competitor analysis, and on-page audits.24-