astranl.com / agent quickstart / core tools

AstraNL core tools for developers

Five read-only tools for renovation and building work in the Netherlands. No key, no signup, no account. Every answer names its source and date, and an estimate carries a signed receipt that anyone can verify, with or without AstraNL.

MCP (streamable HTTP)https://astranl.com/mcp/streamable?profile=core
Plain HTTPSPOST https://astranl.com/api/core/v1/tools/{tool}
OpenAPI 3.1/agents/core/openapi.json
Status/api/core/v1/status

The five tools

toolwhat it answers
astranl_renovation_estimate_nlPlanning cost in EUR for one job category in a Dutch city: labour hours, rate, material lines, a low, typical and high range, the VAT basis of every amount, and a signed receipt. Not a quote.
astranl_permit_rules_nl2026 building permit fee of a municipality for a construction cost, and whether a skip on the street needs a permit, with the regulation and source link.
astranl_material_price_nlPrice including VAT and stock of one building product in Dutch stores, by EAN or GTIN or product link, read at request time.
astranl_contractor_check_nlVIES validity of an EU VAT number and EU and US sanctions screening. A KvK register read is paid and answers payment_required here.
astranl_verify_receiptIntegrity verdict of an AstraNL receipt or reference: hashes, Ed25519 signature, Merkle inclusion.

All five are read-only (readOnlyHint true, destructiveHint false). AstraNL never orders, books or pays. The only write is the estimate receipt: one digest entry in the public log, holding hashes of the question and the answer, not their content.

curl: one call, then verify

Needs curl and jq. The first call returns the estimate and its receipt reference; the second checks that reference over plain HTTPS.

#!/bin/sh
# AstraNL first success in one call, curl only. No key, no signup. Needs curl and jq.
set -e
U='https://astranl.com/mcp/streamable?profile=core'
# 1. one call: a planning estimate with a signed receipt
ANSWER=$(curl -s "$U" -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"astranl_renovation_estimate_nl","arguments":{"category":"painting","area_m2":30,"location":"Utrecht"}}}' \
  | sed -n 's/^data: //p' | jq -r '.result.content[0].text')
echo "$ANSWER" | jq '{range: .answer_meta.range | {low, typical, high}, receipt: .receipt | {reference, state}}'
REF=$(echo "$ANSWER" | jq -r .receipt.reference)
# 2. verify the receipt online (plain HTTPS GET, no MCP needed).
# Signed and included: PASS (L3). Signed, inclusion follows with the next tree head: SIGNED_PENDING_INCLUSION (L2).
curl -s "https://astranl.com/api/astralock/verify/$REF" | jq '{verdict: (if .found and .content_integrity == "PASS" and .envelope_integrity == "PASS" and .signature == "PASS"
  then (if .merkle_inclusion == "PASS" then "PASS" else "SIGNED_PENDING_INCLUSION" end) else "FAIL" end), proof_level}'

Python

Standard library plus cryptography, with full offline verification

pip install cryptography, then run. It checks the answer hash, the payload hash and the Ed25519 signature against the key in /.well-known/jwks.json, then verifies online.

#!/usr/bin/env python3
"""AstraNL first success in one call, Python, standard library plus 'cryptography' for the offline signature check.
Calls the core estimate tool over MCP streamable HTTP (no key, no signup), then verifies the receipt offline
with the published key and online with astranl_verify_receipt."""
import hashlib, json, sys, urllib.request
URL = "https://astranl.com/mcp/streamable?profile=core"
KEYS = "https://astranl.com/.well-known/jwks.json"

def rpc(method, params, i=1):
    body = json.dumps({"jsonrpc": "2.0", "id": i, "method": method, "params": params}).encode()
    req = urllib.request.Request(URL, body, {"Content-Type": "application/json",
                                             "Accept": "application/json, text/event-stream"})
    raw = urllib.request.urlopen(req, timeout=60).read().decode()
    if raw.lstrip().startswith("event:") or raw.startswith("data:"):
        raw = [l[5:] for l in raw.splitlines() if l.startswith("data:")][-1]
    return json.loads(raw)["result"]

def canonical(x):
    return json.dumps(x, sort_keys=True, separators=(",", ":"), ensure_ascii=False, allow_nan=False).encode("utf-8")

