Model Context Protocol (MCP)

The Model Context Protocol (MCP) integration with Oxylabs' Web Scraper API enables the delivery of structured, AI-ready data optimized for large language model (LLM) workflows.

MCP ensures that context, metadata, and instructions are correctly formatted, allowing LLMs, such as Anthropic’s Claude to interpret and utilize the data effectively.

Setup with Claude Desktop

Using Smithery.ai

Install Node.js and the npm command line interface. If you already have them installed, run the following command to update npm to the latest version:

npm install -g npm

To install Oxylabs MCP server for Claude Desktop automatically via Smithery, run this command:

npx -y @smithery/cli install @oxylabs/oxylabs-mcp --client claude

During the installation process, you’ll be prompted to enter your API user username and password. Enter these credentials when requested.

Once the installation is complete, open Claude Desktop and configure the scraper to start using MCP-enhanced outputs.

Using UV

Install uv, as an alternative to npm. Refer to the Model Context Protocol Quickstart Guide to understand the configuration process.

To integrate the MCP server with Claude Desktop, update the claude_desktop_config.json file as follows:

{
  "mcpServers": {
    "oxylabs_mcp": {
      "command": "uvx",
      "args": ["oxylabs-mcp"],
      "env": {
        "OXYLABS_USERNAME": "your_username",
        "OXYLABS_PASSWORD": "your_password"
      }
    }
  }
}

Replace your_username and your_password with your API user username and password.

Save the changes to the configuration file and restart Claude Desktop to ensure the updated settings take effect.

Running on Cursor

Configuring Cursor Note: Requires Cursor version 0.45.6+

To configure Oxylabs in Cursor:

  1. Open Cursor Settings

  2. Go to Features > MCP Servers

  3. Click "+ Add New MCP Server"

  4. Enter the following:

    • Name: "oxylabs" (or your preferred name)

    • Type: "command"

    • Command: env OXYLABS_USERNAME=your-username OXYLABS_PASSWORD=your-password npx -y oxylabs-mcp

If you are using Windows and are running into issues, try cmd /c "set OXYLABS_USERNAME=your-username && set OXYLABS_PASSWORD=your-password && npx -y oxylabs-mcp"

Replace your-username and your-password with your Oxylabs credentials.

After adding, refresh the MCP server list to see the new tools. The Composer Agent will automatically use Oxylabs when appropriate, but you can explicitly request it by describing your web scraping needs. Access the Composer via Command+L (Mac), select "Agent" next to the submit button, and enter your query.

Last updated

Was this helpful?