Get the FREE Ultimate OpenClaw Setup Guide →

mcp -typescript

DataForSEO API modelcontextprotocol server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio dataforseo-mcp-server-typescript npx -y dataforseo-mcp-server \
  --env ENABLED_MODULES="SERP,KEYWORDS_DATA,ONPAGE,DATAFORSEO_LABS,BACKLINKS,BUSINESS_DATA,DOMAIN_ANALYTICS" \
  --env ENABLED_PROMPTS="top_3_google_result_domains,top_5_serp_paid_and_organic" \
  --env DATAFORSEO_PASSWORD="your_password" \
  --env DATAFORSEO_USERNAME="your_username" \
  --env DATAFORSEO_FULL_RESPONSE="false" \
  --env DATAFORSEO_SIMPLE_FILTER="false"

How to use

This MCP server acts as a standardized bridge to DataForSEO APIs, exposing modules such as SERP data, keyword research, on-page metrics, backlinks, and more through the MCP protocol. After starting the server, you can interact with it using MCP-compatible clients or tooling, sending module- and prompt-specific requests to retrieve structured SEO insights. The server supports both streamable MCP transports and, optionally, an HTTP interface when launched with the appropriate entry point. Typical workflows include discovering keyword opportunities with KEYWORDS_DATA, analyzing SERP dynamics via SERP, and auditing pages using ONPAGE data, all while leveraging the modular prompts configured through environment variables.

How to install

Prerequisites:

  • Node.js v14 or higher installed on your system
  • Access to DataForSEO API credentials (username and password)

Installation steps:

  1. Clone the repository or install via npm if provided by the project:
# If cloning (example URL from README)
git clone https://github.com/dataforseo/mcp-server-typescript
cd mcp-server-typescript
  1. Install dependencies:
npm install
  1. Set required environment variables before running the server:
# Required credentials
export DATAFORSEO_USERNAME=your_username
export DATAFORSEO_PASSWORD=your_password

# Optional: limit enabled modules
export ENABLED_MODULES="SERP,KEYWORDS_DATA,ONPAGE,DATAFORSEO_LABS,BACKLINKS,BUSINESS_DATA,DOMAIN_ANALYTICS"

# Optional: enable specific prompts within modules
export ENABLED_PROMPTS="top_3_google_result_domains,top_5_serp_paid_and_organic"

# Optional: control API response verbosity
export DATAFORSEO_FULL_RESPONSE="false"
export DATAFORSEO_SIMPLE_FILTER="false"
  1. Run the server (via npx as shown in the docs):
npm install -g dataforseo-mcp-server
npx dataforseo-mcp-server
  1. Optional: Build and run as an npm package (if the project provides build scripts):
npm run build
npm run http   # to start HTTP server if supported

Additional notes

Tips:

  • Ensure your DataForSEO credentials are kept secure; consider using a secret management tool or environment variable vault in production.
  • The ENABLED_MODULES and ENABLED_PROMPTS controls let you tailor the MCP surface to your needs and scale performance by limiting data processing.
  • If the full API responses are required for debugging or advanced workflows, set DATAFORSEO_FULL_RESPONSE to true, but be aware of larger payloads.
  • For Cloudflare Worker deployment, follow the module-specific deployment steps in the README and reuse the same ENV vars for credentials and module configuration.
  • Common issues may include invalid credentials, network connectivity, or missing environment variables; verify you can reach DataForSEO APIs and that the required variables are exported in the shell or hosting environment.

Related MCP Servers

Sponsor this space

Reach thousands of developers