Expand AI logo
DocsDocs
Glow Active
API Reference
Login

Documentation

Get started

IntroductionWhy ExpandQuickstartAuthenticationConnect your agent (MCP)

Products

OverviewFetching a URLBatched Fetch
API reference

SDKs & tools

TypeScript SDK
MCP tools & resourcesDocs for agents

Reference

API referenceErrors & retriesPricing & UsageLimitsConcurrency tiersFAQ
Browse docs

Get started

IntroductionWhy ExpandQuickstartAuthenticationConnect your agent (MCP)

Products

OverviewFetching a URLBatched Fetch
API reference

SDKs & tools

TypeScript SDK
MCP tools & resourcesDocs for agents

Reference

API referenceErrors & retriesPricing & UsageLimitsConcurrency tiersFAQ

Connect your agent (MCP)

Add Expand's hosted MCP server to Claude Code, Codex, Cursor, fx, or any MCP client. Nothing to install, and you sign in through the browser.

Expand runs a hosted MCP server. You point your agent at one URL and approve it in the browser. Your agent can then fetch any page as rendered Markdown, with a citation link for every line.

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

There is nothing to install. No Node, no CLI, and no API key in a config file. The hosted server is the same server the CLI runs locally with expandai mcp run, and it calls the same Fetch API, so your agent gets a real browser, JavaScript execution, State JSON, and a link back to the page for every line.

Recommendation
The fastest route is the one-prompt setup, which also installs the Expand Skill and, for OpenCode, a web-fetch hook. Use this page when you want to add the MCP server yourself.

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 expand to sign in. Your browser opens, you approve, and the tools are live.

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

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

{
  "




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 Markdown and a Sources block that links to Expand's Snapshot of the page. If the agent returns an empty page or raw HTML, it used its own fetch tool rather than Expand's.

Sign in

The first tool call starts the sign-in. Your agent opens a browser, you approve, and the client stores the token. There is no API key to copy and nothing secret written into your agent's config file.

If a client loses its authorization, run its sign-in step again (/mcp in Claude Code, codex mcp login expand in Codex, fx mcp auth expand in fx) and the browser flow repeats.

Use an API key instead

For CI, scripts, or a client that cannot sign in through the browser, send an Expand API key as a bearer token in the Authorization header of the client config. The config entry, and where to create a key, are on Authentication.

Tools your agent gets

ToolDefinition
fetchFetches a URL in a real browser and returns the Main Markdown, the State JSON, and the Snapshot, with a ready-made citation block. Page meta tags only with includeMeta.
get_snapshotRead a public Snapshot catalog, or add highlights for Snapshot Highlights. Highlights a page you already fetched, by Snapshot ID, without a new Fetch.

Full parameters and return shapes are on MCP tools & resources.

Troubleshooting

The client cannot connect, or reports a closed connection. Confirm the URL is exactly https://api.expand.ai/v1/mcp and that the client treats it as an HTTP server, not a command to run. A client set up to start a local process reports a closed connection when there is no such process.

The agent still uses its own web fetch. Some clients prefer their built-in tool. Name Expand in the prompt. In OpenCode, install the web-fetch hook so the built-in tool goes through Expand. See CLI: Skill & hooks.

When you want more than MCP

The hosted server covers the common case. The CLI adds what a remote server cannot do: routing your agent's own web-fetch tool through Expand, fetching from a terminal, and running through a proxy set in your environment. See CLI: Skill & hooks.

Next steps

  • MCP tools & resources: full parameters and return shapes.
  • CLI: Skill & hooks: route your agent's own web-fetch tool through Expand, or fetch from a terminal.
  • Authentication: use an API key instead of browser sign-in.
  • Docs for agents: give your agent Expand's docs, through start.md, llms.txt, or Markdown pages.
PreviousAuthentication
NextFetch: Overview

On This Page

Add it to your agentCheck it workedSign inUse an API key insteadTools your agent getsTroubleshootingWhen you want more than MCPNext steps
mcpServers
"
: {
"expand": {
"url": "https://api.expand.ai/v1/mcp"
}
}
}

Sign in when Cursor asks.

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

Any client that takes a Streamable HTTP MCP server takes the URL directly. Put it in the client's MCP config and sign in when the client asks. For a client that cannot sign in through the browser, see Use an API key instead.

fetch_appendix
Reads the navigation, footers, and related-content blocks that were moved to the Appendix, from the stored Snapshot.