MCP Server API
The Scrayle MCP Server exposes a standard MCP-over-HTTP interface plus health and info endpoints. This page documents the raw HTTP endpoints for advanced integrations.
Base URL
https://mcp.scrayle.comAuthentication
All requests require your Scrayle API key in the x-api-key header:
x-api-key: YOUR_API_KEYEndpoints
POST /mcp
Main MCP endpoint. Accepts JSON-RPC messages per the MCP Streamable HTTP specification. This is what your editor connects to.
POST https://mcp.scrayle.com/mcp
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": {
"name": "my-client",
"version": "1.0.0"
}
}
}Response is application/json for single responses or text/event-stream for streaming.
GET /mcp
SSE endpoint for server-to-client notifications. Used by the MCP transport layer for streaming tool results.
GET https://mcp.scrayle.com/mcp
Accept: text/event-stream
x-api-key: YOUR_API_KEY
Mcp-Session-Id: SESSION_IDDELETE /mcp
Close an MCP session. The server cleans up the transport and any associated state.
DELETE https://mcp.scrayle.com/mcp
x-api-key: YOUR_API_KEY
Mcp-Session-Id: SESSION_IDGET /health
Health check endpoint. No authentication required.
GET https://mcp.scrayle.com/health
Response:
{
"status": "ok",
"server": "scrayle-mcp",
"version": "0.1.0",
"activeSessions": 3,
"uptime": 86400.5
}GET /api/info
Server information and tool listing. Requires authentication.
GET https://mcp.scrayle.com/api/info
x-api-key: YOUR_API_KEY
Response:
{
"name": "scrayle-mcp",
"version": "0.1.0",
"protocol": "MCP Streamable HTTP",
"tools": [
"scrape_url",
"batch_scrape",
"crawl_website",
"cancel_crawl",
"start_browser_session",
"close_browser_session",
"list_browser_profiles",
"run_workflow",
"get_workflow_status",
"list_workflow_runs",
"search_marketplace",
"get_marketplace_actor",
"run_marketplace_actor",
"ai_browser_agent",
"stop_ai_agent",
"solve_captcha",
"kv_get",
"kv_set",
"kv_list_namespaces",
"list_datasets",
"get_dataset_items",
"add_dataset_items"
],
"activeSessions": 3
}CORS
The MCP server allows requests from:
https://mcp.scrayle.comhttps://app.scrayle.comhttps://scrayle.comhttp://localhost:*(development only)
Rate Limits
The MCP server inherits your account rate limits from the Scrayle API Gateway. Each tool call counts toward your API rate limit and credit usage.
For full MCP protocol details, see the MCP Specification. The Scrayle MCP server implements the Streamable HTTP transport (2025-03-26).
Error Responses
| Status | Meaning |
|---|---|
| 400 | Invalid JSON-RPC message or missing required fields |
| 401 | Missing or invalid API key |
| 404 | Invalid session ID on GET/DELETE |
| 429 | Rate limit exceeded |
| 500 | Internal server error |