Manage sitemaps and indexing with OpenCode
Managing sitemaps and indexing with OpenCode means asking the open-source terminal agent to read StoreSEO's sitemap, noindex and nofollow flags on your Shopify products, collections, pages and articles, change them one resource at a time and set up the HTML sitemap.
Last updated: October 2026
Set up OpenCode for StoreSEO
Skip this if OpenCode is already connected. The full guide, with the alternatives, is on the OpenCode page.
- 1
Add StoreSEO to OpenCode
Run this from the project that should use StoreSEO, or add --global to make it available in every project. OpenCode writes a remote server entry to its configuration; the equivalent hand-written entry is shown in the next step.
Terminalopencode mcp add storeseo --url https://mcp.storeseo.com/mcp
- 2
Sign in to your store
Remote servers use OAuth by default. Run the auth command, then pick your Shopify store in the browser and approve access. Inside OpenCode, /mcps does the same: select storeseo and sign in. opencode mcp list should then show it as connected.
Terminalopencode mcp auth storeseo opencode mcp list
How does this work in OpenCode?
You open OpenCode in the theme project, with the storeseo server added by opencode mcp add and signed in with opencode mcp auth storeseo, and type a request such as which pages are excluded from the sitemap. Tool names reach the model as server_tool, so the agent calls storeseo_start and then storeseo_list_resource_sitemaps, asking for the page resource type and filtering on the sitemap flag. Each call prints in the session as it runs and every one is a read. The same session can hold the theme code, so a question about why a template carries a robots meta tag sits next to the StoreSEO flag for that page.
Writing a flag is a separate step. A noindex flag removes a page from search results, so StoreSEO tells the agent to name the resource and the flags and wait for your yes before storeseo_update_resource_sitemap. OpenCode's MCP documentation describes deny rules but no ask-before-running mode, so StoreSEO's confirmation in the chat is the main check unless you add a client-side stop. A permission rule matching storeseo_update_resource_sitemap with the deny effect hides that tool entirely, which is a clean way to run a read-only audit session. Then ask the agent to list the resource again, since the flags can change in the StoreSEO app.
The HTML sitemap uses storeseo_get_html_sitemap_settings first, because an update replaces the settings wholesale, then storeseo_update_html_sitemap to generate and enable the page, then storeseo_list_sitemap_menus for the edit links. You add the sitemap link to a menu in Shopify admin; no tool does it. Everything in this job runs on any active plan, so it works on the free plan too.
-
You: Which products are left out of the sitemap?
- storeseo_start read-only
- storeseo_list_resource_sitemaps read-only
-
OpenCode: Gift Card Test and Sample Pack are excluded from the sitemap; only Gift Card Test is also noindex. Should I put Sample Pack back in the sitemap?
-
You: Yes, put Sample Pack back.
- storeseo_update_resource_sitemap needs approval
- storeseo_list_resource_sitemaps read-only
-
OpenCode: Sample Pack is back in the sitemap. Gift Card Test is unchanged.
What to ask OpenCode
Use StoreSEO to list my products that are noindex or excluded from the sitemap. Read only, no writes.
Exclude the product Gift Card Test from the sitemap and set it to noindex. Show me the resource and flags first and wait for my yes.
Check my HTML sitemap settings with StoreSEO, set it up if it is missing and list the menus I can add it to.
- Which of my products are set to noindex or excluded from the sitemap?
- Exclude the product Gift Card Test from the sitemap and set it to noindex.
- Set up an HTML sitemap for my store and tell me which menu to add it to.
- Are any of my blog posts set to nofollow?
- Remove noindex from the page About Us.
What StoreSEO does: sitemaps and indexing
StoreSEO controls two things here: per-resource sitemap flags (left out of the XML sitemap, noindex, nofollow) and an HTML sitemap page. The agent lists flags, changes them one resource at a time and walks you through the HTML sitemap setup.
- 1
List the flags
The agent lists products, collections, pages or articles with their sitemap, noindex and nofollow flags, filtered as you ask.
- 2
Change one resource
After your yes it sets the flags on one resource, which writes the matching Shopify metafields.
- 3
Re-read before reporting
Flags can also change in the StoreSEO app, so the agent re-lists before telling you the current state.
- 4
Create the HTML sitemap
It reads the HTML sitemap settings, then generates and enables the page.
- 5
Add it to a menu
It lists your navigation menus with their edit links; you add the sitemap link to a menu in Shopify admin, then the agent marks setup complete.
Sitemaps and indexing reference
| Flags per resource | Excluded from sitemap, noindex, nofollow |
|---|---|
| Resource types | Products, collections, pages and articles |
| Where flags live | Shopify metafields on the resource |
| HTML sitemap steps | Generate and enable, add the link to a menu yourself, mark complete |
| HTML sitemap settings | Replaced wholesale on update; read first |
| Menus | Listed with edit links; the menu you choose is not stored |
| Plan | Every active plan |
Rules OpenCode follows
- A noindex flag removes a page from search results, so the agent names the resource and waits for your yes.
- The agent re-lists flags in the same turn before telling you their current state.
- Adding the sitemap link to a menu is a step you do in Shopify admin; no tool does it.
- HTML sitemap settings are read before every update, because an update replaces them.
In OpenCode
OpenCode's documentation describes deny rules for MCP tools but no setting that asks before running one, so for a noindex change StoreSEO's confirmation in the chat is the main check. If you want a client-side stop, add a permission rule with the deny effect for storeseo_update_resource_sitemap and storeseo_update_html_sitemap, and lift it only for the session where you mean to write. Also note that opencode mcp add writes to the project configuration unless you pass --global, so a sitemap session in another folder will not see the server.
What runs without asking. Reads such as SEO scores, store listings, settings and Google reports run straight away. Generating a preview spends AI credit but writes nothing, and StoreSEO tells the agent to say what a generation will cost before it runs one. Applying content, optimizing images, changing settings, publishing llms.txt or agents.md, writing a product description and deleting anything wait for your yes in the conversation. That yes is an instruction the agent follows, not a lock on the server, so your client's own tool-approval setting is the hard stop.
Questions
How do I stop OpenCode from changing sitemap flags by accident?
Add a permission rule with the deny effect for the StoreSEO update tools, for example storeseo_update_resource_sitemap. OpenCode's docs describe deny rules for MCP tools, so the agent can still list flags but cannot write them.
Does OpenCode need the config layout for the HTML sitemap tools?
No extra setup is needed beyond the storeseo server entry. In OpenCode V2 it sits under mcp.servers, and the sitemap tools then work on any active StoreSEO plan.
What is the difference between excluding a page from the sitemap and noindex?
Excluding a resource leaves it out of your XML sitemap, so crawlers are not pointed at it. Noindex tells search engines not to show the page in results even if they find it. StoreSEO sets each flag separately per resource.
Can the agent add the HTML sitemap to my menu?
No. The agent generates the HTML sitemap and lists your menus with their edit links, and you add the sitemap link to a menu in Shopify admin. Then the agent can mark setup complete.
Do sitemap tools need a paid plan?
No. The sitemap tools work on every active StoreSEO plan.
Why does the agent check the flags again before answering?
Sitemap flags can also be changed in the StoreSEO app outside the conversation, so an earlier listing may be stale. Re-reading in the same turn keeps the answer accurate.
Keep going
Sitemaps and indexing with other agents
More OpenCode guides