Write SEO blog post drafts with OpenCode
Writing blog post drafts in OpenCode with StoreSEO means describing the post in your terminal session and letting StoreSEO's blog writer save a finished SEO article as a draft in the Shopify blog you pick.
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 are in OpenCode's terminal interface, usually inside a project, with StoreSEO added through opencode mcp add and signed in with opencode mcp auth storeseo. You type the brief: the topic, the keyword, a word count and whether a featured image is wanted. OpenCode calls storeseo_start first, since every StoreSEO tool needs the conversation id it returns, and then storeseo_list_blogs. The result lists each synced blog with its numeric Shopify id, title and article count; if it is empty, the blogs have to be synced in the StoreSEO app, which no tool here can do.
The next step is the one to read closely. Writing a post spends AI Content Optimizer credit, which grows with word count and with a featured image, so StoreSEO tells the agent to state the cost and wait for your yes. You answer in the session. OpenCode then calls storeseo_generate_blog_post with the blog id and your brief, and polls storeseo_get_blog_post_job with the returned job id. The writing takes a few minutes, and you see each poll as a tool call in the transcript with steps completed out of total, ending in completed, failed or cancelled. Once it completes, you can have OpenCode read the draft's record with storeseo_get_resource_seo using resource type article.
Being in a terminal helps in small ways. You can keep the brief, the keyword list and the title options in a file in the project and tell OpenCode to use it, and you can keep working on code in another session while the job runs. What does not change is where the result lives: the post is a draft article inside Shopify, not a file in your repository, and you review it and publish it from Shopify admin.
-
You: Write a 1,200 word draft on how to care for linen shirts in the News blog.
- storeseo_start read-only
- storeseo_list_blogs read-only
-
OpenCode: News is blog 1042. The post spends AI credit based on its length and is saved as a draft, not published. Should I start the job?
-
You: Yes, start it.
- storeseo_generate_blog_post needs approval
- storeseo_get_blog_post_job read-only
-
OpenCode: The job is at step 4 of 5 and is not complete, so I will not call the draft finished. Checking again now.
What to ask OpenCode
Use StoreSEO to list my blogs and write a 1,200 word draft on how to care for linen shirts in the News blog. Give me the credit cost and wait for my yes.
Read brief.md in this folder and write the StoreSEO blog draft it describes, with a featured image. Tell me how far along the job is.
Check the SEO record of the blog draft you just created and list the issues I should fix before publishing.
- List my blogs and write a 1,200 word draft on how to care for linen shirts in the News blog. Tell me the cost first.
- Write a draft post targeting best gifts for coffee lovers, with a featured image.
- How far along is the blog post you started?
- Check the SEO score of the draft you just wrote.
- Draft three post ideas for my store and write the strongest one.
What StoreSEO does: blog post drafts
StoreSEO writes a full blog post with AI and saves it as a draft article in the Shopify blog you choose, optionally with a featured image. Nothing is published: you review and publish from Shopify admin.
Requires: Spends AI Content Optimizer credit; the cost grows with word count and a featured image. Blogs must be synced in the StoreSEO app.
- 1
Pick the blog
The agent lists your synced blogs, the sections posts go into, with their ids. An empty list means the blogs need syncing in the StoreSEO app first.
- 2
Agree the brief and cost
Topic, keyword, length and whether to add a featured image. The cost grows with length and the image, so the agent tells you and waits for your yes.
- 3
Generate in the background
Writing takes a few minutes. The agent polls the job and reports progress, and does not present the post as finished while it runs.
- 4
Check the draft
When the job completes, the agent can read the draft article's SEO record. You review and publish the post from Shopify admin.
Blog post drafts reference
| Output | A draft article in the chosen Shopify blog, never published live |
|---|---|
| Featured image | Optional; uploaded with the draft and adds to the cost |
| Run time | A few minutes in the background |
| Insufficient credit | The call fails before anything is queued or spent |
| Blogs | Only blogs synced with StoreSEO are listed; syncing is done in the app |
| Failed runs | The job reports the error and credits are settled automatically |
Rules OpenCode follows
- The agent states the expected credit use and waits for your yes before it starts a post.
- Posts are saved as drafts only; publishing is done by you in Shopify admin.
- While the job runs, the agent reports progress and never presents the draft as finished.
In OpenCode
The OpenCode documentation describes deny rules for MCP tools but no ask-first mode, so a StoreSEO call that is not denied runs when the agent makes it. For this job that means the cost confirmation StoreSEO asks the agent for is the main check on spending credit, so read the cost it quotes before you answer. If you want a client-side stop, deny storeseo_generate_blog_post by name in the sessions where you are only auditing, and remove the rule for a session where you intend to write. Also remember that opencode mcp add writes to the project configuration unless you pass --global.
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
Does OpenCode ask me before it spends AI credit on a blog post?
StoreSEO tells the agent to name the cost and wait for your yes, and OpenCode follows that in the session. OpenCode's own documentation describes deny rules but no ask-first mode, so deny the generate tool by name if you want a hard stop.
Where does the finished blog post end up?
In the Shopify blog you chose, as a draft article. It is not written into your project folder. You review it and publish it from Shopify admin.
Will the agent publish a blog post on my store?
No. StoreSEO saves generated posts as drafts in the Shopify blog you choose. You review and publish them from Shopify admin.
How long does a blog post take?
A few minutes. The writing runs in the background and the agent checks the job until it is completed, failed or cancelled.
What does a blog post cost?
It spends AI Content Optimizer credit, and the amount grows with the word count and with a featured image. If you do not have enough credit the call fails before anything is spent.
Why does the agent say I have no blogs?
Only blogs synced with StoreSEO are listed. Sync your blogs in the StoreSEO app, then ask again.
Keep going
Blog post drafts with other agents
More OpenCode guides