Documentation

From zero to agent-callable

Everything below runs on your machine with plain Node.js — no accounts, no API keys, no dependencies. The hosted platform follows the same flow.

Self-serve onboarding — the hosted flow

The fastest path needs no CLI and no OpenAPI spec: sign up with your website URL and receive your Connect File (one line of JSON you place on your site once, ever). The free tier gives you a readiness report instantly with no file at all; actual publishing follows this sequence — payment comes after verification, never before:

StageWhat happens
0 — Verify ownershipWe match your /.well-known/agentify.json (or a DNS TXT record, or a meta tag) — nothing ever publishes for a domain you don't control, and only then does checkout unlock
1 — ScanWe crawl your site (robots.txt respected): pages, forms, and any OpenAPI spec at well-known paths
2 — SynthesizePages become search_site/get_page tools; an OpenAPI spec becomes typed function tools; an AI pass enriches descriptions and classifies risk
3 — Review (you)Analysis is a proposal, not a decision: you choose exactly what agents can see and the per-tool approval policy — nothing publishes before you hit "Publish selected"
4 — PublishYour tenant goes live on the gateway with only the tools you selected; credentials stay in the vault; a registration token is minted for your agents
5 — VerifyWe act as a real agent against your new endpoint — OAuth registration, MCP handshake, live tool calls — before declaring it live

After launch you stay managed: on-demand re-analysis within your plan's allowance when your site changes, free daily content refresh (search never serves stale data), a daily verification heartbeat on your file, and automatic broken-tool detection from real agent traffic — all governed from your dashboard.

You watch every stage live on your status page (the link with your access key arrives at signup), review form-derived candidates there, and collect your deliverables: the MCP endpoint, registration token, discovery files, and a readiness report with a full audit trail.

Everything below this point is the same machinery run by hand — useful for local evaluation and Sovereign (self-hosted) deployments. The end-to-end business flow also ships as a test: node scripts/e2e-scenario.js.

Quickstart — run the full demo

The repository ships a complete working loop: a demo shop, the auth layer, the MCP gateway, and a scripted agent that exercises all of it. Requires Node ≥ 18, nothing else.

terminal
# clone, then from the repo root:
node scripts/e2e.js

# boots demo-site (:4100), auth (:4200), gateway (:4300),
# registers an agent, gets a token, and runs 14 end-to-end checks.
# Expected final line:
🎉 E2E PASSED
The demo runs everything on localhost with ALLOW_PRIVATE_HOSTS=1. In production the SSRF guard blocks private hosts — see Security.

Transform your API into agent tools

If you have an OpenAPI 3.x spec, the transformer compiles it into a function manifest — the universal intermediate representation the gateway serves.

terminal
node packages/transformer/src/cli.js your-openapi.json \
  --tenant your-business \
  --base-url https://api.your-site.com \
  --secret-ref YOUR_API_KEY_ENV \
  --out packages/gateway/tenants/your-business.manifest.json

Mapping rules: operationId → tool name · GETread scope, mutations → write scope · parameters and request bodies → a flattened JSON-Schema inputSchema · x-requires-approval: true → human-in-the-loop gating. The transformer also emits llms.txt and mcp.json discovery artifacts to drop onto your site.

Authentication

The gateway trusts no request without a Bearer token, and validates every token against the auth layer via RFC 7662 introspection. Agents bootstrap the whole flow automatically:

StepWhat happens
1 — ChallengeUnauthenticated call → 401 + WWW-Authenticate pointing at RFC 9728 resource metadata
2 — DiscoverAgent reads metadata → finds the authorization server + supported scopes
3 — RegisterDynamic client registration (RFC 7591), gated by an initial access token you issue
4 — TokenPKCE authorization-code (user-delegated) or client-credentials (M2M), with resource binding (RFC 8707)
5 — CallToken is audience-bound to your tenant — valid nowhere else

Connect an agent

Any MCP-capable client (Claude, ChatGPT, Copilot, Cursor) connects with a URL:

mcp.json
{
  "mcpServers": {
    "your-business": {
      "url": "https://your-gateway/mcp/your-business",
      "transport": "http"
    }
  }
}

The gateway implements the stateless Streamable-HTTP JSON-RPC subset — initialize, tools/list, tools/call, ping. SSE streaming and session resumability are on the roadmap.

Manifest reference

your-business.manifest.json
{
  "manifestVersion": "1.0",
  "tenant": "your-business",
  "origin": {
    "baseUrl": "https://api.your-site.com",
    "allowedHosts": ["api.your-site.com"]   // SSRF allowlist
  },
  "auth": {
    "type": "apiKey",
    "header": "X-API-Key",
    "secretRef": "YOUR_API_KEY_ENV"       // injected server-side, never exposed
  },
  "tools": [{
    "name": "create_order",
    "description": "Create an order. Returns order id and total.",
    "scope": "write",
    "requiresApproval": true,
    "inputSchema": { /* JSON Schema */ },
    "request": { "method": "POST", "path": "/api/orders" }
  }]
}

Error taxonomy

Execution failures map to a stable vocabulary so agents (and your dashboards) can react programmatically:

CodeMeaning
invalid_argsInput failed the tool's JSON Schema — the message names the exact field
forbiddenScope insufficient, host not allowlisted, or blocked by policy
needs_approvalTool is approval-gated; a human must confirm before execution
origin_unreachableYour site didn't answer (timeout / connection)
origin_errorYour site answered with an error status (body excerpt included)
Security posture, threat model, and data-residency details live on the Security page.