# DataForSEO MCP

Connect the official v3 server and sample one Google results page for a chosen location. Bring back the organic ranks, local pack and actual request cost.

## Connect the official server

Use the official hosted server with client-supported OAuth or Basic authorization, or run the official package locally. A live SERP can draw down the account balance. Approve one endpoint and one task before enabling the generic request tool.

Hosted endpoint `https://mcp.dataforseo.com/v3/mcp`

### Hosted Streamable HTTP

Add the v3 server URL as a remote connector. Use OAuth on supported clients, such as Claude Desktop and ChatGPT. When a client requires Basic authorization, use its secret storage for the API login and password credential.

[DataForSEO MCP client setup](https://dataforseo.com/model-context-protocol)

### Local stdio

Configure your client to start the official npm package with stdio. Use the environment variables DATAFORSEO_LOGIN and DATAFORSEO_PASSWORD from the package README. Store both in the client’s secret environment. Check that docs_search and api_request are available.

```sh
npx -y dataforseo-mcp-server
```

[Official DataForSEO MCP package](https://github.com/dataforseo/mcp-server-typescript)

## Sample one local Google results page

Look up the endpoint first. Then replay one saved result or send one approved live request for a keyword, location, language and device.

1. **Read the endpoint docs.** Use docs_search on the Google Organic Live Advanced documentation URL. Confirm the provider’s location name, language code, device and OS. Look up the location if you change the sample market.
2. **Run a single approved request.** Use the included api_request arguments as the request shape. Keep POST, the Live Advanced path, noAiMode true for the standard response, one task and depth 10. Confirm the endpoint’s price and balance before a live call. Replay with the saved response to test without credits.
3. **Verify the result and retain both ranks.** Check the top-level and task status codes. Use task data to confirm the scope, then record the time, task ID, cost and result types. Keep rank_group for organic order and rank_absolute for position among all result types. Report local pack presence separately.
4. **Stop after one result page.** Return the organic domain, URL and both ranks. A failed or empty task is a missing observation. Record the reason before deciding whether a second request is worth the cost.

### Prompt for your agent

Use dataforseo-mcp-local-serp.json. Default to offline with the saved response. Verify status_code 20000 at response and task level and match task.data to the request. Return task ID, cost, local pack presence and organic domain, URL, rank_group and rank_absolute sorted by organic rank. Compare with expected after calculating. In live mode only, use docs_search to confirm the endpoint and scope, then ask for approval for one task at depth 10. Use api_request once with the documented request shape and the approved inputs. Preserve scope and timestamp in the report. Stop if the scope mismatches, the task fails or results are empty. Do not submit a retry automatically.

## Replay the example

Save both files in the same folder and run the command with Node.js 18+. The replay uses local fictional data.

- [Download example JSON](https://seotoolsforagents.com/examples/dataforseo-mcp-local-serp.json)
- [Download Node runner](https://seotoolsforagents.com/examples/seo-mcp-replay.mjs)

```sh
node seo-mcp-replay.mjs dataforseo-mcp-local-serp.json --verify
```

A result of verified: true means the output matches the expected fields.

Brooklyn · English · Android mobile

| Domain | Organic rank | Absolute rank |
| --- | --- | --- |
| north-pier-roofing.example | 1 | 2 |
| harbor-roofing.example | 2 | 3 |

## Provider references

- [DataForSEO MCP client setup](https://dataforseo.com/model-context-protocol)
- [Official DataForSEO MCP package](https://github.com/dataforseo/mcp-server-typescript)
- [Google Organic Live Advanced API](https://docs.dataforseo.com/v3/serp/google/organic/live/advanced/)
- [DataForSEO SERP pricing](https://dataforseo.com/pricing/serp)

## Where to go next

- [Try Semrush for a domain keyword comparison](https://seotoolsforagents.com/mcp-servers/semrush.md)
- [Run the local business playbook](https://seotoolsforagents.com/playbooks/local-business.md)
- [Compare AI SEO tools](https://seotoolsforagents.com/compare/ai-seo-tools.md)
