The local setup path — install the Expand CLI to intercept your agent's web fetch, add the Expand Skill, and fetch from a terminal.
The MCP server is the fastest way to give an agent Fetch, and it needs nothing installed. This page covers what the local CLI adds on top of it.
Reach for the CLI when you want one of these:
WebFetch through Expand, so the agent gets rendered Markdown without being told to use a specific tool.expandai fetch <url> for you, or for agents that prefer shell commands over MCP tools.HTTP_PROXY and HTTPS_PROXY, which some environments require.npm install -g expandai
expandai loginexpandai login opens a browser, you approve, and the credentials are stored under your user profile — ~/.config/expandai/config.json on macOS and Linux, %APPDATA% on Windows. No API key is written into any agent's config file.
Prefer not to install globally? Every command works through npx -y expandai ….
expandai init detects the agents on your machine and configures the ones you choose.
expandai init --detectOr configure one directly. hook install is the fuller setup for agents that support hooks: it installs the hook, the skill, and registers the MCP server in a single step.
| Agent | Command | What it configures |
|---|---|---|
| Claude Code | expandai hook install claude-code project | WebFetch hook, WebFetch deny rule, Expand Skill, MCP server |
| OpenCode | expandai hook install opencode project | Web-fetch hook, Expand Skill, MCP server |
Scope is project or global. Project scope writes into the current repository so collaborators inherit it; global scope applies to every session on the machine.
A hook intercepts the agent's built-in web-fetch tool before it runs and routes the URL through Expand instead. On Claude Code the installer also adds WebFetch to permissions.deny, which removes the built-in tool from the toolset entirely. Denying it rather than intercepting every call is what keeps a refusal error out of the transcript on each fetch; the hook stays installed as a fallback in case the deny rule is removed.
This is the one capability the hosted MCP server cannot provide. A remote server can offer tools, but it cannot change what the agent's own tools do.
expandai status # what is configured, and where
expandai whoami # which organization you are signed in as
expandai uninstall # remove hooks, skill, and MCP entriesexpandai mcp run starts the same MCP server over stdio, authenticated with your CLI login rather than the browser flow. It exists for offline work and for networks where an editor cannot reach an external endpoint directly.
{
"mcpServers": {
"expandai": {
"command": "expandai",
"args": ["mcp", "run"]
}
}
}For everything else, prefer the hosted server: it needs no local process, so it cannot fail because of a Node version, a missing npx, or a permissions problem on the credential file.
Everything above works on Windows without an elevated shell. The CLI stores credentials under your user profile and tightens the file's ACL when it can; when Windows declines that change — which it does for a non-elevated account — the CLI logs a warning and carries on rather than failing the command.
| Cursor |
expandai init --harness cursor --scope project |
| Expand Skill, MCP server |
| Codex | expandai init --harness codex --scope project | Expand Skill, MCP server |