def call(name, args):
    res = rpc("tools/call", {"name": name, "arguments": args})
    return json.loads(res["content"][0]["text"]), res.get("isError")

def verify_offline(answer):
    r = answer["receipt"]
    a = {k: v for k, v in answer.items() if k != "receipt"}
    ok_answer = hashlib.sha256(canonical(a)).hexdigest() == r["payload"]["answer_sha256"]
    ok_payload = hashlib.sha256(canonical(r["payload"])).hexdigest() == r["envelope"]["payload_hash"]
    jwks = json.load(urllib.request.urlopen(KEYS, timeout=30))
    jwk = [k for k in jwks["keys"] if k.get("kid") == r["key_id"]][0]
    import base64
    from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
    pub = base64.urlsafe_b64decode(jwk["x"] + "=" * (-len(jwk["x"]) % 4))
    try:
        Ed25519PublicKey.from_public_bytes(pub).verify(bytes.fromhex(r["signature"]), canonical(r["envelope"]))
        ok_sig = True
    except Exception:
        ok_sig = False
    return {"answer_sha256": ok_answer, "payload_hash": ok_payload, "signature_with_published_key": ok_sig}

if __name__ == "__main__":
    answer, err = call("astranl_renovation_estimate_nl", {"category": "painting", "area_m2": 30, "location": "Utrecht"})
    rng = answer["answer_meta"]["range"]
    print("estimate EUR", rng["low"], rng["typical"], rng["high"], "as_of", answer["answer_meta"]["as_of"])
    print("receipt", answer["receipt"]["reference"], answer["receipt"]["state"])
    off = verify_offline(answer)
    print("offline", off)
    online, _ = call("astranl_verify_receipt", {"ref": answer["receipt"]["reference"]})
    verdict = online["integrity"]["verdict"]
    # PASS = signed and included in a signed tree head (L3); SIGNED_PENDING_INCLUSION = signed (L2), inclusion follows
    print("online", verdict, online["integrity"]["proof_level"])
    sys.exit(0 if all(off.values()) and verdict in ("PASS", "SIGNED_PENDING_INCLUSION") else 1)

Official MCP Python SDK

# AstraNL core tools with the official MCP Python SDK.  pip install mcp
import asyncio, json
from mcp import ClientSession
try:  # mcp 2.x
    from mcp.client.streamable_http import streamable_http_client as http_client
except ImportError:  # mcp 1.x
    from mcp.client.streamable_http import streamablehttp_client as http_client

async def main():
    async with http_client("https://astranl.com/mcp/streamable?profile=core") as streams:
        read, write = streams[0], streams[1]
        async with ClientSession(read, write) as s:
            await s.initialize()
            print([t.name for t in (await s.list_tools()).tools])
            est = json.loads((await s.call_tool("astranl_renovation_estimate_nl",
                              {"category": "painting", "area_m2": 30, "location": "Utrecht"})).content[0].text)
            print(est["answer_meta"]["range"]["typical"], est["receipt"]["reference"])
            v = json.loads((await s.call_tool("astranl_verify_receipt", {"ref": est["receipt"]["reference"]})).content[0].text)
            print(v["integrity"]["verdict"], v["integrity"]["proof_level"])
            return v["integrity"]["verdict"] in ("PASS", "SIGNED_PENDING_INCLUSION")

raise SystemExit(0 if asyncio.run(main()) else 1)

TypeScript

No dependencies, with full offline verification (Node 18+)

Run with npx -y tsx first_call.ts. The receipt hashes the answer exactly as served, so the example parses the raw text and keeps number literals such as 9.0 as written.

// AstraNL first success in one call, TypeScript (Node 18+), no dependencies.
// Run: npx -y tsx first_call.ts
// 1. calls the core estimate tool over MCP streamable HTTP (no key, no signup)
// 2. verifies the receipt offline: answer hash, payload hash, Ed25519 signature with the published key
// 3. verifies it online with astranl_verify_receipt
import { createHash, createPublicKey, verify } from "node:crypto";

const URL_CORE = "https://astranl.com/mcp/streamable?profile=core";
const JWKS = "https://astranl.com/.well-known/jwks.json";

