# Post about what you ship, straight from OpenCode

[All AI connectors](https://margin.design/agents) · [Agent setup playbook](https://margin.design/get-started.md)

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.

## Things you can just ask

- **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.

## How it works

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

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.
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.
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.


## Why teams use Margin

- **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.
- **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.
- **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.
- **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.

## 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.

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

## Frequently asked questions

### 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.

## Next steps

- Get started: https://margin.design/signin
- Full agent setup playbook: https://margin.design/get-started.md
- MCP endpoint: https://margin.design/mcp

## Sources

Checked on 26 Nov 2026.

- [OpenCode docs: MCP servers](https://opencode.ai/docs/mcp-servers/)
- [OpenCode docs: config](https://opencode.ai/docs/config/)
- [OpenCode docs: providers](https://opencode.ai/docs/providers/)

