# Set up Trawl in your client

The steps for Claude Code, Claude app, Cursor, ChatGPT, Codex CLI, VS Code, Windsurf, Gemini CLI, Claude Agent SDK, OpenAI Agents SDK, Vercel AI SDK, LangChain, REST: one MCP URL, a sign-in in the browser, or an API key.

Paste this into your agent:

```text
Fetch https://trawlmcp.com/setup.md and follow it to set me up with Trawl.
```

Or set it up yourself. Server URL: `https://mcp.trawlmcp.com`

- [Claude Code](#claude-code) · [Claude app](#claude-app) · [Cursor](#cursor) · [ChatGPT](#chatgpt) · [Codex CLI](#codex) · [VS Code](#vscode) · [Windsurf](#windsurf) · [Gemini CLI](#gemini-cli)
- In code: [Claude Agent SDK](#claude-agent-sdk) · [OpenAI Agents SDK](#openai-agents-sdk) · [Vercel AI SDK](#vercel-ai-sdk) · [LangChain](#langchain) · [REST](#rest)

## Claude Code

1. Run the line below in a terminal.
2. Then run /mcp, pick trawl, choose Authenticate and click Allow in the browser.

Terminal

```sh
claude mcp add --transport http trawl https://mcp.trawlmcp.com
```

### With an API key

Terminal, with the key in your environment

```sh
claude mcp add --transport http trawl https://mcp.trawlmcp.com --header 'Authorization: Bearer ${TRAWL_API_KEY}'
```

**What you see next.** Sign in in the browser that opens and click Allow. The trawl tools appear once your client has connected.

From the client’s documentation ([source](https://code.claude.com/docs/en/mcp)). Run on 3 December 2026 up to the sign-in.

## Claude app

1. In Claude (web or desktop), go to **Customize**, then **Connectors**, select **+ Add** and then **Add custom connector**.
2. Enter the name Trawl and the URL below, then select **Continue**.
3. Under **Authentication** choose **Sign in now**, keep **Use Claude’s published identity (Recommended)**, and select **Add**.
4. In a chat, turn Trawl on under **+**, then **Connectors**.
5. On Team and Enterprise, an Owner adds it under **Organization settings**, then **Connectors**; members select **Connect**.

Remote MCP server URL

```text
https://mcp.trawlmcp.com
```

### With an API key

Choose **No sign in** under **Authentication**, and under **Request headers** add a **Custom header** named `Authorization` with the value `Bearer ` and your key, typed in Claude’s settings, never in a chat.

Request headers, as a custom header

```text
Authorization: Bearer <your API key>
```

**What you see next.** Sign in in the browser that opens and click Allow. The trawl tools appear once your client has connected.

From the client’s documentation ([source](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp)), 3 December 2026.

## Cursor

1. Copy the line below into ~/.cursor/mcp.json, inside "mcpServers".
2. Click Add to Cursor, or add this entry to ~/.cursor/mcp.json. Then sign in to trawl in Cursor’s MCP settings.

[Add to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=trawl&config=eyJ1cmwiOiJodHRwczovL21jcC50cmF3bG1jcC5jb20ifQ==)

~/.cursor/mcp.json, inside "mcpServers"

```json
"trawl": {"url": "https://mcp.trawlmcp.com"}
```

### With an API key

~/.cursor/mcp.json, inside "mcpServers"

```json
"trawl": {"url": "https://mcp.trawlmcp.com", "headers": {"Authorization": "Bearer ${env:TRAWL_API_KEY}"}}
```

**What you see next.** Sign in in the browser that opens and click Allow. The trawl tools appear once your client has connected.

From the client’s documentation ([source 1](https://docs.grok.com/build/agents-window/mcp), [source 2](https://docs.grok.com/build/agents-window/mcp/install-links)), 3 December 2026.

## ChatGPT

1. In ChatGPT on the web, go to **Plugins**, select the plus button and then **Add custom MCP server**.
2. Enter the name Trawl and, under **Connection**, the server URL below.
3. Choose **OAuth** for authentication, review the warning, tick **I understand and want to continue**, and select **Create as a plugin**.
4. Available on ChatGPT Business, Enterprise, Edu and Pro, on the web.

Server URL

```text
https://mcp.trawlmcp.com
```

**What you see next.** Sign in in the browser that opens and click Allow. The trawl tools appear once your client has connected.

From the client’s documentation ([source 1](https://help.openai.com/en/articles/12584461-developer-mode-and-full-mcp-connectors-in-chatgpt), [source 2](https://developers.openai.com/api/docs/guides/developer-mode)), 3 December 2026.

## Codex CLI

1. Run the line below in a terminal.
2. Then run codex mcp login trawl and click Allow in the browser (--no-browser prints the link instead).

Terminal

```sh
codex mcp add trawl --url https://mcp.trawlmcp.com
```

### With an API key

Terminal, with the key set where Codex starts

```sh
codex mcp add trawl --url https://mcp.trawlmcp.com --bearer-token-env-var TRAWL_API_KEY
```

**What you see next.** Sign in in the browser that opens and click Allow. The trawl tools appear once your client has connected.

From the client’s documentation ([source](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)). Run on 3 December 2026 up to the sign-in link.

## VS Code

1. Copy the line below into .mcp.json or ~/.copilot/mcp-config.json, inside "mcpServers".
2. Run MCP: Add Server, choose HTTP, paste the URL, enter trawl, then choose Global and Copilot Global. Or add this entry next to your other servers. Sign in when VS Code asks.

.mcp.json or ~/.copilot/mcp-config.json, inside "mcpServers"

```json
"trawl": {"type": "http", "url": "https://mcp.trawlmcp.com"}
```

### With an API key

.mcp.json or ~/.copilot/mcp-config.json, inside "mcpServers"

```json
"trawl": {"type": "http", "url": "https://mcp.trawlmcp.com", "headers": {"Authorization": "Bearer ${TRAWL_API_KEY}"}}
```

**What you see next.** Sign in in the browser that opens and click Allow. The trawl tools appear once your client has connected.

From the client’s documentation ([source](https://code.visualstudio.com/docs/agent-customization/mcp-servers)), 3 December 2026.

## Windsurf

1. Run the line below in a terminal.
2. Then run devin mcp login trawl, or sign in under Customize, then MCPs.

Terminal (Devin Desktop)

```sh
devin mcp add -s user trawl https://mcp.trawlmcp.com
```

### With an API key

.devin/mcp_config.local.json (not committed), inside "mcpServers"

```json
"trawl": {"url": "https://mcp.trawlmcp.com", "transport": "http", "headers": {"Authorization": "Bearer <your key, typed by you>"}}
```

**What you see next.** Sign in in the browser that opens and click Allow. The trawl tools appear once your client has connected.

From the client’s documentation ([source](https://docs.devin.ai/desktop/devin-local/customizations)), 3 December 2026.

## Gemini CLI

1. Run the line below in a terminal.
2. Start Gemini CLI and run `/mcp auth trawl`; sign-in opens a browser on the same machine.

Terminal

```sh
gemini mcp add --transport http -s user trawl https://mcp.trawlmcp.com
```

### With an API key

Set `TRAWL_API_KEY` in your environment; Gemini CLI resolves `${TRAWL_API_KEY}` in settings.json when it loads them.

~/.gemini/settings.json, inside "mcpServers"

```json
"trawl": {"httpUrl": "https://mcp.trawlmcp.com", "headers": {"Authorization": "Bearer ${TRAWL_API_KEY}"}}
```

**What you see next.** Sign in in the browser that opens and click Allow. The trawl tools appear once your client has connected.

From the client’s documentation ([source 1](https://geminicli.com/docs/tools/mcp-server/), [source 2](https://geminicli.com/docs/reference/configuration/)), 3 December 2026.

## Claude Agent SDK

1. Install the SDK: `npm install @anthropic-ai/claude-agent-sdk`.
2. Create an API key on your Trawl account page (it is shown once) and set it as `TRAWL_API_KEY` in the environment the code runs in; never put it in the code.
3. Pass the server in `mcpServers` and allow its tools.

TypeScript

```ts
import { query } from '@anthropic-ai/claude-agent-sdk';

for await (const message of query({
  prompt: 'What does @nasa post on X this week?',
  options: {
    mcpServers: { trawl: { type: 'http', url: 'https://mcp.trawlmcp.com', headers: { Authorization: `Bearer ${process.env.TRAWL_API_KEY}` } } },
    allowedTools: ['mcp__trawl__*'],
  },
})) {
  if (message.type === 'result' && message.subtype === 'success') console.log(message.result);
}
```

**What you see next.** The first call reads with your key. A missing or wrong key answers `unauthorized` and is not charged. The SDK runs no browser sign-in of its own; it can also use a sign-in made in Claude Code on the same machine.

From the client’s documentation ([source](https://code.claude.com/docs/en/agent-sdk/mcp)). Run with a test key on 3 December 2026.

## OpenAI Agents SDK

1. Install the SDK: `pip install openai-agents`.
2. Create an API key on your Trawl account page (it is shown once) and set it as `TRAWL_API_KEY` in the environment the code runs in; never put it in the code.
3. Open the server with `MCPServerStreamableHttp` and give it to the agent.

Python

```py
import asyncio, os
from agents import Agent, Runner
from agents.mcp import MCPServerStreamableHttp

async def main():
    params = {"url": "https://mcp.trawlmcp.com", "headers": {"Authorization": f"Bearer {os.environ['TRAWL_API_KEY']}"}}
    async with MCPServerStreamableHttp(name="trawl", params=params) as trawl:
        agent = Agent(name="Assistant", mcp_servers=[trawl])
        result = await Runner.run(agent, "What does @nasa post on X this week?")
        print(result.final_output)

asyncio.run(main())
```

**What you see next.** The first call reads with your key. A missing or wrong key answers `unauthorized` and is not charged. For a sign-in instead of a key, the SDK takes an `httpx.Auth` object in `params["auth"]`.

From the client’s documentation ([source](https://openai.github.io/openai-agents-python/mcp/)). Run with a test key on 3 December 2026.

## Vercel AI SDK

1. Install the MCP client: `npm install @ai-sdk/mcp`.
2. Create an API key on your Trawl account page (it is shown once) and set it as `TRAWL_API_KEY` in the environment the code runs in; never put it in the code.
3. Create the client, pass its tools to `generateText` or `streamText`, and close it when you are done.

TypeScript

```ts
import { createMCPClient } from '@ai-sdk/mcp';

const trawl = await createMCPClient({
  transport: { type: 'http', url: 'https://mcp.trawlmcp.com', headers: { Authorization: `Bearer ${process.env.TRAWL_API_KEY}` } },
});
const tools = await trawl.tools();
// … generateText({ model, tools, prompt }) …
await trawl.close();
```

**What you see next.** The first call reads with your key. A missing or wrong key answers `unauthorized` and is not charged. For a sign-in instead of a key, the transport takes an `authProvider` (an OAuth client provider from the MCP TypeScript SDK).

From the client’s documentation ([source](https://ai-sdk.dev/docs/ai-sdk-core/mcp-tools)). Run with a test key on 3 December 2026.

## LangChain

1. Install LangChain with its MCP support: `pip install "langchain[mcp]"`.
2. Open the server with `MCPAdapter`. With `auth="oauth"` it runs the sign-in in your browser; with a key, set `TRAWL_API_KEY` and pass it as `auth` instead.

Python

```py
from fastmcp.client import Client
from langchain.agents import create_agent
from langchain.mcp import MCPAdapter

async def load():
    async with MCPAdapter(Client("https://mcp.trawlmcp.com", auth="oauth")) as trawl:
        tools = await trawl.list_tools()
        return create_agent("claude-sonnet-5", tools)
```

### With an API key

Create an API key on your Trawl account page (it is shown once) and set it as `TRAWL_API_KEY` in the environment the code runs in; never put it in the code.

Python, in place of the client above

```py
Client("https://mcp.trawlmcp.com", auth=os.environ["TRAWL_API_KEY"])
```

**What you see next.** Sign in in the browser that opens and click Allow. The trawl tools appear once your client has connected.

From the client’s documentation ([source 1](https://docs.langchain.com/oss/python/langchain/mcp), [source 2](https://docs.langchain.com/oss/python/langchain/mcp/auth)). The API-key path was run on 3 December 2026.

## REST

1. For agents without MCP: create an API key on your Trawl account page (it is shown once) and set it as `TRAWL_API_KEY` in the environment the code runs in; never put it in the code.
2. The free `account` call answers with the balance and every price; the read tools are `POST https://mcp.trawlmcp.com/v1/<tool>` with the tool’s JSON input. The [tool reference](/docs/tools) has every input.

.env and a first request

```sh
TRAWL_API_KEY=trawl_live_…
curl -s -H "Authorization: Bearer $TRAWL_API_KEY" https://mcp.trawlmcp.com/v1/account
```

**What you see next.** The first call reads with your key. A missing or wrong key answers `unauthorized` and is not charged.

From the client’s documentation ([source](https://mcp.trawlmcp.com/openapi.json)). Run with a test key on 3 December 2026.

---
Updated 2026-12-03. HTML version: https://trawlmcp.com/setup
