Canvasly AI connectivity and MCP

Canvasly Pro does not call an AI model to build pages. WordPress stores a provider API key and acts as a read-only Model Context Protocol (MCP) server. An outside agent, such as Cursor or Claude, reads layouts through MCP, then writes them back through a separate WordPress address. Canvasly itself never loads this. It exists only while Canvasly Pro is active.

Updated . Covers Canvasly 0.12.76 and Canvasly Pro 0.6.3.

Four boxes in a row: save a provider key on AI Connection, enable MCP and generate a token, the agent reads the layout from WordPress, then a separate WordPress login saves the layout.
The key test and the MCP connection are not the save. Saving a page still needs a WordPress user who can edit layouts.

What you set up

Open Canvasly → AI Connection. Only a site administrator can open it. Two stored settings are used:

Both are removed if you uninstall Canvasly Pro. The editor never receives the API key. A status check reports only whether a key is stored.

Providers

Only a provider on this list can be saved. An arbitrary web address is rejected, so this screen cannot be pointed at a private server. Every host must be HTTPS on port 443, with no username or password in the address. Localhost, addresses ending in .local or .internal, raw IP addresses, and lookalike hosts are rejected.

ProviderHost used for the testHow the test sends the key
OpenAIapi.openai.com/v1Bearer token
Anthropicapi.anthropic.com/v1x-api-key
Geminigenerativelanguage.googleapis.com/v1betax-goog-api-key
AzureYour own host under openai.azure.com, cognitiveservices.azure.com, or services.ai.azure.comapi-key
Perplexityapi.perplexity.aiBearer token
Cursorapi.cursor.com/v1Bearer token, and the test calls /me
Groqapi.groq.com/openai/v1Bearer token
Mistralapi.mistral.ai/v1Bearer token
DeepSeekapi.deepseek.comBearer token

An Azure host must be a single name in front of one of those three endings. Add-ons may add providers, and those hosts still have to pass the same HTTPS checks.

The API key and Test connection

The key is encrypted before it is stored. A key must be 20 to 256 characters, with no spaces and no web address scheme such as https://. Leave the password field blank when you save if you want to keep the key already stored.

Test connection is the only time WordPress calls the provider. It checks the provider’s model list. Cursor is checked at /me. Azure is checked at /openai/models?api-version=2024-10-21. A successful response means the key was accepted. There is no chat, no completion, and no request that generates a layout. The model name you save is not sent to the provider.

Turn on MCP

WordPress is the MCP server. It does not forward those requests to OpenAI, Anthropic, or any other provider. The agent connects to your site:

POST /wp-json/canvasly-lite/v1/mcp

The protocol version reported to the client is 2024-11-05. The server name is canvasly-lite. This address is hidden from the public REST index.

The address stays closed until both of these are true: Enable MCP is checked, and a token exists. If MCP is on and there is no token, the screen warns you, and the address keeps answering with “forbidden” (HTTP 403).

Token

A token starts with lbai_ and then 48 hexadecimal characters. WordPress stores only a hash of it, a short hint of the first 8 characters, the administrator who created it, and the time. The full token is shown once, for two minutes. Generate a new one to replace it. Revoke deletes it. The person who owns the token must still be an administrator.

Send it on every MCP request in one of these ways:

Authorization: Bearer lbai_...
X-Canvasly-Lite-MCP-Token: lbai_...

A person who is already logged in to WordPress and can edit theme options can also call this address without the token. Each accepted call acts as the token’s owner, and that person must be allowed to edit layouts. After 60 calls in a minute, further calls are refused until the minute passes.

What the agent can read

MCP can list and read layouts. It cannot create, update, or delete them.

RequestWhat comes back
initializeProtocol version, server info, and a note that the tools are read-only.
pingAn empty result.
tools/list and tools/callThe three tools below.
resources/listOne entry for each Canvasly page this person can edit.
resources/readThe layout for an address like canvasly-lite://document/123.
prompts/listAlways empty. No prompts are registered.
ToolWhat it returns
list_layout_documentsUp to 50 posts or pages that store a Canvasly layout and that this person can edit. An optional title search narrows the list.
get_layout_documentOne page: its number, title, type, status, and layout.
get_layout_schemaThe catalog of units and shared settings, plus the page layout when a page number is set. Compact results are the default. Empty and default settings are left out so the tree stays small. Saving fills those defaults back in.

How the agent saves a page

Writes do not go through MCP. They use the layout routes below. The MCP token proves who is calling MCP. It does not, by itself, allow the save. The agent also needs a WordPress login, or another WordPress credential, that can edit layouts.

AddressWhat it does
GET /wp-json/canvasly-lite/v1/layout-schemaThe catalog of units. Requires permission to edit theme options.
GET /wp-json/canvasly-lite/v1/layout-schema/{id}The catalog plus the layout of that page.
POST /wp-json/canvasly-lite/v1/layout-schema/{id}Checks the layout and saves it. Add render=1 to also receive the HTML.
POST /wp-json/canvasly-lite/v1/layout-schema/renderChecks the layout and returns HTML without saving.

The catalog id is canvasly-lite.layout.v1. A layout is a version, page settings, and a list of units. Each unit has an id, a type, settings, children, and an optional slot. The agent is told to:

A save can be the full catalog response, an object that contains a document, or an object that has a root list.

The working loop

  1. An administrator saves a provider and API key, then uses Test connection. That only proves the provider accepts the key.
  2. The administrator turns on MCP and generates a token. The token is stored in the agent, not in the page.
  3. The agent sends JSON-RPC to /wp-json/canvasly-lite/v1/mcp with the bearer token.
  4. It reads the catalog and, if needed, one page. It edits that layout with whatever model the agent is already using.
  5. It posts the layout to /wp-json/canvasly-lite/v1/layout-schema/{page number} with WordPress credentials that can edit the page. Canvasly checks it, saves it, and the public page is drawn from that layout.

The provider key stored in WordPress is not part of that loop. Pro does not send the layout, the prompt, or the model id to OpenAI, Anthropic, Cursor, or the other listed hosts, except for the model-list check used by Test connection.

Limits that stay in place