DataForSEO Model Context Protocol (MCP) integration with Claude Code allows for seamless access to DataForSEO’s comprehensive SEO data suite directly from your command line. In this guide we’ll cover three MCP installation methods to get you up and running in no time.
Prerequisites
Before installing DataForSEO MCP, make sure you have:
- Node.js (version 18 or higher) installed;
- Claude Code installed globally (check Anthropic docs for details);
- DataForSEO account with API credentials (API login and password);
- Your Anthropic API key is configured with Claude Code.
Method 1: Add Remote MCP Server
The easiest way is to install MCP as a remote server:
claude mcp add --header "Authorization: Basic <basic_auth_token>" --transport http dfs-mcp https://mcp.dataforseo.com/http
As the <basic_auth_token>
, specify your DataForSEO API credentials, encoded in the Base64 format. You can find your API credentials in the API Access tab of your DataForSEO account.
Method 2: Add Local MCP Server From the NPM Repository
If you prefer to keep MCP servers locally, you can add DataForSEO MCP to your system from the NPM repository:
claude mcp add dfs-mcp --env DATAFORSEO_USERNAME=<api_username> --env DATAFORSEO_PASSWORD=<api_password> -- npx -y dataforseo-mcp-server
Instead of <api_username>
and <api_password>
input your API login and API password from the API Access tab of your DataForSEO account.
Method 3: Add Local MCP Server With Custom Changes
If you need to make certain changes to DataForSEO MCP server and then make these changes work in Claude Code, you can add MCP server locally with custom changes.
claude mcp add dfs-mcp --env DATAFORSEO_USERNAME=<api_username> --env DATAFORSEO_PASSWORD=<api_password> -- node <path_to_changed_repository>\\mcp-server-typescript\\build\\main\\main\\index.js
Verification
After installation, it’ll be a good idea to verify that DataForSEO MCP is working correctly with the following command:
claude test-mcp dataforseo
You should see a confirmation message indicating successful connection to DataForSEO APIs. If something went wrong, Claude Code will also display troubleshooting tips.
See also: