MCP setup
The app already has the engine, the sessions and the cache. Let your coding agent use them over MCP, on this machine only.
On this page
Turn it on
Settings → Integrations, or the Connect an agent tile on the Overview screen. Toggle MCP server: the badge reads running, the endpoint shows beside it (http://127.0.0.1:<port>/mcp), and Copy endpoint puts it on the clipboard.
The MCP port field is used when the server starts — blank picks a free port and keeps it. Once started, the server comes back on at launch. It needs an active plan: without one the card says so instead of offering a start that can only fail.
Connect an agent
Three one-click paths, all on the Overview tile (or magpie init --client <client> for the standalone CLI server):
- Copy for Claude Code — Claude Code owns
~/.claude.json, so the button copies its own registration line; run it in a terminal. - Add to Claude Desktop — merges the
magpie-desktopstanza into Claude Desktop’s config; other servers and keys survive, and re-running is idempotent. - Add to Cursor — the same merge into Cursor’s MCP config.
Agents reach Magpie while the app is open. Change the port in Settings afterwards and you will need to add the server again — the copied registration carries the old one.
The thirteen tools
| Tool | Action |
|---|---|
scrape_url |
Fetch, clean, extract one URL — schema optional, actions DSL accepted |
crawl_site |
Crawl a site, or poll a previous run via run_id |
extract_structured |
Extract from HTML or Markdown, no fetch |
get_cached_selectors |
List learned selectors for a domain |
batch |
Scrape up to 100 URLs, Markdown only, zero LLM |
map |
List sitemap-derived URLs |
summarize |
Summarize one URL in at most N sentences |
diff |
Word-level diff of a URL against a previous snapshot |
brand |
Colors, fonts, logo, favicon — zero LLM |
list_extractors |
List the zero-LLM vertical extractors |
vertical_scrape |
Extract one URL with a named vertical |
search |
Web search via BYOK or keyless engines, optional scrape-through |
research |
Deep research with a cost cap; poll with run_id |
The server is stateless over Streamable HTTP — every request stands alone, so agents can be restarted mid-session without losing theirs.
Security
The listener binds 127.0.0.1 only — never the LAN, because the tools spend money. Web pages cannot reach it from a browser.
Require a token adds a bearer check: the token is copied, never displayed; New token invalidates the old one, and connected agents must reconnect. With the token off, any process on this machine can reach the server — fine on a single-user box, and the reason the toggle exists.
The desktop’s sessions and selector cache are shared: an agent’s scrape_url on a domain with a captured login rides it, and repeated extractions hit the cache instead of billing. For the standalone CLI server — magpie serve on stdio or HTTP — see the CLI reference.