dataforseo-mcp-server
by: Skobyn
A comprehensive stdio MCP server for DataForSEO API
📌Overview
Purpose: To provide a comprehensive and seamless integration platform for Large Language Models (LLMs) to access and utilize various SEO APIs efficiently.
Overview: The SEO Tools MCP Server serves as a bridge between LLMs and a wide range of SEO functionalities through direct natural language interactions. By incorporating standardized API endpoints from DataForSEO and optional third-party integrations, it enables users to execute SEO-related tasks such as keyword research and backlink analysis straightforwardly.
Key Features:
-
Comprehensive API Coverage: Supports all major DataForSEO API endpoints, enabling extensive SEO data retrieval and analysis.
-
Extensible Architecture: Easily add new API integrations to enhance functionality and adaptability to various SEO tools beyond the core offerings.
-
Stdio Transport Layer: Facilitates simple integration with different LLM platforms, streamlining communication and data exchange.
-
Error Reporting & Authentication Handling: Implements robust mechanisms for error tracking and secure authentication processes to ensure reliability and security in API interactions.
-
Type-Safe Tool Definitions: Uses Zod schemas for type safety in tool definitions, minimizing errors during API calls and ensuring a reliable user experience.
SEO Tools MCP Server
A comprehensive stdio MCP (Model Context Protocol) server for SEO APIs. This server allows LLMs (Large Language Models) to interact with DataForSEO API functions and other SEO tools.
Overview
The SEO Tools MCP Server enables seamless integration between LLMs like Claude and various SEO APIs, enabling SEO analysis, keyword research, backlink analysis, and other SEO-related tasks directly through natural language interactions.
This implementation exposes all major DataForSEO API endpoints as MCP tools, which LLMs can call to retrieve specific SEO data. The server uses stdio as its transport layer, making integration with various LLM platforms straightforward.
Features
- Comprehensive coverage of DataForSEO API endpoints
- Optional integration with Local Falcon and other third-party SEO tools
- Stdio transport for easy integration
- Authentication handling
- Detailed error reporting
- Type-safe tool definitions with Zod schemas
- Extensible architecture for adding new API integrations
Implemented API Categories
DataForSEO API
- SERP API - Search engine results data from Google, Bing, Yahoo, and more
- Keywords Data API - Keyword research, suggestions, and search volume data
- DataForSEO Labs API - Advanced SEO analytics, domain comparisons, and keyword analysis
- Backlinks API - Backlink profiles, referring domains, and anchor text analysis
- OnPage API - Website audit, content analysis, and technical SEO checks
- Domain Analytics API - Technology stack detection and domain data analysis
- Content Analysis API - Content quality evaluation and semantic analysis
- Content Generation API - AI-powered content generation tools
- Merchant API - E-commerce data from Amazon and Google Shopping
- App Data API - Mobile app data from Google Play and App Store
- Business Data API - Business listing data from Google My Business, Trustpilot, and more
Local Falcon API (Optional)
- Calculate Grid Points - Generate grid coordinates for local ranking analysis
- Search GMB Locations - Find Google My Business locations by query
- Get Ranking at Coordinate - Check business ranking at specific coordinates
- Keyword Search at Coordinate - Test search terms at specific locations
- Run Grid Search - Perform full grid-based local ranking analysis
Installation
# 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
Usage
To use this MCP server, API credentials for the services you want to use are required.
Running the Server with DataForSEO
# Set environment variables for DataForSEO authentication
export DATAFORSEO_LOGIN="your_login"
export DATAFORSEO_PASSWORD="your_password"
# Run the server
npm start
Running the Server with DataForSEO and 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
Using with Claude or other LLMs
The server implements the Model Context Protocol, allowing LLMs to interact with external systems in a standardized way. Integration with Claude or other LLM platforms requires following their specific MCP implementation.
Refer to the examples directory for usage samples.
Development
# Run in development mode with hot reloading
npm run dev
Examples
The examples directory includes sample code illustrating:
- Starting the server
- Connecting to it from a client
- Making calls to different API endpoints
- Handling the results
Available Tools
The server exposes numerous tools across all integrated API categories. Below are some commonly used examples:
DataForSEO SERP API Tools
serp_google_organic_live
- Get Google organic search resultsserp_google_organic_task_post
- Create a Google organic search taskserp_google_maps_live
- Get Google Maps search results
DataForSEO Keywords Data Tools
keywords_google_ads_search_volume
- Get search volume for keywordskeywords_google_ads_keywords_for_site
- Get keyword suggestions for a domainkeywords_google_trends_explore
- Explore keyword trends over time
DataForSEO Labs Tools
labs_google_keyword_ideas
- Get keyword ideas based on seed keywordslabs_google_related_keywords
- Get related keywordslabs_google_domain_rank_overview
- Get domain ranking overview
DataForSEO Backlinks Tools
backlinks_summary
- Get a summary of a domain's backlink profilebacklinks_backlinks
- Get a list of backlinks for a domainbacklinks_referring_domains
- Get referring domains for a target
Local Falcon Tools (If Configured)
localfalcon_calculate_grid_points
- Calculate grid points around a base coordinatelocalfalcon_search_gmb_locations
- Search for Google My Business locationslocalfalcon_get_ranking_at_coordinate
- Get business ranking at specific coordinatelocalfalcon_keyword_search_at_coordinate
- Search keywords at a specific locationlocalfalcon_run_grid_search
- Run a full grid search for local rankings
Complete Tool List
For a full list of available tools and their parameters, see the implementation in the src/api
directory.
Extending the Server
To add support for additional SEO APIs:
- Create a new directory in
src/api/
for your integration - Implement client handling and tool registration
- Add your integration to
src/index.ts
- Add environment variable handling for authentication
Refer to the Local Falcon integration in src/api/localfalcon/
as a template.
License
MIT