Connect an AI assistant over MCP
Outcome: your AI assistant can list and read a store’s ShopMD files itself, and, once you sign in, read and ask questions about your own store’s files.
The ShopMD MCP server is at:
https://shopmd.ai/mcpWhat the assistant can do
Section titled “What the assistant can do”The server has two kinds of tools.
| Tool | Needs sign-in | What it does |
|---|---|---|
list-documents |
No | Lists the files a store publishes on its storefront. Takes the store’s .myshopify.com domain. |
read-document |
No | Reads one published file, with its outline and a token estimate. Takes the domain and a file type from the list. |
list_artifacts |
Yes | Lists which files exist for your own store. |
get_artifact |
Yes | Returns one of your own store’s files, including store.md. |
ask |
Yes | Answers a question about your store, using only its generated files. |
The public tools return the same bytes your storefront serves at /apps/shopmd/. A file that’s withdrawn,
never generated or not reachable on the storefront isn’t returned. The signed-in tools always act on the one
store your sign-in or token belongs to, and take no domain.
Before you start
Section titled “Before you start”- For the public tools: nothing. You only need the store’s
.myshopify.comaddress. - For the signed-in tools: a ShopMD account with your store linked to it. A store is linked when the app is installed while you’re signed in to shopmd.ai. See Install the Shopify app.
Add the server
Section titled “Add the server”Every client below connects to the same URL. When the assistant first needs a signed-in tool, it opens a ShopMD sign-in page in your browser (see Sign in and pick a store).
In Claude, add a custom connector and give it the server URL:
https://shopmd.ai/mcpIn Claude Code, add it from the terminal:
claude mcp add --transport http shopmd https://shopmd.ai/mcpThen run /mcp inside Claude Code and choose shopmd to sign in.
In ChatGPT, create a custom connector (this needs developer mode) with:
- URL:
https://shopmd.ai/mcp - Authentication: OAuth
ChatGPT shows a sign-in button the first time a tool needs it.
Add the server to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project:
{ "mcpServers": { "shopmd": { "url": "https://shopmd.ai/mcp" } }}Cursor offers to sign in when a tool needs it.
Sign in and pick a store
Section titled “Sign in and pick a store”-
Sign in to ShopMD. The page says “An app is asking to read your store’s documents. Sign in to decide.” Press Sign in or create an account. Signing in brings you straight back.
-
Choose a store. If your account has more than one linked store, Which store? asks you to pick one, then Continue.
-
Check and connect. The page names the app and your store, and lists what it will be allowed to do: “Read the documents ShopMD has generated for this store”. Press Connect, or Cancel.
Approve only requests you started yourself. If the same app was already connected to a different store, the page says “This replaces your current connection.” Each app is connected to one store at a time.
Use a token instead of signing in
Section titled “Use a token instead of signing in”Clients that can send a header can use a ShopMD API token instead of the browser sign-in.
-
Open the MCP tab. Sign in on shopmd.ai, open your dashboard and choose MCP. The card Connect an agent over MCP shows the endpoint.
-
Pick the store and press Generate MCP token. The token appears once, inside the config below it.
-
Choose a format and copy. Remote (HTTP) is for clients that take a URL. Local (stdio shim) is for clients that only start local commands. Press Copy config.
The Remote (HTTP) config looks like this, with your token in place of <YOUR_TOKEN>:
{ "mcpServers": { "shopmd": { "url": "https://shopmd.ai/mcp", "headers": { "Authorization": "Bearer <YOUR_TOKEN>" } } }}The Local (stdio shim) config runs mcp-remote with npx:
{ "mcpServers": { "shopmd": { "command": "npx", "args": [ "-y", "mcp-remote", "https://shopmd.ai/mcp", "--header", "Authorization: Bearer <YOUR_TOKEN>" ] } }}What you’ll see
Section titled “What you’ll see”Try a prompt like:
List the ShopMD documents for your-store.myshopify.com, then read its policies.
The assistant calls list-documents, gets a reply such as “6 published for your-store.myshopify.com: shop,
design, brand, catalog, policies, agents.”, then calls read-document. Some clients show the document in a
reader view.
With the signed-in tools, you can ask about your own store without naming it:
Using ShopMD, what is our return window, and where does the policy say so?
If something goes wrong
Section titled “If something goes wrong”| What you see | What it means | What to do |
|---|---|---|
| “No published documents are available for …” | The store publishes no files, or you used its own domain. | Use the store’s .myshopify.com address. Check the store has the app and its files aren’t withdrawn. |
| “Unauthorized: sign in, or supply a valid ShopMD API token, to use this tool.” | A signed-in tool was called without a valid sign-in or token. | Sign in when the client offers, or check the token hasn’t been revoked or expired. It also happens if the app was uninstalled from the store, or the store is now linked to another ShopMD account. |
| “No connected store” on the sign-in page | Your ShopMD account has no linked store. | Install the app while signed in. See Install the Shopify app. |
| “IP rate limit exceeded. Try again in 60 seconds.” or “Token rate limit exceeded. Try again in 60 seconds.” | Too many calls in a short time. | Wait a minute. |
| A file you just withdrew or restored still shows the old state | The storefront check is reused for a few minutes. | Try again shortly. |
| A file is missing for a store with a storefront password | The server only returns files the storefront actually serves. | See Password-protected stores. |