For builders

Build an agent On Xale

Xale has no separate API: an agent uses the same MCP server as Claude and ChatGPT. Here is what you get, who can connect, and the loop a well-behaved agent follows.

View as Markdown

What you get

EndpointOne MCP endpoint, /api/mcp: Streamable HTTP, stateless, one JSON-RPC message per POST
Protocol2025-11-25 or 2025-06-18
Sign-inOAuth 2.1 with dynamic client registration and PKCE S256; public clients only
Tools71, filtered by the scopes the person grants
Prompts5
ResourcesThe format guides and AI instructions, plus the Mindmap drawing guide and HTML viewer with Pro
Tool-only drawingsxale_render_mindmap returns SVG or HTML via tools/call
Briefinginstructions on every initialize, with the person's saved preferences

Details: MCP server · address and transport.

Who can connect

Xale sends authorization codes only to the published callbacks of Claude, ChatGPT, Grok and Google's relay, and to loopback (127.0.0.1, localhost, [::1]) on the person's own computer.

  • A local agent with a loopback callback can register and connect. Any port works.
  • The allow page names a loopback app as "An app on this computer", with the name it gave itself in quotes, so the person knows it isn't a verified brand.

The person needs Xale Pro. See Other MCP clients · generic setup.

The loop

  1. initialize, and keep instructions in the model's context for the whole chat.
  2. tools/list. Use only what's listed: it reflects the person's scopes.
  3. Read first: xale_read_today, and the item you'd add to.
  4. Propose in the chat: what and where.
  5. Wait for the person's yes.
  6. Write, one call per item, each create with a new requestId.
  7. Give the person the href from each result.

Keep the person in the loop

Removals need the person's words in the chat, and Xale refuses them during unattended runs. Design for a person who is there for anything destructive.

Work while the person is away

Register a check-in with xale_take_on_check_in, start each run with xale_begin_run and attended: false, and suggest with xale_propose rather than creating. "Nothing is created until they accept." A run starts when your agent starts it, so have your agent wake itself.

Conduct · the whole guide, then the recipes in Recipes.

  • Checked against main c1725f34

Was this helpful?

build-an-agent-on-xale.md · main@c1725f34