> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hasdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Connect LLM clients and AI agents to HasData via the Model Context Protocol.

The **HasData MCP Server** exposes HasData's scraping and search capabilities to any client that speaks the [Model Context Protocol](https://modelcontextprotocol.io). Point your MCP-enabled client (Claude, Codex, Cursor, VS Code, Windsurf, custom agents, etc.) at the HasData endpoint and your model can scrape web pages, run Google searches, and pull structured data without writing API integration code.

## Endpoint

```
https://mcp.hasdata.com/mcp
```

The server uses the streamable HTTP transport.

## Authentication

Two ways to connect: sign in with your HasData account, or send an API key.

### Sign in with your HasData account

Clients that support OAuth connect without you handling a key: add the endpoint and follow the sign-in prompt. Each connection gets its own API key, named after the client — delete that key on the [API keys page](https://app.hasdata.com/api-keys) to disconnect it.

<CodeGroup>
  ```bash Claude Code theme={null}
  claude mcp add --transport http hasdata https://mcp.hasdata.com/mcp
  # then run /mcp and authenticate
  ```

  ```bash Codex theme={null}
  codex mcp add hasdata --url https://mcp.hasdata.com/mcp
  codex mcp login hasdata
  ```

  ```bash VS Code theme={null}
  code --add-mcp '{"name":"hasdata","type":"http","url":"https://mcp.hasdata.com/mcp"}'
  ```

  ```text Claude Desktop / claude.ai theme={null}
  Settings → Connectors → Add custom connector → https://mcp.hasdata.com/mcp
  ```

  ```text Cursor theme={null}
  Settings → MCP → Add custom MCP → https://mcp.hasdata.com/mcp
  ```
</CodeGroup>

### API key

Send your key from the [dashboard](https://app.hasdata.com/api-keys) in the `x-api-key` header. Use this for clients without OAuth support, and for unattended agents.

<CodeGroup>
  ```bash Claude Code theme={null}
  claude mcp add --transport http hasdata https://mcp.hasdata.com/mcp \
    --header "x-api-key: <your-api-key>"
  ```

  ```json Cursor theme={null}
  // ~/.cursor/mcp.json
  {
    "mcpServers": {
      "hasdata": {
        "url": "https://mcp.hasdata.com/mcp",
        "headers": { "x-api-key": "<your-api-key>" }
      }
    }
  }
  ```

  ```json Windsurf theme={null}
  // ~/.codeium/windsurf/mcp_config.json
  {
    "mcpServers": {
      "hasdata": {
        "serverUrl": "https://mcp.hasdata.com/mcp",
        "headers": { "x-api-key": "<your-api-key>" }
      }
    }
  }
  ```

  ```json Cline theme={null}
  // cline_mcp_settings.json
  {
    "mcpServers": {
      "hasdata": {
        "type": "streamableHttp",
        "url": "https://mcp.hasdata.com/mcp",
        "headers": { "x-api-key": "<your-api-key>" }
      }
    }
  }
  ```

  ```toml Codex theme={null}
  # ~/.codex/config.toml
  [mcp_servers.hasdata]
  url = "https://mcp.hasdata.com/mcp"
  env_http_headers = { "x-api-key" = "HASDATA_API_KEY" }
  ```
</CodeGroup>

Any other client that speaks the streamable HTTP transport works the same way: point it at the endpoint and send `x-api-key`. Requests with no valid credential are rejected with `401 Unauthorized`.

## Choosing Which APIs to Expose

By default the server exposes all 57 HasData APIs as tools, and your model re-reads all 57 tool definitions on every call. Add the `apis` parameter to expose only the ones you need:

```
https://mcp.hasdata.com/api/mcp?apis=amazon,shopify
```

That connection has 7 tools instead of 57. Authentication, billing and tool behaviour are unchanged.

Name a provider to get all of its APIs, or name a single API — `?apis=google_maps_search,web_scraping` gives two tools.

| Provider        | Individual APIs                                                                                                                                                                                                                                      |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `airbnb`        | `airbnb_listing`, `airbnb_property`                                                                                                                                                                                                                  |
| `amazon`        | `amazon_product`, `amazon_reviews`, `amazon_search`, `amazon_seller`, `amazon_seller_products`                                                                                                                                                       |
| `bing`          | `bing_serp`                                                                                                                                                                                                                                          |
| `booking`       | `booking_place`, `booking_search`                                                                                                                                                                                                                    |
| `duckduckgo`    | `duckduckgo_serp`                                                                                                                                                                                                                                    |
| `glassdoor`     | `glassdoor_job`, `glassdoor_listing`                                                                                                                                                                                                                 |
| `google_images` | `google_images_images`                                                                                                                                                                                                                               |
| `google_maps`   | `google_maps_contributor_reviews`, `google_maps_photos`, `google_maps_place`, `google_maps_posts`, `google_maps_reviews`, `google_maps_search`                                                                                                       |
| `google_serp`   | `google_serp_ai_mode`, `google_serp_ai_overview`, `google_serp_events`, `google_serp_immersive_product`, `google_serp_news`, `google_serp_product`, `google_serp_serp`, `google_serp_serp_light`, `google_serp_shopping`, `google_serp_short_videos` |
| `google_travel` | `google_travel_flights`, `google_travel_hotels`                                                                                                                                                                                                      |
| `google_trends` | `google_trends_search`                                                                                                                                                                                                                               |
| `indeed`        | `indeed_job`, `indeed_listing`                                                                                                                                                                                                                       |
| `instagram`     | `instagram_posts`, `instagram_profile`                                                                                                                                                                                                               |
| `redfin`        | `redfin_listing`, `redfin_property`                                                                                                                                                                                                                  |
| `shopify`       | `shopify_collections`, `shopify_products`                                                                                                                                                                                                            |
| `tiktok`        | `tiktok_comments`, `tiktok_posts`, `tiktok_profile`, `tiktok_search`                                                                                                                                                                                 |
| `web_scraping`  | `web_scraping_web_scraping`                                                                                                                                                                                                                          |
| `yellowpages`   | `yellowpages_place`, `yellowpages_search`                                                                                                                                                                                                            |
| `yelp`          | `yelp_place`, `yelp_reviews`, `yelp_search`                                                                                                                                                                                                          |
| `youtube`       | `youtube_channel`, `youtube_search`, `youtube_transcript`, `youtube_video`                                                                                                                                                                           |
| `zillow`        | `zillow_listing`, `zillow_property`                                                                                                                                                                                                                  |

A misspelled name is ignored and the rest still loads. If every name is misspelled the request fails with `400` and lists the valid providers.

## Billing

Each tool call consumes HasData credits the same way a direct API request would, from the workspace the connection is attached to. See [Credits and Concurrency](/credits-and-concurrency) for details.
