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

# WebExtrator MCP integration guide

> webextrator MCP server integration

WebExtrator MCP can render web pages that load content with JavaScript and return HTML, or extract structured content such as articles and products directly from web pages. Slower pages can be processed asynchronously.

## Connect to the Hosted Service

In your client, select remote MCP (Streamable HTTP) and enter `https://webextrator.mcp.acedata.cloud/mcp` as the server address. Select OAuth, then follow the browser prompts to sign in to Ace Data Cloud and authorize access.

| Client | How to connect |
| - | - |
| Claude / Claude Desktop | Under “Customize → Connectors”, add a custom connector, paste the server address, and sign in. |
| Claude Code | Run `claude mcp add --transport http --scope user webextrator https://webextrator.mcp.acedata.cloud/mcp`, then open `/mcp` within the session, select the server, and complete authorization. |
| Codex CLI | Run `codex mcp add webextrator --url https://webextrator.mcp.acedata.cloud/mcp`, then run `codex mcp login webextrator`. |
| Cursor | Create a new HTTP server in the MCP settings, enter the address, and follow the prompts to sign in when connecting. |
| VS Code | Run `MCP: Add Server` from the command palette, select HTTP and enter the address, then use `MCP: List Servers` to check the status. |

If using an application API key, select a general-purpose application or one with permissions for WebExtrator web page rendering, intelligent extraction, and task queries on the application management page. Check the allowed APIs and your balance. Set the request header to `Authorization: Bearer &lt;应用 API Key>` in the client's private credential settings. [Applications and API Keys](https://platform.acedata.cloud/console/applications)

### Using an Application Key with Gemini CLI and OpenCode

First, set the environment variable `ACEDATACLOUD_API_TOKEN` to your application API key in the terminal where you launch the client. The following commands use macOS or Linux shell quoting and save a reference to the variable.

| Client | How to connect |
| - | - |
| Gemini CLI | Run `gemini mcp add --scope user --transport http webextrator https://webextrator.mcp.acedata.cloud/mcp --header 'Authorization: Bearer ${ACEDATACLOUD_API_TOKEN}'`, then check using `gemini mcp list`. |
| OpenCode 2.x | Run `opencode mcp add webextrator --global --url https://webextrator.mcp.acedata.cloud/mcp --header 'Authorization=Bearer {env:ACEDATACLOUD_API_TOKEN}'`, then run `opencode reload` and `opencode mcp list`. |

For OpenCode 1.x, add a service named `webextrator` to the `mcp` object in your personal `opencode.json`, set `type` to `remote`, `url` to the address above, `oauth` to `false`, and `headers.Authorization` to `Bearer {env:ACEDATACLOUD_API_TOKEN}`. [OpenCode 1.x configuration](https://opencode.ai/v1/docs/mcp-servers/)

## Connect locally via stdio

Install uv, open the local MCP configuration in Claude Desktop's developer settings, and merge the following entry into your user configuration. Replace the placeholder with your application's API key, save, and restart the client. Other clients that support stdio can also run the `uvx mcp-webextrator` command and pass the key to the process as an environment variable.

```json theme={null}
{
  "mcpServers": {
    "webextrator": {
      "command": "uvx",
      "args": [
        "mcp-webextrator"
      ],
      "env": {
        "ACEDATACLOUD_API_TOKEN": "YOUR_API_KEY"
      }
    }
  }
}
```

The local process still calls the Ace Data Cloud API. Store your key in your personal client configuration or a credential manager. [mcp-webextrator package](https://pypi.org/project/mcp-webextrator/)

## Verify the connection and available tools

Open the client's tool list, find WebExtrator, and first ask the assistant to call `webextrator_get_usage_guide` and explain what rendering and extraction each return. This query checks whether the client has loaded the tools without submitting an actual request.

| Purpose | Tool | Usage |
| - | - | - |
| Render a web page | `webextrator_render` | Pass `url` to get the rendered HTML. Specify `wait_for_selector` when you need to wait for dynamic content. |
| Extract content | `webextrator_extract` | Pass `url`. Use `expected_type` to specify `article`, `product`, or `general`. |
| Query tasks | `webextrator_get_task`, `webextrator_get_tasks_batch` | Query a single task using `task_id` or `trace_id`, or query multiple tasks in a batch using the returned IDs. |
| View parameters | `webextrator_get_usage_guide` | View parameters for rendering, structured extraction, and tasks. |

## Usage examples

Ask the assistant: "Call `webextrator_extract` on the public article URL I provide, set `expected_type` to `article`, and organize the returned title and body text." For a synchronous request, you can read the extraction result directly.

If the page takes longer to load, pass `async=true` and save the returned `task_id`. Use `webextrator_get_task` to query the original task. Once `finished_at` appears, check whether it succeeded or failed. If successful, read the result from `response`. If you want to retain the page's HTML, use `webextrator_render` instead.

Before making a request, check the service page for current pricing and availability. [WebExtrator service](https://platform.acedata.cloud/services/webextrator) · [Extraction API](https://platform.acedata.cloud/documents/webextrator-extract) · [Rendering API](https://platform.acedata.cloud/documents/webextrator-render) · [Task query API](https://platform.acedata.cloud/documents/webextrator-tasks)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.