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

# Connect a Data App to Claude Code

> Pick a fixed Data App in Octoparse Data Hub, add it to Claude Code as an MCP server with the generated install prompt, and verify a real call.

This tutorial is for users who **already know which Data App to use**. You first choose and test the app in the catalog, then copy that app's install prompt and add it to Claude Code as a fixed MCP server.

<Note>
  This page follows the "pick the app first, then connect" pattern. If you do not know which app to choose yet and want to connect the MCP first and let the agent search, use <a href="/docs/en/datahub/quick-start/agent-connection/general" target="_blank" rel="noopener noreferrer">General connection: choose an app inside the agent</a> instead.
</Note>

<Note>
  Claude Code and Codex use the same Data Hub MCP capabilities. The difference is only how each client stores its MCP configuration and shows server status. The Data App itself does not change.
</Note>

## What you can do afterwards

After this tutorial, you can describe a data need directly in Claude Code and have it call the Data App on Data Hub to fetch structured data. This page also covers connecting a single Data App and several Data Apps.

## Before you start

Have the following ready:

* An Octoparse account you can sign in to.
* Claude Code installed and signed in.
* A clear, small test target, such as a target platform, keyword, and record count.

<Warning>
  An API key is an account credential. Never put a real key in project files, code repositories, public screenshots, or group chats. Provide it only when Claude Code explicitly asks for a credential.
</Warning>

## Step 1: choose and test the Data App

Confirm the app's inputs and outputs in the browser first, then connect Claude Code. If a problem appears later, you can quickly tell whether the parameters are wrong or the server is not configured properly.

<Steps>
  <Step title="Open Octoparse Data Hub and sign in">
    Go to the <a href="https://www.octoparse.com/data-hub" target="_blank" rel="noopener noreferrer">Octoparse Data Hub</a> and sign in through the account entry in the top-right corner.
  </Step>

  <Step title="Choose the target Data App">
    Use search or categories to find the target app. On the detail page, read the capability description, required parameters, returned fields, and price carefully, and confirm it fits the task.
  </Step>

  <Step title="Run online once">
    Click **Try It Now** and fill in the parameters as the page instructs. Request only a small amount of data the first time. When the run completes, check the status, record count, and key fields.
  </Step>
</Steps>

If the browser run returns no results, adjust the parameters or switch to another Data App first. Continue with Claude Code only after the browser run succeeds.

## Step 2: copy the Claude Code install prompt

On the Data App detail page, open **Integration**, choose MCP, and click **Copy install prompt**. **Copy MCP URL** only gives you the server address, which is enough if you prefer to run `claude mcp add` by hand. You can also reach it quickly through the MCP link in the detail page sidebar.

<Tip>
  For a first connection, choose just one Data App. The fewer the tools, the more easily Claude Code picks the right capability, and the simpler troubleshooting becomes.
</Tip>

## Step 3: create an Octoparse API key

<Steps>
  <Step title="Open the API key page">
    Go to the <a href="https://www.octoparse.com/console/account-center/api-keys" target="_blank" rel="noopener noreferrer">Octoparse account center</a> and create a new API key.
  </Step>

  <Step title="Store the API key safely">
    A key is usually shown in full only at creation time. Keep it temporarily in a trusted password manager. Do not save it in the project directory or a shared document.
  </Step>
</Steps>

The specific-app configuration generated on the Data App detail page uses an API key. The `Authorization: Bearer <API_KEY>` line in the configuration is the header format for the API key. The general connection also supports OAuth. Do not mix configuration snippets from the two tutorials.

## Step 4: add the server in Claude Code

<Steps>
  <Step title="Send the install prompt to Claude Code">
    Start a new Claude Code session, paste the complete install prompt you copied, and send it. Claude Code reads the server address and configuration requirements and asks for the API key when it needs one.
  </Step>

  <Step title="Provide the API key when asked">
    Provide the key only when Claude Code explicitly asks for it. Confirm that the server address comes from the app's current **Integration** section, and do not use an address from an unknown source.
  </Step>

  <Step title="Confirm the user-scope configuration">
    Claude Code normally adds the server, named `octoparse_datahub` by default, with `claude mcp add` at user scope, so it is available in every project. If it proposes a project-scoped `.mcp.json` file instead, ask for user scope so the key is not committed with the project.
  </Step>

  <Step title="Reload the server">
    If tools do not appear right away, run `/mcp` in Claude Code to check the server status, or start a new session. If the server is still missing, close and reopen Claude Code.
  </Step>
