Skip to content

AI Integration

XWidget is agent-ready in two ways: XWidget Cloud is an MCP server your AI assistant can connect to, and this documentation is published in an AI-readable format any tool can fetch. The first gives an assistant live access to your workspace — deployments, channels, analytics. The second grounds it in real XWidget syntax so the code it writes uses tags and attributes that actually exist.

Connect Claude to XWidget Cloud

XWidget Cloud speaks the Model Context Protocol, so any MCP client can connect. The server URL is:

https://api.xwidget.dev/mcp

Claude (web and desktop): go to Settings → Connectors → Add custom connector, enter the URL above, and click Connect. Your browser opens for Google sign-in and a consent screen listing exactly what you're granting. Use the same Google account you use for XWidget Cloud.

Claude Code: add the server from any terminal, then authenticate with /mcp:

claude mcp add --transport http xwidget https://api.xwidget.dev/mcp

Note

No account setup required. If your Google account is new to XWidget Cloud, connecting creates your account — a personal workspace on the free tier, the same as signing up through the Console. Visit the Console anytime to create projects and manage your workspace.

Most tools are read-only — an assistant can see anything your account can see. A smaller set makes changes: renaming workspaces, projects, and channels and editing deployment notes are reversible edits, while publishing a deployment changes what your live users see (MCP clients confirm before running it). Access is scoped to three grants shown at consent: platform reads (workspaces, projects, channels, deployments), analytics reads, and platform writes (the changes just described). Access tokens are short-lived and expire within one hour; disconnecting the connector in your AI client stops it from accessing your account.

What You Can Ask

Once connected, the assistant discovers the tools on its own. They cover:

Area What the assistant can do
Identity Confirm which account it's acting as
Workspaces List your workspaces, members, roles, and plan usage
Projects List and look up projects in a workspace
Channels List a project's channels and what each one serves
Deployments Browse versions and revisions, see what's live where
Analytics Query renders, downloads, errors, page navigation, and filter dimensions
Make changes Rename workspaces, projects, and channels; edit deployment notes; publish a deployment to a channel

Some prompts that exercise the whole surface:

  • "What's deployed to prod right now, and when did it go live?"
  • "How did version 1.2.0 perform this week compared to last?"
  • "Are there any client errors in the last 7 days? Which fragments?"
  • "Which locales and platforms are actually using the app?"
  • "Errors spiked on 1.2.0 — roll prod back to the previous revision."

Ground Any AI in the Docs

This documentation ships an llms.txt index — a curated, AI-readable map of every page, with the full content available as raw markdown:

https://docs.xwidget.dev/llms.txt

Any tool that can fetch a URL — Claude, Cursor, Copilot, or your own agents — can read that index, pull only the pages it needs, and answer with real XWidget syntax instead of guessing. Each documentation version has its own index, so an assistant reading the docs for 0.6 won't quote syntax from a newer release.

Point Agents at Your Project

Agents read instruction files like AGENTS.md and CLAUDE.md from your repository root before they start working. Add this stanza and every AI session in your project starts grounded — no prompting required:

## XWidget

- Framework docs (AI-readable index): https://docs.xwidget.dev/llms.txt
- This project's generated widget schemas: .xwidget/

The second line matters as much as the first: your config directory contains the XSD schemas the code generator produced for your project's widget set. An agent that reads them knows exactly which widgets and attributes exist in your app — including ones the framework docs don't cover.