async function callTool(name: string, args: Record<string, unknown>): Promise<string> {
  const r = await fetch(URL_CORE, {
    method: "POST",
    headers: { "Content-Type": "application/json", Accept: "application/json, text/event-stream" },
    body: JSON.stringify({ jsonrpc: "2.0", id: 1, method: "tools/call", params: { name, arguments: args } }),
  });
  let raw = await r.text();
  if (raw.includes("data:")) raw = raw.split("\n").filter((l) => l.startsWith("data:")).pop()!.slice(5);
  const res = JSON.parse(raw).result;
  if (res.isError) throw new Error(res.content[0].text);
  return res.content[0].text as string; // keep the raw answer text: the receipt hashes it as served
}

// Canonical JSON as AstraNL computes it (Python json.dumps sort_keys, separators "," ":", ensure_ascii False).
// Numbers stay exactly as written in the served text (9.0 stays 9.0), so the text is parsed with number tokens kept.
class Num { constructor(public raw: string) {} }
type J = null | boolean | string | Num | J[] | { [k: string]: J };
function parseRaw(s: string): J {
  let i = 0;
  const ws = () => { while (i < s.length && " \t\n\r".includes(s[i])) i++; };
  const str = (): string => { const st = i++; while (s[i] !== '"') { if (s[i] === "\\") i++; i++; } i++; return JSON.parse(s.slice(st, i)); };
  const val = (): J => {
    ws();
    const c = s[i];
    if (c === "{") { i++; const o: { [k: string]: J } = {}; ws(); if (s[i] === "}") { i++; return o; }
      for (;;) { ws(); const k = str(); ws(); i++; o[k] = val(); ws(); if (s[i++] === "}") return o; } }
    if (c === "[") { i++; const a: J[] = []; ws(); if (s[i] === "]") { i++; return a; }
      for (;;) { a.push(val()); ws(); if (s[i++] === "]") return a; } }
    if (c === '"') return str();
    if (s.startsWith("true", i)) { i += 4; return true; }
    if (s.startsWith("false", i)) { i += 5; return false; }
    if (s.startsWith("null", i)) { i += 4; return null; }
    const m = /^-?\d+(\.\d+)?([eE][+-]?\d+)?/.exec(s.slice(i))!; i += m[0].length; return new Num(m[0]);
  };
  return val();
}
function canon(x: J): string {
  if (x instanceof Num) return x.raw;
  if (x === null || typeof x !== "object") return JSON.stringify(x);
  if (Array.isArray(x)) return "[" + x.map(canon).join(",") + "]";
  return "{" + Object.keys(x).sort().map((k) => JSON.stringify(k) + ":" + canon(x[k])).join(",") + "}";
}
const sha256 = (t: string) => createHash("sha256").update(Buffer.from(t, "utf8")).digest("hex");

async function main() {
  const t0 = Date.now();
  const text = await callTool("astranl_renovation_estimate_nl", { category: "painting", area_m2: 30, location: "Utrecht" });
  const tree = parseRaw(text) as { [k: string]: J };
  const answer = JSON.parse(text);
  const r = answer.receipt;
  const range = answer.answer_meta.range;
  console.log("estimate EUR", range.low, range.typical, range.high, "receipt", r.reference, r.state);
  const { receipt, ...rest } = tree;
  const rc = receipt as { [k: string]: J };
  const okAnswer = sha256(canon(rest)) === r.payload.answer_sha256;
  const okPayload = sha256(canon(rc.payload)) === r.envelope.payload_hash;
  const jwks = await (await fetch(JWKS)).json();
  const jwk = jwks.keys.find((k: { kid: string }) => k.kid === r.key_id);
  const key = createPublicKey({ key: { kty: "OKP", crv: "Ed25519", x: jwk.x }, format: "jwk" });
  const okSig = verify(null, Buffer.from(canon(rc.envelope), "utf8"), key, Buffer.from(r.signature, "hex"));
  console.log("offline", { answer_sha256: okAnswer, payload_hash: okPayload, signature_with_published_key: okSig });
  const online = JSON.parse(await callTool("astranl_verify_receipt", { ref: r.reference }));
  // PASS = signed and included in a signed tree head (L3); SIGNED_PENDING_INCLUSION = signed (L2), inclusion follows
  console.log("online", online.integrity.verdict, online.integrity.proof_level, "in", Date.now() - t0, "ms");
  const ok = okAnswer && okPayload && okSig && ["PASS", "SIGNED_PENDING_INCLUSION"].includes(online.integrity.verdict);
  process.exit(ok ? 0 : 1);
}
main().catch((e) => { console.error(e); process.exit(1); });

