Lesson 2 of 5
In Progress

Connect your AI assistant

Blockli October 24, 2026

Connect Cursor, Claude Code, Claude Desktop, Claude.ai, ChatGPT, or another MCP agent to your WordPress site.

Agents connect to your WordPress site’s MCP server. You’ll find its address in Blockli → Tools → AI Tools. It looks like this:

https://your-site.com/wp-json/blockli/mcp

There are two ways to sign in:

  • Cursor, Claude Code, and Claude Desktop sign in with a WordPress application password.
  • ChatGPT and Claude.ai sign in through your site: they open a page where you sign in to WordPress and click Allow. No password to copy.

Before you start

  • You’re an administrator on the WordPress site.
  • Allow AI agents to use the Blockli tools is switched on in Blockli → Tools → AI Tools.
  • For ChatGPT and Claude.ai, your site uses https. Their servers can’t reach a site on plain http.

Connect with an application password

Step 1: Create an application password

In Blockli → Tools → AI Tools, follow the Create one in your profile link. Name the password after the agent, for example Cursor, and copy it.

Step 2: Paste it on the AI Tools page

Paste it into Application password on the same page. The page fills in the setup for your agent. The password isn’t saved there; it only builds the setup text.

Step 3: Add the setup to your agent

Pick your agent’s tab and copy the setup.

Cursor

  1. Open .cursor/mcp.json in your project, or ~/.cursor/mcp.json to use it in every project.
  2. Paste the copied "blockli-app" entry inside "mcpServers", next to any servers already there. Add a comma after the server before it.
  3. If the file is empty, wrap it like this:
{
  "mcpServers": {
    "blockli-app": {
      "url": "https://your-site.com/wp-json/blockli/mcp",
      "headers": { "Authorization": "Basic …" }
    }
  }
}
  1. Save, then switch blockli-app on in Cursor’s MCP settings.

Claude Code

Run the copied command in a terminal. It adds Blockli next to any servers you already have:

claude mcp add --transport http blockli-app https://your-site.com/wp-json/blockli/mcp --header "Authorization: Basic …"

Claude Desktop

  1. Open Settings → Developer → Edit Config to open claude_desktop_config.json.
  2. Paste the copied "blockli-app" entry inside "mcpServers".
  3. Restart Claude Desktop. This setup needs Node.js installed.

Important: The setup contains your application password. Don’t share it or commit it to a repository. To disconnect an agent, revoke its application password in your WordPress profile.

Connect ChatGPT or Claude.ai

Claude.ai

  1. On claude.ai, open Settings → Connectors and click Add custom connector.
  2. Name it Blockli App and paste your MCP server address as the Remote MCP server URL.
  3. Leave the OAuth client ID and secret empty. Your site registers Claude by itself.
  4. Click Add, then Connect.
  5. Claude opens your site. Sign in to WordPress if asked, check the details, and click Allow.
  6. In a new chat, switch Blockli App on in the chat’s tools menu.

Note: Custom connectors may need a paid Claude plan. On Team and Enterprise plans, an Owner may need to add the connector for the organization.

ChatGPT

  1. In ChatGPT, open the settings for apps and connectors and create a custom MCP connector. You may need to turn on developer mode first.
  2. Name it Blockli App and paste your MCP server address as the server URL.
  3. Choose OAuth for authentication. Leave the client details empty; ChatGPT registers itself with your site.
  4. Confirm the warning about custom servers and create the connector.
  5. ChatGPT opens your site. Sign in to WordPress if asked, check the details, and click Allow.

The Allow page shows which app is asking, your site, and the account it will act as. Only administrators can allow a connection.

Connected apps

Apps that signed in this way appear under Connected apps in Blockli → Tools → AI Tools, with the account they use and when they were last used. Click Disconnect to sign one out; it has to ask you to Allow again before it can use the tools.

Access lasts while the app keeps using it, up to 30 days without use. The sign-in only works for the AI tools, nowhere else on your site.

Verify

Ask your agent:

Call get-started and tell me in plain words: what my site and app have,
which supporting plugins are active, how many app pages there are,
and which tools you can use right now.

It should describe your site, your app pages, and the active plugins.

Troubleshooting

What you see Likely cause What to do
"The Blockli AI tools are turned off" The main switch is off. Turn on Allow AI agents to use the Blockli tools in Blockli → Tools → AI Tools.
"Only site admins can use the Blockli AI tools" The account isn’t an administrator. Use an administrator’s application password, or sign in as an administrator on the Allow page.
Cursor shows "An unexpected error occurred" The agent has an old copy of the tool list. Switch blockli-app off and on in Cursor’s MCP settings, then try again.
New tools don’t appear after a plugin update The agent cached the old tool list. Turn the server off and on in your agent, or restart it.
ChatGPT or Claude.ai can’t connect The site isn’t on https, or a security plugin blocks the sign-in pages. Use https. Make sure /wp-json/blockli/oauth/ and /.well-known/oauth-authorization-server are reachable.
"Application passwords are turned off" on the AI Tools page The site isn’t on https, or a security plugin disables them. Use https, or allow application passwords in your security plugin.

