Expand AI logo
DocsDocs
Glow Active
API Reference
Login

Documentation

Get Started

OverviewWhy ExpandQuickstartWays to Use Expand

Agent Quickstarts

OverviewExpand SkillClaude CodeCursorCodexOpenCodeSkill-Based AgentsOther MCP Clients

Fetch

OverviewHow Fetch WorksOutput ModelInclude OptionsBrowser BehaviorHighlightsPlayground & ReplayBatched Fetch

Reference

API ReferenceCLI CommandsMCP Tools & ResourcesTypeScript SDKPython SDK

Account & Billing

Pricing & UsageTiersFAQ

Machine-Readable Docs

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

Get Started

OverviewWhy ExpandQuickstartWays to Use Expand

Agent Quickstarts

OverviewExpand SkillClaude CodeCursorCodexOpenCodeSkill-Based AgentsOther MCP Clients

Fetch

OverviewHow Fetch WorksOutput ModelInclude OptionsBrowser BehaviorHighlightsPlayground & ReplayBatched Fetch

Reference

API ReferenceCLI CommandsMCP Tools & ResourcesTypeScript SDKPython SDK

Account & Billing

Pricing & UsageTiersFAQ

Machine-Readable Docs

start.mdllms.txtllms-full.txtDocs as Markdown

Other MCP Clients

Configure Expand for MCP clients that are not covered by first-class agent pages.

Point any MCP-compatible agent at the local Expand MCP server and it gets Fetch as native tools. Use this page when your agent supports MCP but does not have a first-class Expand installer. The server runs over stdio through expandai mcp run.

Need the CLI first? Start with Quickstart or CLI Commands, then come back to configure your MCP client.

Authenticate once in your terminal:

expandai login

Then give your client this stdio config. The client launches the server; you do not run it yourself.

{
  "mcpServers": {
    "expandai"





: {
"type": "stdio",
"command": "expandai",
"args": ["mcp", "run"]
}
}
}

Most clients should not run expandai mcp run in your terminal directly. Put it in the client's MCP config so the client starts the server over stdio and owns its lifecycle.

Next: read MCP Tools & Resources for the full tool schemas, or jump to your first-class page if you use Claude Code, Cursor, Codex, or OpenCode.

Client config shapes

The command is always the same: command is expandai, args are ["mcp", "run"]. Only the surrounding schema changes between clients.

Claude-style JSON:

{
  "mcpServers": {
    "expandai": {
      "type": "stdio",
      "command": "expandai",
      "args": ["mcp", "run"]
    }
  }

OpenCode-style JSON:

{
  "mcp": {
    "expandai": {
      "type": "local",
      "command": ["expandai", "mcp", "run"],
      "enabled": true
    }

Codex-style TOML:

[mcp_servers.expandai]
command = "expandai"
args = ["mcp", "run"]
enabled = true

These are schema patterns, not a substitute for first-class setup pages. If you actually use Claude Code, Cursor, Codex, or OpenCode, use the dedicated page — the installer writes and maintains this config for you.

Optional docs resources

Add --docs when you want the MCP server to expose local documentation resources alongside the Fetch tools. This adds the expand://about and expand://start resources.

expandai mcp run --docs
{
  "mcpServers": {
    "expandai": {
      "type": "stdio",
      "command": "expandai",
      "args": ["mcp", "run", "--docs"]
    }

First-class installers do not enable --docs by default. Do not assume expand://start exists unless the configured MCP command includes --docs.

MCP tools overview

The raw MCP server exposes two tools. Read MCP Tools & Resources for parameters, schemas, and examples.

ToolUse
fetchFetch a URL and return Markdown, optional metadata, optional State JSON, optional appendix, and optional Highlights snippets.
fetch_searchTechnical tool name for Highlights on a previous snapshot by snapshotId, without fetching the URL again.

Search snippets include citationUrl; agents should return those links when grounding claims in fetched content.

Should I use this page?

Use this page if:

  • your MCP client is not Claude Code, Cursor, Codex, or OpenCode;
  • your client can launch a local stdio command;
  • you want native tool calls instead of shelling out through a skill.

Use another page if:

You useGo to
Claude CodeClaude Code
OpenCodeOpenCode
CursorCursor
Codex

Authentication

For local MCP clients, run expandai login once in your terminal. The MCP server uses the same local Expand credentials as the CLI, so the config carries no secrets.

Do not put EXPAND_API_KEY in the primary local config. API keys belong in CI, server, direct API, advanced, or non-interactive setups. If advanced users need environment variables, see MCP Tools & Resources or CLI Commands.

Troubleshooting

expandai is not found

Your MCP client may have a different PATH than your terminal. Use an absolute path to the expandai binary or configure the client's environment.

Authentication fails

Run expandai login, then verify with expandai whoami. Restart the MCP client after authentication if it keeps a long-running server process.

My client uses a different config shape

Keep the command the same and adapt the surrounding schema to your client's MCP format: command expandai, args ["mcp", "run"].

Docs resources are missing

Add --docs to the MCP server args if you want expand://about and expand://start.

Fetch works but search does not

Call fetch first, read the returned snapshot ID, then use Highlights through fetch_search with that snapshotId.

PreviousSkill-Based Agents
NextOverview

On This Page

Client config shapesOptional docs resourcesMCP tools overviewShould I use this page?AuthenticationTroubleshootingexpandai is not foundAuthentication failsMy client uses a different config shapeDocs resources are missingFetch works but search does not
}
}
}
}
}
Codex
No MCP supportSkill-Based Agents or Quickstart