# MCP server

> Connect Claude, LiteLLM or any MCP client to the hosted DataForGAIO MCP server, with its tools, connection settings, costs and limits.

The hosted Model Context Protocol server lets an AI client crawl pages, map sites, run Google or Bing searches and read AI visibility reports, with a receipt on every result.

> **Note:** The MCP server covers the Crawl API, `POST /v1/serp`, usage and the AI visibility routes today. The compatible SERP, Pages, AI answers, Business and Ads endpoints aren't exposed as MCP tools yet; agents call those over HTTP. See [Tool-calling tips](https://dataforgaio.com/docs/tool-calling-tips.md).

## Connecting

| Setting | Value |
|---|---|
| Endpoint | `https://mcp.dataforgaio.com/mcp` |
| Transport | Streamable HTTP (stateless, JSON responses) |
| Auth | `Authorization: Bearer dg_...` or `X-API-Key: dg_...` on every request |
| OAuth | None. In a Claude connector, choose **No sign-in** and add the header. |
| Health check | `GET https://mcp.dataforgaio.com/healthz` returns `{"status":"ok"}` without auth |

The server holds no key of its own. Each request carries the caller's key and bills that key's organization wallet. A request without a key is refused with HTTP 401.



```bash title="Claude Code"
claude mcp add --transport http dataforgaio https://mcp.dataforgaio.com/mcp \
  --header "Authorization: Bearer dg_your_key"
```

```json title="Claude Desktop / JSON config"
{
  "mcpServers": {
    "dataforgaio": {
      "url": "https://mcp.dataforgaio.com/mcp",
      "headers": { "Authorization": "Bearer dg_your_key" }
    }
  }
}
```

```yaml title="LiteLLM"
mcp_servers:
  dataforgaio:
    url: "https://mcp.dataforgaio.com/mcp"
    transport: "http"
    auth_type: "bearer_token"
    auth_value: "dg_..."
```



## Tools

| Tool | Calls | Arguments | Billed |
|---|---|---|---|
| `dataforgaio_crawl` | `POST /v1/crawls` | `url`, `output_format` (`markdown`, `html`, `json`), `include_receipt`, `project_id`, `max_content_chars` | Per page with real content, at the level that delivered it |
| `dataforgaio_crawl_batch` | `POST /v1/crawls/batch` | `urls` (up to 100), `output_format`, `include_receipt`, `project_id`, `webhook_url` | Same, per page |
| `dataforgaio_get_crawl` | `GET /v1/crawls/{id}` | `id` (`job_...` or `cr_...`), `include_receipt`, `max_content_chars` | Free |
| `dataforgaio_get_receipts` | `GET /v1/crawls/{id}/receipt` | `id` | Free |
| `dataforgaio_map` | `POST /v1/map` | `url`, `limit` (1 to 5,000), `include_subdomains`, `search`, `use_sitemap` | Per fetch with real content, at most 12 |
| `dataforgaio_serp` | `POST /v1/serp` | `keyword`, `search_engine` (`google`, `bing`), `country`, `language`, `device`, `include_receipt`, `project_id` | $0.00054 per search with results |
| `dataforgaio_list_crawls` | `GET /api/v1/crawl/list/` | `project`, `page` | Free |
| `dataforgaio_usage` | `GET /v1/usage` | none | Free |
| `dataforgaio_list_visibility_trackers` | `GET /v1/visibility/trackers` | `project` | Free |
| `dataforgaio_visibility_summary` | `GET /v1/visibility/trackers/{id}/summary` | `id` (`vt_...`), `days` (1 to 365, default 30) | Free |

The crawl and map tools don't expose `auto_upgrade`, `max_level` or `max_cost` yet, so they use the API defaults (Auto-upgrade on, up to Protected). Pages are billed at most $0.003 each. If you need a lower ceiling, call the REST API directly.

## Behavior

- **Page bodies are cut** to `max_content_chars` (default 20,000, max 200,000) so one large page doesn't fill the model's context. A cut task has `content_truncated: true` and `content_full_chars`.
- **Errors keep the API's shapes.** Request errors return `{"status": "error", "error": {...}}`. A crawl that failed upstream (502) returns the full envelope with an added `http_status`. A 429 adds `retry_after_seconds`.
- **Timeouts.** Inline calls wait up to 120 seconds. On a timeout the tool says the request may still have run, and suggests checking `dataforgaio_list_crawls` before retrying a billed call.
- **Instructions.** The server sends the client instructions that steer the model to fetch only what the user asked for, read results back instead of re-crawling, poll batches a few seconds apart, and report receipt facts with the content.

## Limits

- Rate limits are per API key: 120 requests per minute across all `/v1` routes. Every MCP user keeps their own budget even though their requests reach the API from the MCP host.
- Inline calls (`dataforgaio_crawl`, `dataforgaio_map`, `dataforgaio_serp`) count toward your organization's 10 in-flight inline requests.
- A batch takes up to 100 URLs.

See [Rate limits and concurrency](https://dataforgaio.com/docs/rate-limits.md).
