Skip to main content
AI

Local MCP

Use AI in your code editor to validate, test and debug your Siteglide code safely.

Written By Luke Wakefield

Last updated About 1 hour ago

The Local MCP is a set of tools your AI coding assistant can use to work with your Siteglide project. It runs on your computer alongside Siteglide CLI. As well as editing files, the assistant can validate Liquid, GraphQL and YAML, run GraphQL, evaluate Liquid against staging and read logs, using the Siteglide CLI setup you already have.

It works with Cursor, Claude Code, Windsurf and other editors that support MCP. It needs Siteglide CLI v1.11 or later.

If you want an AI app to work with your site content and data without a local project, use the Cloud MCP instead. See MCP overview to compare the two.

Why use it?

Catch mistakes before they reach your site. The assistant validates Liquid, GraphQL and YAML against Siteglide rules as it goes, and fixes problems before it saves files.

Test against real data. The assistant can run Liquid and GraphQL against your site from the editor, reading and updating your data. This makes it powerful, so point it at a staging site.

Debug faster. Pull recent platform logs when something fails, instead of switching between the admin, the terminal and your editor.

Your credentials stay on your machine. Credentials stay in Siteglide CLI. The assistant uses environment names, such as staging, and should never read or paste your tokens.

Same platform as your site. The Local MCP talks to the same environments you sync to with siteglide-cli sync.

What you need

  • A site created in Siteglide. A staging copy is recommended for testing.

  • Siteglide CLI v1.11 or later installed, with an environment (for example, staging) added

  • A Siteglide project pulled locally (siteglide-cli pull)

  • An MCP-capable AI assistant on your machine, for example Cursor

Setup

1. Pull your project

siteglide-cli pull <env>

Replace <env> with your environment name, for example staging. This downloads your site files and writes the MCP configuration for your editor.

2. Turn on the MCP server in your editor

In Cursor, open Settings > Tools & MCP, enable the siteglide server, then reload the window.

3. Check it's working

Ask your assistant something like:

"List my Siteglide environments and validate my homepage Liquid against staging."

If the Local MCP is connected, the assistant can list your environments and validate code without a network connection. The other tools use Siteglide CLI to connect to your site.

How to use it

You don't call the tools yourself. You describe what you want in chat, and the assistant picks the right tool for the task.

You want to…

Example prompt

Fix or build a section

"Validate this Liquid partial and fix any Siteglide errors."

Check a GraphQL query

"Run this GraphQL query against staging and show the record shape."

Preview Liquid output

"Evaluate this Liquid snippet against staging data."

Debug an error

"Fetch recent logs from staging for this page."

Set up Git

"Check my Git setup for this project and help me fix anything missing."

Start a session

"I'm going to add a new feature to the staging site."

What the assistant can do

Tool

What it helps with

envs_list

Lists your environments and labels each one as staging or production. It never returns tokens or emails.

validate_code

Checks Liquid, GraphQL and YAML files before they're saved

liquid_exec

Evaluates Liquid against a staging environment. It's blocked on production.

graphql_exec

Runs GraphQL queries and mutations to read or update CMS, WebApp and CRM data. Mutations on production need your approval.

logs_fetch

Fetches recent platform logs

git_status

Checks your Git install, identity, repository and remotes, and can guide you through setting up Git

siteglide_guide

Loads short Siteglide guidance, such as naming conventions, for the assistant

siteglide_rules

Loads the Siteglide rules the assistant follows when working on Siteglide projects

Staging and production safety

The Local MCP is built to keep live sites safe from accidental changes to code and data:

  • Environments are labelled. The assistant checks your environments first, so it can tell staging from production even if they have confusing names. Your tokens are never shown to it.

  • Liquid evaluation is blocked on production. If the assistant needs to work with production data, for example to tidy up records, it writes Liquid to your project files so you can review it before you sync and run it.

  • GraphQL changes on production need your approval. The assistant can read production data with GraphQL, for example to build you a report. Before a GraphQL mutation runs on production, the MCP asks you to approve it in your editor. [TO CONFIRM: that the approval prompt works in every supported editor, and what happens in an editor that can't show it.]

  • Untrusted data is marked. Data read from your site is wrapped as untrusted, which helps the assistant ignore any instructions hidden in that data.

  • Sync, pull and deploy stay with you. The Local MCP has no tools to sync, pull or deploy. Those stay your decision. It doesn't stop the assistant from running these commands if you ask it to.

[TO CONFIRM: the current behaviour when a sync is already running, or when two syncs point at different environments. The previous version of this article said this was a known limitation.]

Good practice

  • Turn on your assistant's privacy mode, or turn off using your data for training, so sensitive data isn't shared.

  • Agencies can create a staging copy of a site in the Copies tab.

  • If you have more than one environment, say "staging" when you want live tests. This protects you if the AI misunderstands where to make changes or read data from.

  • Pull the site before the assistant generates code, as you would for any Siteglide CLI project.

  • If siteglide-cli sync is running, check it's pointed at staging, not production.

  • If you need to work on a production site:

  • Turn sync off before asking the assistant to generate code.

  • Generate the code.

  • Review the code.

  • Turn sync back on when you're ready.

  • Re-save the files.

This is easier with version control such as Git, because you can see the changed files easily. Ask the assistant to check your Git setup with git_status.

Troubleshooting

The assistant doesn't have Siteglide tools.Enable the siteglide MCP server in your editor settings and reload.

The tools fail to start.Run siteglide-cli pull again so the MCP paths are correct for your machine.

Validation passes but the site looks wrong.

  • Check that sync is running and pointed at the right environment.

  • Give the assistant the page URL so it can check for errors. This may use more tokens.

  • Copy error messages from the page and the browser console into the chat, and the assistant will try to fix them.

Something else isn't working.Tell us on the Siteglide feedback board. [TO CONFIRM: the right feedback board link for the Local MCP.]

Was this helpful?

Still need help? Ask the team