Docs
HTTP API
The Scry HTTP API: the MCP endpoint over plain HTTPS JSON-RPC, and the raw routes under it for schema, SQL, and rerank.
The API is the MCP endpoint
The supported surface is https://mcp.scry.io, an ordinary HTTPS API: JSON-RPC over POST, reachable by curl with a bearer header. One request calls any tool, and tools/list returns the current contract. A SQL answer has the same rows, accounting, and coverage fields as the raw routes. The curl form is on the Connect page (https://scry.io/docs/connect).
Base URL and authentication
The API base is https://api.scry.io. Send Authorization: Bearer $SCRY_API_KEY on authenticated routes. GET /v1/scry/context is public. Schema and rerank requests accept a signed-in session or a Scry key; SQL queries use a Scry key or the x402 payment path.
Context and schema
GET /v1/scry/context?mode=agent returns the compact session-start contract. GET /v1/scry/schema returns relation and helper contracts; use ?relation=<name>[,<name>] for selected full contracts or ?mode=index for the catalog index.
Query
POST /v1/scry/query accepts one read-only SQL statement. Send the SQL as a UTF-8 text/plain body. The server also accepts text/sql, application/sql, or an application/json object with either a string sql field alone or a program field, the fixpoint-program AST documented on the Turing-complete search page. A literal LIMIT of at most 10,000 rows bounds every result set; begin at LIMIT 20, and take the next page with a WHERE on the ORDER BY key past the last row returned. The JSON response includes rows, execution details, truncation state, and accounting fields. Long queries can stream JSON whitespace before the response object.
curl https://api.scry.io/v1/scry/query \ -H "Authorization: Bearer $SCRY_API_KEY" \ -H "Content-Type: text/plain" \ --data "SELECT hn_id, title, original_author, original_timestamp, uri FROM hackernews.items WHERE hn_id >= (SELECT max(hn_id) AS n FROM hackernews.story_scores WHERE observed_on >= today() - 7) - 100000 AND title != '' ORDER BY hn_id DESC LIMIT 20"
Rerank
POST /v1/scry/rerank orders documents supplied by the caller. The route accepts JSON and requires authentication.
When to use the raw routes
The raw routes are the transport under the tools. Use them when a service wants text/plain SQL bodies, the x402 payment path, or response streaming without JSON-RPC framing. Everything else is one tool call on the MCP endpoint.
Related docs
Want even more out of Scry? Think there's something we can do? Reach out with a request or an offer at hi@scry.io.