Skip to main content

How to Integrate Octoparse with Gemini CLI via MCP (Step-by-Step)

Explains how to connect Octoparse to Gemini CLI via Model Context Protocol (MCP), enabling Gemini to interact directly with your Octoparse account to search templates, manage tasks, and export data through natural language commands.

Updated in the last hour

Before You Begin

Please ensure you have the following ready:

  • Node.js Installed: The Gemini CLI requires Node.js (LTS version recommended) to run. Download it here.

  • Google Account: A valid account is required to authenticate with Gemini services.

  • Octoparse Account: A paid plan or available cloud credits are necessary to run scraping tasks.

What This Integration Enables

Once connected, you can use natural language in your terminal to:

  • Search Octoparse scraping templates.

  • Create tasks from existing templates.

  • Start/Stop cloud-based scraping tasks.

  • Check Status of task execution in real-time.

  • Export Data directly to CSV or JSON formats.

  • View Account Info and credit balance.


Step-by-Step Configuration

Step 1: Install Gemini CLI

Open your PowerShell or Terminal and run the following command to install the CLI globally:

npm install -g @google/gemini-cli

Tip for Windows Users: If you receive an error about "running scripts is disabled," run PowerShell as an Administrator and execute: Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser.


Step 2: Start and Authenticate

Instead of complex commands, simply launch the CLI to begin the interactive setup:

  1. Start the CLI: Type gemini in your terminal and press Enter.

  2. Select Authentication: Choose (Recommended) Login with Google from the on-screen menu.

  3. Complete Login: A browser window will open automatically. Follow the instructions to sign in using the account associated with your subscription. Your credentials will be cached locally for future sessions.

「Login with Google」を選択してEnterキーを押下


Step 3: Configure the Octoparse MCP Server

Gemini needs the Octoparse server URL to access its tools.

  1. Locate the Settings File: In the Gemini CLI, type /config path. It will point you to the .gemini folder in your user directory.

  2. Edit the File: Open settings.json (typically located at C:\Users\YourName\.gemini\settings.json) with a text editor (like Notepad).

  3. Add Octoparse: Insert the Octoparse server information into the mcpServers section of the JSON object:

    "mcpServers": {
    "octoparse": {
    "httpUrl": "https://mcp.octoparse.com",
    "oauth": {
    "clientId": "Octoparse",
    "enabled": true
    }
    }
    }

    Tips - How to Merge: Add the block above into your settings.json. Ensure it is at the top level of the JSON object. Important: Add a comma (,) after the previous block (usually "security") to maintain valid syntax.Your final settings.json should look like this:

  4. Save and Restart: Save the file and type /restart in the Gemini prompt to apply the changes.


Step 4: Authorize Octoparse (OAuth)

The first time you ask Gemini to perform an Octoparse action (e.g., "Find a template"), an OAuth flow will trigger:

  1. Gemini will prompt you to authorize Octoparse access.

  2. A browser window will open automatically for you to log in to your Octoparse account.

  3. Approve the requested permissions.

  4. Gemini can now securely call Octoparse tools without ever seeing your password.


Example Commands

Once the > prompt appears, you can try commands like these:

Templates & Creation

"Find an Octoparse template for scraping Amazon product listings."
"Create a task using the eBay template and start it in the cloud."

Monitoring & Export

"What is the status of my latest scraping task?"
"Export the results from my 'Product Scraper' task to CSV."

Important Usage Notes

  • ☁️Only cloud-supported templates can be started via this integration.

  • ❌Local-only tasks must still be run via the Octoparse Desktop Client.

  • ⚠️Cloud execution consumes Octoparse credits.

  • ⚠️ Some templates may require a Professional or higher plan.

Did this answer your question?