Skip to content

MCP Tools

The hosted unsurf MCP server registers six default tools plus up to two conditional tools. The local stdio server adds two browser-runtime tools.

ToolAvailability
scoutAlways
workerAlways
healAlways
galleryAlways
directoryRequires VECTORS + AI bindings
agent-scoutRequires ANTHROPIC_API_KEY

The separate local stdio server, unsurf-local-mcp, adds two browser-session tools for nearby agents:

ToolAvailability
unsurf_local_sessionsLocal only
unsurf_local_executeLocal only

List attachable page tabs from the local Chrome/CDP runtime that unsurf-local-mcp can drive.

FieldTypeRequiredDescription
cdpPortnumberDevTools port to inspect. Defaults to 9222.
FieldTypeDescription
connectedbooleanWhether the local browser endpoint responded
sessionsarrayAttachable page targets with tab id, title, and URL

Execute a small browser action plan against the attached local Chrome runtime. Actions include goto, click, fill, wait, waitFor, snapshot, and screenshot. Set record: true plus task to route the run through unsurf’s recorder.

FieldTypeRequiredDescription
cdpPortnumberDevTools port to inspect. Defaults to 9222.
actionsarray✅Ordered browser action plan
recordbooleanRecord the run through unsurf
taskstringRequired when record=trueTrace/task label
visibility"private" | "public"Recording visibility grant policy

Explore a website and capture its API endpoints.

FieldTypeRequiredDescription
urlstring✅Target URL to scout
taskstring✅Natural language description of what to find
publishbooleanAuto-publish the scouted site to the directory after scouting
authobjectAuthentication config
auth.cookiesstringCookie header value
auth.headersRecord<string, string>Additional request headers
FieldTypeDescription
siteIdstringUnique identifier for the scouted site
endpointCountnumberNumber of unique endpoints captured
pathIdstringReplayable navigation path ID
openApiSpecobjectOpenAPI 3.1 specification
ErrorWhen
BrowserErrorBrowser container failed to launch or crashed
NetworkErrorTarget site unreachable
StoreErrorFailed to save results to D1/R2
{
"name": "scout",
"description": "Explore a website and capture every API call. Returns captured endpoints with inferred schemas and an OpenAPI spec.",
"inputSchema": {
"type": "object",
"required": ["url", "task"],
"properties": {
"url": { "type": "string", "description": "The URL to scout" },
"task": { "type": "string", "description": "What to look for, e.g. 'find all API endpoints'" },
"publish": { "type": "boolean", "description": "Auto-publish the scouted site to the directory after scouting" }
}
}
}

Execute a scouted path or replay a captured API endpoint.

FieldTypeRequiredDescription
pathIdstring✅ID of the path to execute
dataRecord<string, unknown>Data to pass to the endpoint
headersRecord<string, string>Custom headers (Authorization, Cookie, etc.) for authenticated endpoints
FieldTypeDescription
successbooleanWhether execution succeeded
responseunknownResponse body from the target API
ErrorWhen
NotFoundErrorPath ID does not exist
PathBrokenErrorPath is broken — target site changed
NetworkErrorTarget API unreachable
BrowserErrorBrowser fallback failed
{
"name": "worker",
"description": "Replay a scouted API path directly — no browser needed. Pass the pathId from a scout result. Include headers for authenticated endpoints.",
"inputSchema": {
"type": "object",
"required": ["pathId"],
"properties": {
"pathId": { "type": "string", "description": "The path ID from a scout result" },
"data": { "type": "object", "description": "Data to pass to the endpoint" },
"headers": { "type": "object", "description": "Custom headers (Authorization, Cookie, etc.) for authenticated endpoints" }
}
}
}

Re-scout and repair a broken path.

FieldTypeRequiredDescription
pathIdstring✅ID of the broken path
errorstringDescription of what went wrong
FieldTypeDescription
healedbooleanWhether the path was successfully repaired
newPathIdstringID of the new path (if changed)
ErrorWhen
NotFoundErrorPath ID does not exist
BrowserErrorRe-scout browser failed
NetworkErrorTarget site unreachable
{
"name": "heal",
"description": "Fix a broken path. Retries with backoff, then re-scouts and patches if needed.",
"inputSchema": {
"type": "object",
"required": ["pathId"],
"properties": {
"pathId": { "type": "string", "description": "The broken path ID" },
"error": { "type": "string", "description": "The error message that caused the break" }
}
}
}

Search the API gallery for previously unsurfed sites. Check here before scouting — someone may have already captured the API you need.

FieldTypeRequiredDescription
querystringSearch term (domain, endpoint path, or description)
domainstringExact domain to look up
FieldTypeDescription
resultsarrayMatching gallery entries
totalnumberNumber of results returned
{
"name": "gallery",
"description": "Search the API gallery for previously unsurfed sites. Check here before scouting — someone may have already captured the API you need.",
"inputSchema": {
"type": "object",
"properties": {
"query": { "type": "string", "description": "Search term (domain, endpoint path, or description)" },
"domain": { "type": "string", "description": "Exact domain to look up" }
}
}
}

Fingerprint-first API directory. Look up domains, browse capabilities, inspect endpoints, semantic search, or publish scouted sites. Returns token-efficient fingerprints, not full specs.

FieldTypeRequiredDescription
action"fingerprint" | "capability" | "endpoint" | "search" | "publish"✅The directory action to perform
domainstringDomain to look up (required for fingerprint, capability, endpoint)
capabilitystringCapability category (required for capability action). One of: auth, payments, content, crud, search, messaging, files, analytics, social, ecommerce, forms, other
methodstringHTTP method (required for endpoint action)
pathstringEndpoint path (required for endpoint action)
querystringSearch query (required for search action)
siteIdstringSite ID from a scout result (required for publish action)
ActionRequired fieldsDescriptionToken cost
fingerprintdomainGet domain overview~50 tokens
capabilitydomain, capabilityList endpoints by capability~200 tokens
endpointdomain, method, pathSingle endpoint detail~80 tokens
searchquerySemantic search across all APIsvaries
publishsiteIdAdd a scouted site to the directoryvaries
{
"name": "directory",
"description": "Fingerprint-first API directory. Look up domains, browse capabilities, inspect endpoints, semantic search, or publish scouted sites.",
"inputSchema": {
"type": "object",
"required": ["action"],
"properties": {
"action": { "type": "string", "enum": ["fingerprint", "capability", "endpoint", "search", "publish"] },
"domain": { "type": "string", "description": "Domain to look up" },
"capability": { "type": "string", "enum": ["auth", "payments", "content", "crud", "search", "messaging", "files", "analytics", "social", "ecommerce", "forms", "other"] },
"method": { "type": "string", "description": "HTTP method" },
"path": { "type": "string", "description": "Endpoint path" },
"query": { "type": "string", "description": "Search query" },
"siteId": { "type": "string", "description": "Site ID from a scout result" }
}
}
}

LLM-guided exploration — an AI agent clicks, types, and navigates to find more API endpoints than a simple page load.

FieldTypeRequiredDescription
urlstring✅The URL to explore
taskstring✅What to look for and do on the site
FieldTypeDescription
stepsarraySequence of actions the agent took
networkEventsCountnumberTotal network events captured
eventsarrayCaptured network events (method, url, status)
{
"name": "agent-scout",
"description": "LLM-guided exploration — an AI agent clicks, types, and navigates to find more API endpoints than a simple page load.",
"inputSchema": {
"type": "object",
"required": ["url", "task"],
"properties": {
"url": { "type": "string", "description": "The URL to explore" },
"task": { "type": "string", "description": "What to look for and do on the site" }
}
}
}