---
title: "Integrations | Hydrafetch"
url: https://hydrafetch.com/integrations/
description: "Connect Hydrafetch to Claude Code, Cursor, Codex, and any other MCP client, or wire it into LangChain, LlamaIndex and the Vercel AI SDK."
---

[hydrafetch](https://hydrafetch.com/)[Book a demo](https://hydrafetch.com/demo/)[Get started](https://app.hydrafetch.com/)

[ Integrations ]

# Give your agent the whole web.

One endpoint, 9 tools, and a config block for whichever client you already use. Nothing to run locally.

The endpoint

https://api.hydrafetch.com/mcp

A streamable HTTP MCP server. Authenticate with an API key as a bearer token, or let the client run the OAuth flow and sign in through the browser.

[Get an API key](https://app.hydrafetch.com/)
scrape

Turn a URL into clean, LLM-ready markdown and structured data.

1 credit

map

Enumerate a site's URLs from its sitemap and links, without scraping them.

1 credit

search

Search the web and return ranked results: title, url and snippet. Set scrapeResults to also fetch each result as markdown, at 1 extra credit per page.

1 credit plus 1 per scraped result

brand

A company's brand from its domain: logos for light and dark backgrounds, its real colours, name, description and socials. Answers 'what is this company' far better than a raw page dump.

5 credits

logo

A company's logo as a directly embeddable image URL, chosen for the background you name. Use this rather than brand when the mark is all you need — it costs a fifth as much and returns one asset instead of the whole record.

1 credit

extract

Pull typed structured data from one or more URLs by JSON schema or prompt.

5 credits per URL

styleguide

A site's design system read from computed styles in a real browser: colours by role with contrast ratios, the type scale, corner radius and button styling. Values defined through CSS variables come back resolved to the hex actually painted.

10 credits

screenshot

Render a page in a real browser and capture a PNG, returning its public URL. Use when the question is what the page looks like rather than what it says.

5 credits

images

Harvest a page's images with their metadata, without rendering it. Cheaper than a screenshot and returns the source images rather than a picture of the page.

1 credit

[ Clients ]

## Paste one block and restart.

- [Claude Code](https://hydrafetch.com/integrations/#claude-code)

- [Cursor](https://hydrafetch.com/integrations/#cursor)

- [Codex](https://hydrafetch.com/integrations/#codex)

- [OpenCode](https://hydrafetch.com/integrations/#opencode)

- [Cline](https://hydrafetch.com/integrations/#cline)

- [Windsurf](https://hydrafetch.com/integrations/#windsurf)

01

### Claude Code

Scoped to your user, so it is available in every project. Swap --scope user for --scope project to commit it with one repo instead.

With an API keyTerminal

```
claude mcp add --scope user --transport http hydrafetch https://api.hydrafetch.com/mcp \
 --header "Authorization: Bearer $HYDRAFETCH_API_KEY"
```

Or sign in insteadTerminal

```
claude mcp add --scope user --transport http hydrafetch https://api.hydrafetch.com/mcp

# then run /mcp inside Claude Code and sign in
```

02

### Cursor

Global, so every project picks it up. Use .cursor/mcp.json in a repo instead if you want it scoped there. Drop the headers block and Cursor runs the OAuth flow instead.

~/.cursor/mcp.json

```
{
 "mcpServers": {
 "hydrafetch": {
 "url": "https://api.hydrafetch.com/mcp",
 "headers": { "Authorization": "Bearer hf_your_key" }
 }
 }
}
```

03

### Codex

Codex reads the key from the named environment variable rather than the file, so the config stays safe to commit.

~/.codex/config.toml

```
[mcp_servers.hydrafetch]
url = "https://api.hydrafetch.com/mcp"
bearer_token_env_var = "HYDRAFETCH_API_KEY"
```

Only on older builds that ignore remote servers~/.codex/config.toml

```
[features]
experimental_use_rmcp_client = true
```

04

### OpenCode

The global config, so it applies everywhere. A project root opencode.json overrides it. OpenCode detects the 401 and can run the OAuth flow on its own, so the headers block is optional.

~/.config/opencode/opencode.json

```
{
 "$schema": "https://opencode.ai/config.json",
 "mcp": {
 "hydrafetch": {
 "type": "remote",
 "url": "https://api.hydrafetch.com/mcp",
 "enabled": true,
 "headers": { "Authorization": "Bearer hf_your_key" }
 }
 }
}
```

05

### Cline

Open the MCP Servers panel, choose Configure, and paste this into the settings file it opens. Cline keeps it in global storage, so it follows you across workspaces.

cline_mcp_settings.json

```
{
 "mcpServers": {
 "hydrafetch": {
 "type": "streamableHttp",
 "url": "https://api.hydrafetch.com/mcp",
 "headers": { "Authorization": "Bearer hf_your_key" },
 "disabled": false,
 "autoApprove": []
 }
 }
}
```

06

### Windsurf

Windsurf calls the field serverUrl rather than url. Everything else is the same shape.

~/.codeium/windsurf/mcp_config.json

```
{
 "mcpServers": {
 "hydrafetch": {
 "serverUrl": "https://api.hydrafetch.com/mcp",
 "headers": { "Authorization": "Bearer hf_your_key" }
 }
 }
}
```

[ Official clients ]

## One install, every endpoint.

Each client is a thin wrapper over the same HTTP surface, so it never lags the API by a release. They read the key from `HYDRAFETCH_API_KEY`, retry the errors worth retrying, and poll crawl and batch jobs for you.

### Node

`$npm install @hydrafetch/node-sdk`
[npm](https://www.npmjs.com/package/@hydrafetch/node-sdk)[Source](https://github.com/Hydrafetch/node-sdk)

### Python

`$pip install hydrafetch`
[PyPI](https://pypi.org/project/hydrafetch/)[Source](https://github.com/Hydrafetch/python-sdk)

### Go

`$go get github.com/Hydrafetch/go-sdk`
[pkg.go.dev](https://pkg.go.dev/github.com/Hydrafetch/go-sdk)[Source](https://github.com/Hydrafetch/go-sdk)

### Ruby

`$gem install hydrafetch`
[RubyGems](https://rubygems.org/gems/hydrafetch)[Source](https://github.com/Hydrafetch/ruby-sdk)

### Rust

`$cargo add hydrafetch`
[crates.io](https://crates.io/crates/hydrafetch)[Source](https://github.com/Hydrafetch/rust-sdk)

### PHP

`$composer require hydrafetch/hydrafetch`
[Packagist](https://packagist.org/packages/hydrafetch/hydrafetch)[Source](https://github.com/Hydrafetch/php-sdk)

For company logos in a browser there are two more, built for a publishable key rather than a secret one. Logos are metered against your plan's logo pulls and never touch your credit balance.

- [@hydrafetch/client-sdk](https://github.com/Hydrafetch/client-sdk)

- [@hydrafetch/react](https://github.com/Hydrafetch/react-sdk)

[ Frameworks ]

## Or call it from your own pipeline.

These use the HTTP API rather than MCP, through the official clients. There are six of them — Node, Python, Go, Ruby, Rust and PHP — and each is a thin wrapper over the same endpoints, so plain HTTP remains a first-class way to call us.

### LangChain

A document loader that hands your splitter clean Markdown instead of the tag soup a raw HTTP loader returns. One batch job fetches every URL in parallel.

`$pip install hydrafetch`

hydrafetch_loader.py

```
from hydrafetch import Hydrafetch
from langchain_core.documents import Document

def load(urls: list[str]) -> list[Document]:
 with Hydrafetch() as hf:
 job = hf.batch(urls, scrapeOptions={"onlyMainContent": True})

 return [
 Document(
 page_content=page["data"]["markdown"],
 metadata={"source": page["data"]["finalUrl"], **page["data"]["metadata"]},
 )
 for page in job["pages"]
 if page.get("data")
 ]
```

### LlamaIndex

The same idea as a reader, so pages arrive stripped of navigation and boilerplate before they ever reach your index.

`$pip install hydrafetch`

hydrafetch_reader.py

```
from hydrafetch import Hydrafetch
from llama_index.core import Document
from llama_index.core.readers.base import BaseReader

class HydrafetchReader(BaseReader):
 def __init__(self) -> None:
 self.hf = Hydrafetch()

 def load_data(self, urls: list[str]) -> list[Document]:
 job = self.hf.batch(urls, scrapeOptions={"onlyMainContent": True})

 return [
 Document(text=page["data"]["markdown"], metadata=page["data"]["metadata"])
 for page in job["pages"]
 if page.get("data")
 ]
```

### Vercel AI SDK

A tool your model can call mid-conversation when it needs a page it has not seen.

`$npm install @hydrafetch/node-sdk`

tools.ts

```
import { Hydrafetch } from '@hydrafetch/node-sdk';
import { tool } from 'ai';
import { z } from 'zod';

const hf = new Hydrafetch(process.env.HYDRAFETCH_API_KEY);

export const readPage = tool({
 description: 'Read a web page and return it as clean Markdown.',
 parameters: z.object({ url: z.string().url() }),
 execute: async ({ url }) => hf.markdown(url),
});
```

[06 / Where it fits]

## The answer is already in your repo. Ask your own agent.

Paste this into Claude Code, Cursor, or anything that reads your repository. It finds the scraping code worth deleting, asks what is on your roadmap, and answers with file paths and a credit estimate.

prompt

```
Read https://hydrafetch.com/.well-known/agent-skills/where-to-use-hydrafetch/SKILL.md and follow it against this codebase.

Tell me where Hydrafetch would replace scraping or parsing code I already have, and where it would add something this project cannot do today. Include the file paths, an estimated monthly credit cost, and be explicit about anywhere it would not be worth it.
```

What it looks for

A parser per site

One schema replaces the directory

Proxy pools, 403 retries

The fetch ladder is the product

Raw HTML in a prompt

You are paying for markup tokens

Logo and colour scraping

One brand call, resolved

The skill reads our live endpoint list when it runs, so it covers anything we ship after you paste this. [Read it first](https://hydrafetch.com/.well-known/agent-skills/where-to-use-hydrafetch/SKILL.md).

[ FAQ ]

## Before you wire it up.

The longer answers live in the [docs](https://docs.hydrafetch.com/).

Do I need an API key, or can I sign in?

Either. Clients that speak the MCP OAuth flow, such as Claude Code, Cursor and OpenCode, can point at the endpoint and sign in through the browser. Everything else sends an API key as a bearer token. The two are equivalent in what they can do.

What does a tool call cost?

The same as the matching HTTP endpoint. A page is one credit whatever it took to fetch, extract and brand are five, and a failed call costs nothing. Connecting over MCP never costs more than calling the API directly.

Can my whole team share one connection?

An API key belongs to the workspace, so a key in a shared config works for everyone and the usage lands on the same balance. Signing in with OAuth ties the connection to you inside that workspace.

My client is not listed. Will it work?

Almost certainly. The endpoint is a standard streamable HTTP MCP server, so any client that can take a URL and an Authorization header can use it. The listed configs are just the shapes each client expects.

[ Start ]

## Point your agent at it in under a minute.

Six tools, one endpoint, and the same credit cost as calling the API directly.

[Get API key](https://app.hydrafetch.com/)[Read the docs](https://docs.hydrafetch.com/)