Official MCP TypeScript SDK

npm init -y && npm pkg set type=module && npm i @modelcontextprotocol/sdk tsx, then npx tsx sdk_client.ts.

// AstraNL core tools with the official MCP TypeScript SDK.  npm i @modelcontextprotocol/sdk ; npx tsx sdk_client.ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";

const client = new Client({ name: "astranl-example", version: "1.0.0" });
await client.connect(new StreamableHTTPClientTransport(new URL("https://astranl.com/mcp/streamable?profile=core")));
console.log((await client.listTools()).tools.map((t) => t.name));
const est = JSON.parse((await client.callTool({ name: "astranl_renovation_estimate_nl",
  arguments: { category: "painting", area_m2: 30, location: "Utrecht" } }) as any).content[0].text);
console.log(est.answer_meta.range.typical, est.receipt.reference);
const v = JSON.parse((await client.callTool({ name: "astranl_verify_receipt", arguments: { ref: est.receipt.reference } }) as any).content[0].text);
console.log(v.integrity.verdict, v.integrity.proof_level);
await client.close();
process.exit(["PASS", "SIGNED_PENDING_INCLUSION"].includes(v.integrity.verdict) ? 0 : 1);

Claude

Claude (web, desktop and mobile apps): Customize, Connectors, Add custom connector. Paste https://astranl.com/mcp/streamable?profile=core, choose No sign-in, and add it. Then ask, for example: "What does painting a 30 m2 living room in Utrecht roughly cost? Then check the receipt."

Claude Desktop through its config file: the config file starts local servers, so a remote server goes through the mcp-remote bridge (a community package, run with npx). Add this to claude_desktop_config.json and restart.

{
  "mcpServers": {
    "astranl": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://astranl.com/mcp/streamable?profile=core"]
    }
  }
}

Claude Code:

claude mcp add --transport http astranl "https://astranl.com/mcp/streamable?profile=core"

ChatGPT

Settings, Apps (or Connectors), Advanced, turn on developer mode if your plan asks for it, then Create. Name it AstraNL, paste https://astranl.com/mcp/streamable?profile=core as the MCP server URL, choose No authentication, and create it. Turn it on in a chat and ask: "Is VAT number NL004604224B69 valid, and is the company on a sanctions list?"

Cursor

Save as .cursor/mcp.json in your project.

{
  "mcpServers": {
    "astranl": { "url": "https://astranl.com/mcp/streamable?profile=core" }
  }
}

VS Code

Save as .vscode/mcp.json in your workspace, then start the server from the MCP view.

{
  "servers": {
    "astranl": { "type": "http", "url": "https://astranl.com/mcp/streamable?profile=core" }
  }
}

A2A client call

