Tools and optional documentation resources exposed by the Expand MCP server.
The Expand MCP server gives an agent two native Fetch tools — fetch and fetch_search — and, with a flag, two documentation resources. It runs locally over stdio:
expandai mcp runMost clients should launch this command from their MCP config, not from a terminal. Authenticate once with expandai login; the server reuses your local CLI credentials.
{
"mcpServers": {
"expandai": {
"type
Different clients name the surrounding fields differently. See Other MCP Clients for JSON and TOML variants, or use a first-class installer for Claude Code, Cursor, Codex, or OpenCode.
The server registers two tools. Both are read-only and non-destructive.
| Tool | What it does |
|---|---|
fetch | Captures a URL in a browser and returns Markdown, optional page metadata, State JSON, appendix, and optional Highlights snippets. |
fetch_search | Runs Highlights against an existing snapshot by snapshotId, without capturing the page again. |
fetchFetches and extracts content from any URL. The response is object-mode output: rendered Markdown, front-matter metadata, and the extracted State JSON evidence. When you pass search, the response also carries ranked snippets under data.search.snippets.
| Parameter | Type | Default | Description |
|---|---|---|---|
url | string | — | The URL to fetch content from. |
search | object | omitted | Highlights configuration (see below). When set, the response returns ranked snippets. |
The search object takes:
| Field | Type | Default | Description |
|---|---|---|---|
query | string | — | Highlights query. When provided, fetch returns snippets for this query. |
maxResults | integer (1–50) |
Example call:
{
"name": "fetch",
"arguments": {
"url": "https://news.ycombinator.com",
"includeMeta": true,
"search": { "query": "top front-page stories"
The result includes meta (with snapshotId and a playground link), markdown, the State JSON json evidence array, and — because search was set — data.search.snippets. Keep the returned snapshotId if you want to run more Highlights queries later without re-capturing the page.
fetch_searchSearches a previous fetch by snapshotId without starting a new capture. Use it after a fetch call when you need additional evidence from the same page — it reuses the stored artifacts instead of paying for another browser capture.
| Parameter | Type | Default | Description |
|---|---|---|---|
snapshotId | string | — | Snapshot ID returned by a previous fetch response. |
search | object | — |
The result returns the snapshotId, the ranked search snippets, a durationMs timing, and a whole-snapshot playground link.
Every Highlights snippet — from fetch or fetch_search — carries a citationUrl: a public Playground link that opens the exact passage so a human can audit it. Snippets also expose:
| Field | Description |
|---|---|
source | Where the snippet came from: markdown, appendix, or statejson. |
text | The matched passage. |
json | The extracted value, present when source is . |
Return the citationUrl to the user verbatim whenever you ground a claim in fetched content, so the source stays verifiable.
Add --docs to also expose two local documentation resources alongside the tools:
expandai mcp run --docs| Resource | Name | Contents |
|---|---|---|
expand://about | About expand.ai | Key links: website, docs, and dashboard. |
expand://start | Expand Start Guide | A local copy of the agent and editor setup guide, including the expandai login step and per-host install commands. |
First-class installers do not enable --docs by default. Do not assume expand://start exists unless the configured MCP command includes --docs.
{
"mcpServers": {
"expandai": {
"type": "stdio",
"command": "expandai",
"args": ["mcp", "run", "--docs"]
}
For local MCP clients, run expandai login once in your terminal. The server uses the same local Expand credentials as the CLI, so there is no API key in your config:
expandai login
expandai whoamiKeep EXPAND_API_KEY out of the primary local config. API keys belong in CI, servers, direct API calls, and other non-interactive setups. For environment-variable configuration, see CLI Commands.
The MCP tools are a thin surface over the Fetch HTTP API. fetch calls JSON-mode Fetch; fetch_search calls the Highlights endpoint. For exact request and response schemas, error responses, and generated examples, open the API Reference — specifically Fetch (JSON mode) and Highlights.
includeMeta | boolean | false | Include page meta tags (title, description, Open Graph). |
includeAppendix | boolean | false | Include extracted links and sidebar content. |
includeJson | boolean | true | Include State JSON extracted from network responses and the DOM. |
5| Maximum snippets to return. |
minScore | number (0–1) | 0 | Minimum snippet relevance score. |
Highlights configuration: query, maxResults (1–50, default 5), minScore (0–1, default 0). |
includeMarkdown | boolean | true | Search the stored Markdown corpus. |
includeAppendix | boolean | false | Search extracted appendix content. |
includeJson | boolean | true | Search stored State JSON. |
statejsonscore | Relevance score from 0 to 1. |
citationUrl | Public Playground link auditing this exact snippet. |