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.
What the assistant can do
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 syncis 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.]