OpenCode MCP

Post about what you ship, straight from OpenCode

Add Margin to OpenCode with one command and sign in through your browser. Ask for a recap carousel or a launch thread from your git log: the model you run in OpenCode designs editable frames on your Margin canvas with your brand board and schedules them. Posting right away always asks you first.

OpenCode · November recapBrand board loaded
Example
You15:31

Summarize what we shipped this month from the git log. Make a recap carousel for LinkedIn and Instagram plus a Bluesky post, all scheduled for Friday.

Assistant + Margin15:34
  • Picked 6 user-facing changes from this month's commits
  • Designed a 6-slide recap carousel and a Bluesky card
  • Scheduled 3 posts for Friday in your Margin calendar

The recap is on your Monthly Updates canvas and all three posts are set for Friday. You can edit or cancel them in Margin until then.

MONTHLY RECAP · 3 POSTSShipped in NovemberLinkedIn 4:5 · Instagram 4:5 · Bluesky

01 · Just ask

Start with a normal sentence.

Describe what you want to share. Your assistant handles the layout, sizing, and draft scheduling.

Weekly recap

“Read the git log since Monday and make a "Shipped this week" card for LinkedIn and Bluesky.”

Picks the changes worth telling users about and designs an editable card at each network's size.

Launch thread

“Draft a Bluesky thread for our 1.0 launch, with the hero image from the landing page in the first post.”

Brings the image into Margin, writes the thread and saves it as a draft you can change before it's scheduled.

Timing

“When do our posts on X and LinkedIn do best? Schedule the release announcement for the next good slot.”

Reads your best times per network and schedules the post, which waits in your calendar until then.

02 · How it works

From setup to scheduled post.

Two commands: one adds the server, one signs you in through the browser. No keys go in your config.

  1. 01

    Add Margin as an OpenCode MCP server

    Run opencode mcp add margin --global --url https://margin.design/mcp. --global puts it in your global config, so every project sees it.

  2. 02

    Sign in with opencode mcp auth

    Run opencode mcp auth margin, sign in to Margin in the browser, choose the organizations OpenCode may open and press Allow.

  3. 03

    Ask from your session

    Ask for the post where you work. Designs land on your Margin canvas, and scheduled posts wait in your calendar until they go out.

03 · Why Margin

Design, review, and publish together.

Every graphic OpenCode makes stays editable on your brand canvas, so your team always has the final word.

01

Bring any model, local ones too

OpenCode runs on the provider you pick, from a hosted API to a model on your own machine through Ollama or LM Studio. Margin brings the canvas, the brand board and the scheduling.

02

Plan from your own numbers

Ask which posts did best and when your audience is around. Margin gives per-network stats and best times, so OpenCode plans from your results.

03

Editable from the first draft

Designs are HTML frames on a shared canvas, so a typo is a quick fix by hand or in the next prompt, and your team can comment on any frame.

04

Nothing goes live by surprise

Posting right away always asks you first, showing what each account gets. Scheduled posts and drafts wait in the Margin calendar, where you can edit or cancel them.

Setup

Add Margin to OpenCode in one command

Then run opencode mcp auth margin and sign in to Margin in your browser. --global makes Margin available in every project. In your config the server is named margin. The full playbook for agents is get-started.md.

Terminal
opencode mcp add margin --global --url https://margin.design/mcp

Bring your own assistant

From idea to published post.

Keep your brand board, editable designs, team review, and 9-network scheduling in one workspace, powered by the assistant you already use.

04 · FAQ

Common questions.

Quick answers on connecting your assistant, editing designs, and staying in control before publishing.

Can I add Margin by editing opencode.json instead?

Yes. In OpenCode 2, put it under mcp.servers in ~/.config/opencode/opencode.json: "margin": { "type": "remote", "url": "https://margin.design/mcp" }. OAuth is on by default for remote servers, so no key goes in the file.

Where does OpenCode keep the sign-in?

Outside your project files. OpenCode stores the credentials on its own and refreshes them, so nothing to do with Margin ends up in your repo.

Does the model I pick in OpenCode matter?

Yes. The model does the writing and the layout, so a stronger one makes better posts. Margin adds no model of its own: the thinking runs on the provider you set up in OpenCode.

Sources · checked 26 Nov 2026