Skip to content
Crawlune

Local API and MCP server

Crawlune Pro exposes the running app over HTTP on your own machine, so scripts can start crawls and read every result, and AI assistants can use Crawlune as a tool through the Model Context Protocol. Nothing leaves your computer: the listener binds to 127.0.0.1 only and every request carries a token the app generated.

1. Turn it on

  1. In Crawlune, open Settings → Integrations → Local API and MCP server and tick Enable the local API. The status next to it reads Listening.
  2. Copy the token. The default port is 7420; change it there if something else uses it.
  3. Try it:
curl -H "Authorization: Bearer YOUR_TOKEN" http://127.0.0.1:7420/v1/status

The API answers JSON. Errors look like {"error": "busy", "message": "…"} with a matching HTTP status (401 wrong token, 403 feature needs Pro, 404, 409 conflict).

2. Run a crawl from a script

API=http://127.0.0.1:7420/v1
AUTH="Authorization: Bearer YOUR_TOKEN"

curl -s -H "$AUTH" -H "content-type: application/json" \
  -d '{"url": "https://example.com", "maxUrls": 500}' $API/crawl

# poll until the state is "finished"
curl -s -H "$AUTH" $API/status | jq .crawl.state

# then read the results
curl -s -H "$AUTH" "$API/issues" | jq '.issues[] | [.id, .count]'
curl -s -H "$AUTH" "$API/pages?issue=title_missing&limit=50" | jq '.pages[].url'
curl -s -H "$AUTH" "$API/plan" | jq '.actions[:5]'

One crawl runs at a time, the same one you see in the window. Finished crawls land in the library like any other, so the saved-crawl routes, comparisons and trends all apply.

3. Routes

RouteWhat it does
GET /v1Route index and app version.
GET /v1/statusCrawl state and progress; once pages exist, the overview (totals, status codes, indexability, errors, warnings, opportunities, health).
POST /v1/crawlStart a crawl. Body is a crawl config in JSON: startUrl (or url), maxUrls, maxDepth, mode (spider | sitemap), jsRender, includeSubdomains, crawlResources and any other setting the app has. Returns 202, or 409 while a crawl runs.
POST /v1/crawl/stop · /pause · /resumeControl the running crawl.
GET /v1/issues?category=Checks with findings: id, category, severity, title, why, fix, count.
GET /v1/issues/{check}?limit=&offset=One check and its affected pages (also answers for checks with no findings).
GET /v1/pages?issue=&search=&url=&internal=&kind=&status=&limit=&offset=Crawled URLs with every column. status takes 2xx, 3xx, 4xx, 5xx, none or a code; kind is html, image, css, script, pdf or other; url matches one page ignoring scheme, www and the trailing slash. limit defaults to 100, at most 5,000.
GET /v1/pages/{id}Everything about one page: fields, headings, links in and out, images, hreflang, structured data, issues, integration metrics.
GET /v1/pages/{id}/html?rendered=1Stored HTML source, or the rendered DOM when the crawl rendered JavaScript.
GET /v1/planThe action plan: issues ranked by health points recovered and link equity, with effort and the most-linked affected URLs.
GET /v1/checks?category= · /v1/checks/{check}The catalogue of checks with their explanations.
GET /v1/librarySaved crawls.
POST /v1/library/saveSave the current crawl; body {"name": "…"} is optional.
POST /v1/library/{id}/openLoad a saved crawl into the workspace.

Page rows and details use the same field names as the app's CSV export (camelCase). Send the token either as a bearer header or as ?token=.

4. MCP server for AI assistants

The app binary doubles as an MCP server over stdio. Claude Desktop, Claude Code, Cursor and any other MCP client can run crawls and ask questions about the results. The server talks to the running app's local API, so keep Crawlune open with the API enabled.

Settings → Integrations shows the exact snippet for your installation with the copy button. It looks like this on macOS:

{
  "mcpServers": {
    "crawlune": {
      "command": "/Applications/Crawlune.app/Contents/MacOS/crawlune",
      "args": ["mcp"]
    }
  }
}

Then ask things like "Crawl example.com and tell me the three fixes with the biggest impact", "Which pages are missing a meta description?" or "What does the canonical_mismatch check mean?".

Tools

ToolArguments
start_crawlurl, max_urls, max_depth, include_subdomains, js_render, mode, crawl_resources
wait_for_crawltimeout_seconds
crawl_status—
stop_crawl—
list_issuescategory
issue_pagescheck, limit, offset
list_pagessearch, check, status, kind, internal, limit, offset
page_detailsid or url
page_htmlid, rendered
action_plan—
explain_checkcheck
list_checkscategory
list_saved_crawls—
open_saved_crawlid
save_crawlname

5. Headless on a server

The same API runs without a window: crawlune serve --port 7420 starts it on a machine where the Pro licence is activated (activate with the app once, or crawlune licence shows the state). Crawls started this way are saved to that machine's library. To point an MCP client at it, set CRAWLUNE_API_URL and CRAWLUNE_API_TOKEN in the client's environment; the listener still accepts local connections only, so tunnel with SSH for remote use.

Security