The A2A door (agent card, A2A v1.0, JSON-RPC at https://astranl.com/a2a) carries the verify skill, so a receipt issued by the MCP or HTTPS door is confirmed through A2A. The estimate itself is not an A2A skill.

#!/bin/sh
# Verify an AstraNL receipt through the A2A door (A2A v1.0 JSON-RPC, skill verify). No key.
# The A2A door carries verify; the estimate itself comes from the MCP or HTTPS door.
REF=${1:?usage: a2a_verify.sh alk_...}
curl -s https://astranl.com/a2a -H 'Content-Type: application/json' -H 'A2A-Version: 1.0' \
  -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"SendMessage\",\"params\":{\"message\":{\"role\":\"ROLE_USER\",\"messageId\":\"m1\",\"parts\":[{\"data\":{\"ref\":\"$REF\"}}],\"metadata\":{\"skill\":\"verify\"}}}}" \
  | jq -r '.result.message.parts[0].text' | jq '{verdict: .integrity.verdict, proof_level: .integrity.proof_level}'

Plain HTTPS and OpenAPI 3.1

For Copilot, Gemini and any HTTP agent: openapi.json describes one POST operation per tool; the request body is the tool arguments and the response is the tool answer byte for byte, so the receipt verifies the same way.

#!/bin/sh
# AstraNL core tools over plain HTTPS (no MCP, no key). The body is the tool arguments; the answer is the tool answer.
set -e
curl -s https://astranl.com/api/core/v1/tools/astranl_renovation_estimate_nl -H 'Content-Type: application/json' \
  -d '{"category":"painting","area_m2":30,"location":"Utrecht"}' > answer.json
jq '{range: .answer_meta.range | {low, typical, high}, receipt: .receipt.reference}' answer.json
curl -s https://astranl.com/api/core/v1/tools/astranl_verify_receipt -H 'Content-Type: application/json' \
  -d "{\"ref\":\"$(jq -r .receipt.reference answer.json)\"}" | jq '{verdict: .integrity.verdict, proof_level: .integrity.proof_level}'

Verify a receipt

  1. A = the answer JSON without its top-level key receipt. canonical(x) = json.dumps(x, sort_keys=True, separators=(",", ":"), ensure_ascii=False), numbers as served. sha256(canonical(A)) must equal receipt.payload.answer_sha256.
  2. sha256(canonical(receipt.payload)) must equal receipt.envelope.payload_hash.
  3. Ed25519-verify receipt.signature over canonical(receipt.envelope) with the key receipt.key_id from /.well-known/jwks.json.
  4. Online: astranl_verify_receipt, A2A verify, or GET https://astranl.com/api/astralock/verify/{reference}. A fresh receipt reads SIGNED_PENDING_INCLUSION (L2, signed); after the next signed tree head it reads PASS (L3, included).

A receipt proves that AstraNL served exactly this answer at that time. It does not make a figure a quote, a price guarantee or right for a specific job.

Sandbox

Test a case flow without creating a real case. A sandbox case is synthetic and labelled as such in every answer. No case is stored, no engine, provider or real case is touched, nothing is counted in any case, estimate or business metric, and nothing is written to the AstraLock log. The request itself passes ordinary request telemetry, like any request. It moves from created to offers_ready after 30 s and to completed, with synthetic unsigned evidence, after 90 s.

curl -s -X POST https://astranl.com/api/core/v1/sandbox/cases -H 'Content-Type: application/json' -d '{"category":"painting"}'
# then, with the case_id from the answer:
curl -s https://astranl.com/api/core/v1/sandbox/cases/SBX-...

Errors

Every tool uses one error envelope, {"error": {"code", "message", "retryable", "field"?, "do_next"?}}, with stable codes. Over MCP it is the tool result text with isError true; over HTTPS it is the body, with an HTTP status per code. All codes: errors.json.

Reference catalogue of work items

The AstraNL reference catalogue lists the renovation work items the estimator knows, each with a stable id (ANL-W-nnnn), a CPV code, unit, what is included and excluded, the labour norm with its source, a price range with its status (VERIFIED, INDICATIVE or UNKNOWN), the number of sources and the measured estimator accuracy of its trade. A figure is published only where every source behind it allows redistribution; other items say range available in a personal AstraNL estimate. Licence CC BY 4.0. Core estimate answers carry the same links in the field reference_catalog.

catalogue.json · catalogue.csv · changelog.json · licence and attribution · human pages in 11 languages

Status and changelog

/api/core/v1/status probes the core door at request time (tool list, one tool call, the receipt key), cached 60 s. It is checked by AstraNL itself, not by an external monitor. Changes are versioned and additive only within a major version: changelog.json.

Measured time to first success

Each published example, run from an empty directory with an empty package cache against the live service, install included, until the receipt is verified. Run at 2026-11-24T13:57:20Z to 2026-11-24T14:02:18Z UTC.

environmentresulttime
curlpass0.7 s
python stdlib plus cryptographypass7.4 s
python official mcp sdkpass150.7 s
typescript no depspass3.2 s
typescript official mcp sdkpass6.9 s
mcp inspector clipass18.8 s
claude desktop config via mcp remotepass18.6 s
a2a client callpass0.9 s
claude web or desktop app connectornot runGUI, needs a signed-in Claude account; Settings > Connectors > Add custom connector uses the same streamable HTTP transport as python_official_mcp_sdk
chatgpt connectornot runGUI, needs a signed-in ChatGPT account with developer mode; same streamable HTTP transport
cursornot runGUI editor; cursor_mcp.json is valid JSON with the url form; same transport
vscodenot runGUI editor; vscode_mcp.json is valid JSON with type http; same transport

Raw result: harness.json.

AstraNL ZZP, KvK 88449335 · Privacy · Terms · Support · hello@astranl.com