Expand AI logo
DocsDocs
Glow Active
API Reference
Login

Documentation

Get Started

OverviewMCP ServerQuickstartWhy ExpandWays to Use Expand

Fetch

OverviewHow Fetch WorksOutput ModelProgressive DisclosureInclude OptionsDocumentsYouTubeBrowser BehaviorHighlightsPlayground & ReplayBatched Fetch

Reference

MCP Tools & ResourcesCLI, Skill & HooksCLI CommandsAPI ReferenceTypeScript SDK

Account & Billing

Pricing & UsageTiersFAQ

Machine-Readable Docs

start.mdllms.txtllms-full.txtDocs as Markdown
Browse docs

Get Started

OverviewMCP ServerQuickstartWhy ExpandWays to Use Expand

Fetch

OverviewHow Fetch WorksOutput ModelProgressive DisclosureInclude OptionsDocumentsYouTubeBrowser BehaviorHighlightsPlayground & ReplayBatched Fetch

Reference

MCP Tools & ResourcesCLI, Skill & HooksCLI CommandsAPI ReferenceTypeScript SDK

Account & Billing

Pricing & UsageTiersFAQ

Machine-Readable Docs

start.mdllms.txtllms-full.txtDocs as Markdown

MCP Server

Connect Expand to Claude Code, Cursor, Codex, or any MCP client with one command. Hosted, no install, browser sign-in.

Expand runs a hosted MCP server. Point your agent at one URL, approve it in the browser, and your agent can fetch any page as rendered Markdown with citations.

https://api.expand.ai/v1/mcp

Nothing to install. No Node, no CLI, no API key in a config file. The server is the same one behind expandai fetch, so your agent gets the full Fetch pipeline: a real browser, JavaScript execution, State JSON, and an evidence link for every claim.

Add it to your agent

claude mcp add --transport http expand https://api.expand.ai/v1/mcp

Then run /mcp inside a Claude Code session and pick to authenticate. Your browser opens, you approve, and the tools are live.

expand

Add this to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project:

{
  "mcpServers": {
    "expand": {
      "url": "https://api.expand.ai/v1/mcp"
    }
  }
}

Cursor prompts you to sign in the first time a tool is called.

codex mcp add expand --url https://api.expand.ai/v1/mcp
codex mcp login expand

If this is your first HTTP MCP server in Codex, enable the client first by adding this to ~/.codex/config.toml:

[features]
experimental_use_rmcp_client = true

Open the Command Palette, run MCP: Add Server, choose HTTP, and enter the URL:

https://api.expand.ai/v1/mcp

Or add it directly to your user or workspace mcp.json:

{
  "servers": {
    "expand": {
      "type": "http",
      "url": "https://api.expand.ai/v1/mcp"
    }
  }
}

Any client that speaks Streamable HTTP takes the URL directly. For a client that only supports stdio servers, bridge to it:

{
  "mcpServers": {
    "expand": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.expand.ai/v1/mcp"]
    }
  }
}

handles the browser sign-in on the client's behalf.

Check it worked

Ask your agent to fetch something that a plain web-fetch tool cannot read:

Use Expand to fetch https://news.ycombinator.com and show me the first 10 lines of Markdown.

A working setup returns rendered Markdown and a Sources block linking to Expand's stored capture of the page. If the agent returns an empty page or raw HTML, it used its own fetch tool rather than Expand's.

Signing in

The first tool call triggers OAuth: your agent opens a browser, you approve access for your Expand organization, and the client stores the token. There is no API key to copy and nothing secret written into your agent's config file.

Tokens refresh on their own. If a client loses its authorization, re-run its sign-in step (/mcp in Claude Code, codex mcp login expand in Codex) and the browser flow repeats.

Using an API key instead

For CI, scripts, or a client with no OAuth support, send an Expand API key as a bearer token:

{
  "mcpServers": {
    "expand": {
      "url": "https://api.expand.ai/v1/mcp",
      "headers": {
        "Authorization": "Bearer xpnd_your_api_key"
      }
    }
  }
}

Create a key in the dashboard. Treat the config file as a secret when you do this — that is the reason browser sign-in is the default everywhere else.

Tools your agent gets

ToolWhat it does
fetchCaptures a URL in a real browser and returns Main Markdown, page metadata, and State JSON, with a ready-made citation block.
fetch_searchSearches a page you already fetched, by snapshotId, without spending another capture.
fetch_appendixReads navigation, footers, and related-content blocks that were moved out of the main Markdown, resolved from the stored snapshot.

Full parameters and return shapes are in MCP Tools & Resources.

Troubleshooting

The client reports connection closed or cannot connect. Confirm the URL is exactly https://api.expand.ai/v1/mcp and that the client is configured for an HTTP transport rather than a command. A client configured to spawn a local process will report a closed connection when no such process exists.

Sign-in never completes. The OAuth callback lands on http://127.0.0.1 on a port the client picks, so allow your agent through any local firewall prompt. If a stale authorization is cached, rm -rf ~/.mcp-auth clears mcp-remote's copy; other clients have their own sign-out.

The agent still uses its own web fetch. Some clients prefer a built-in tool. Name Expand in the prompt, or install the WebFetch hook so the built-in tool routes through Expand automatically.

When you want more than MCP

The hosted server covers the common case. The CLI adds things a remote server cannot do: intercepting your agent's own web-fetch tool, fetching from a terminal, and running against a restricted network through a proxy. See CLI, Skill & Hooks.

PreviousOverview
NextQuickstart

On This Page

Add it to your agentCheck it workedSigning inUsing an API key insteadTools your agent getsTroubleshootingWhen you want more than MCP
mcp-remote