</Steps>

## Step 5: make the first real call

State the request in clear, specific natural language, ideally with the platform, filters, and quantity. For example:

```text theme={null} theme={null}
Use the Data Hub tool you just connected to enrich these three leads with industry, headcount, and HQ: Notion, Klarna, Ramp.
```

<Steps>
  <Step title="Confirm that Claude Code called the server">
    Watch the tool calls in the conversation. Only when a Data Hub tool call appears has Claude Code really accessed the Data App.
  </Step>

  <Step title="Check the data results">
    Check whether the record count, core fields, and content meet expectations. If you only get a plain explanation, ask explicitly to "call the Data Hub tool you just connected".
  </Step>
</Steps>

## Optional: let Claude Code use several Data Apps

When one workflow really needs several capabilities, create a custom toolset that puts several Data Apps into one MCP connection.

<Steps>
  <Step title="Open MCP connection in the Open Platform">
    From Data Hub, open the Open Platform, click **MCP connection**, then open the custom toolset section.
  </Step>

  <Step title="Add the Data Apps you need">
    Choose only the apps the current flow really needs. Too many tools increase the chance that Claude Code picks the wrong one.
  </Step>

  <Step title="Copy the multi-app install prompt">
    Save the toolset, then copy the complete install prompt the page currently generates.
  </Step>

  <Step title="Send it to Claude Code and reload">
    Send the multi-app install prompt to Claude Code, update the server as prompted, and reload. Then ask Claude Code to list the available capabilities first, and test each selected app one at a time.
  </Step>
</Steps>

## FAQ

<AccordionGroup>
  <Accordion title="The server was added, but no tools appear">
    Run `/mcp` to check whether the server is connected, then start a new session or restart Claude Code. If tools still do not appear, run `claude mcp list` and compare the server address and headers with the install prompt.
  </Accordion>

  <Accordion title="Unauthorized or invalid API key">
    Make sure the key has no missing characters, spaces, or line breaks, and that it is still valid. This page uses the API key configuration generated on the specific-app page. If you need OAuth, use the configuration generated on the general connection page instead.
  </Accordion>

  <Accordion title="Claude Code did not call the tool and answered with plain text">
    Write "use the Data Hub tool you just connected" explicitly in the request, and give the parameters that the app supports. You can also ask Claude Code to list the available tools first to confirm the server is loaded.
  </Accordion>

  <Accordion title="The browser returns results, but the Claude Code call fails">
    Compare with the parameters that worked in the browser. Check the server address, API key, and parameter format one by one, and read the error shown under `/mcp`. Keep the request scope small for the first verification so a timeout is not mistaken for a connection failure.
  </Accordion>

  <Accordion title="After changing the toolset, Claude Code still shows the old tools">
    After saving the new toolset, copy the current install prompt again, have Claude Code update the server, then reload. Clients do not sync toolset changes automatically.
  </Accordion>
</AccordionGroup>

## Checklist

* You ran the Data App successfully in the browser with a small amount of data.
* You copied the install prompt from the app's current **Integration** section.
* The API key is stored only in the user-scope Claude Code configuration or a credential tool.
* The Data Hub server shows as connected under `/mcp` and its tool appears.
* You completed one real tool call and checked the record count and key fields.

<CardGroup cols={2}>
  <Card title="General connection" href="/docs/en/datahub/quick-start/agent-connection/general">
    Do not pick an app first. Connect, then let the agent search for and run the right data capability.
  </Card>

  <Card title="Codex: connect a specific app" href="/docs/en/datahub/quick-start/agent-connection/codex">
    If you use Codex, see the full specific-app flow for that client.
  </Card>
</CardGroup>