If it still doesn’t work, contact support.

Connect a Coding Agent (MCP)

Blockli Studio hosts an MCP server for coding agents. Once connected, your agent can look up how the Blockli SDK works instead of guessing, check the code it writes against Blockli’s rules, and read the runtime logs from your app’s live preview.

Use this when you are building your own app from a custom repository in Studio.

You connect by pasting one address, your Connection URL, into your agent’s desktop app. No terminal is needed. Each Connection URL belongs to one app, and an agent connected with it can only reach that app.

What your agent can do

Area What the tools provide
SDK guidance Which hooks to use, their signatures, the fields each item type has, and recommended patterns.
Snippets Ready-made, typed starting code for list screens, detail screens, app pages, and feeds.
Validation Checks that screens use the SDK correctly before you ship, including sign-in, sign-out, and navigation flow.
Your content types The custom post type sources on your WordPress site and the fields each one exposes.
Translations The app’s translatable strings, and a check for hardcoded text.
Live preview Your preview’s status, and its recent runtime logs with search.
Shipping Whether a set of changed files can go out as an On-Air Release or needs a new build.

Before you start

  • Your app in Studio uses a custom repository.
  • You can sign in to Studio and open the app’s Development page.
  • For the live preview tools, a live preview must be running. The other tools work without one.

Step 1 — Get your Connection URL from Studio

  1. In Studio, open your app and go to the Development page.
  2. Find the Connect Your Coding Agent card.
  3. Click Generate Token.
  4. Copy the Connection URL.

Important: The Connection URL is shown only once, and it works like a password: anyone who has it can use these tools for your app. Do not share it or paste it into your repository. If you lose it or it is exposed, revoke the token and generate a new one.

Step 2 — Add it to your agent

Claude

These steps are for the Claude desktop app.

  1. Open Customize, then Connectors.
  2. Click Add custom connector.
  3. Enter a name, for example Blockli Studio.
  4. Paste your Connection URL as the server URL.
  5. If Claude asks how to authenticate, choose No sign-in. The Connection URL already identifies you.
  6. Click Add.

To use it in a conversation, click the + button in the chat, select Connectors, and switch Blockli Studio on.

Note: On Team and Enterprise plans, an Owner adds custom connectors for the organization under Organization settings > Connectors. If you do not see Add custom connector, ask an Owner to add it. On the Free plan, you can add one custom connector.

Codex

These steps are for the Codex desktop app.

  1. Open Settings, then select MCP servers.
  2. Click Add server.
  3. Enter a name, for example blockli-studio.
  4. Choose Streamable HTTP.
  5. Paste your Connection URL as the server URL.
  6. Save the server, then click Restart.

Cursor

  1. Open Cursor Settings and go to the MCP section.
  2. Click New MCP Server. Cursor opens its mcp.json file.
  3. Add the server, replacing YOUR_CONNECTION_URL with the value from Studio:
{
  "mcpServers": {
    "blockli-studio": {
      "url": "YOUR_CONNECTION_URL"
    }
  }
}
  1. Save the file and return to the MCP section.
  2. Switch blockli-studio on if it is off.

This file lives in Cursor’s own settings on your computer, not in your repository.

Other agents

Any agent that supports remote MCP servers over HTTP can connect. Add a server, choose the HTTP (Streamable HTTP) type if asked, and paste your Connection URL as its address.

If your agent has a separate field for a token, you can use the MCP URL and Token from the same Studio card instead. Send the token in this header:

Authorization: Bearer YOUR_TOKEN

Verify

Your agent’s MCP or connector settings should show the Blockli server as connected, with its tools listed.

Then ask your agent something that needs the tools, for example:

Use the Blockli Studio tools to get the active preview for my app and show its recent logs. Then tell me which collections I can list with useCollection.

You should get your preview’s status, its recent log lines, and the list of collections the SDK supports.

Back in Studio, the Connect Your Coding Agent card shows when each token was last used.

Manage tokens

  • Revoke a token from the Connect Your Coding Agent card. Its Connection URL stops working immediately.
  • Use one token per person or machine, so you can revoke one without interrupting the others. Each app can have up to 10 active tokens.
  • Keep the Connection URL private. It contains the token. Do not put it in your repository, a pull request, a screenshot, or a chat.

Troubleshooting

What you see Likely cause What to do
The connection fails with an authorization error The Connection URL is incomplete, or its token was revoked. Copy the whole address again. If in doubt, generate a new token.
The agent connects but lists no tools The server is switched off in your agent’s settings. Switch it on, then reload the agent’s tool list or restart the agent.
Claude does not show Add custom connector Your organization manages connectors centrally. Ask an Owner to add it under Organization settings > Connectors.
Preview tools report no active preview No live preview is running for the app. Start a live preview from the Development page, then ask again.
Requests are refused as too many The token is making requests too quickly. Wait a minute and try again.

If the connection still does not work, contact support from inside Studio.


This lesson comes from the Blockli documentation. For the latest version, see docs.blockli.app/ai/connect and docs.blockli.app/studio/mcp-connection.