OpenCode social media posting: connect PostWire's MCP server
"mcp" in your opencode.json with the URL https://postwire.io/api/mcp, then run opencode mcp auth postwire and sign in with your email. OpenCode then has PostWire's tools: it writes a different post for each network with generate_posts and publishes or schedules it with post_to_social and schedule_post on TikTok, Instagram, YouTube, LinkedIn, Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans. No key to paste: OpenCode registers itself with PostWire's OAuth server. The free plan includes the MCP server: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card.OpenCode prefixes each MCP tool with the server's name, so PostWire's arrive as postwire_generate_posts, postwire_schedule_post and so on. That makes them easy to switch off everywhere with one glob and switch back on for a single agent, which is how you keep publishing out of your everyday coding agent.
Updated . Written from PostWire's own code; vendor prices read on Oct 29, 2026. Live networks: TikTok, Instagram, YouTube, LinkedIn (personal profiles), Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans.
Set it up and post, step by step
- Add the server to opencode.json
Put this in
opencode.jsonin your project root, or in~/.config/opencode/opencode.jsonto have it in every project. It is OpenCode's own form for a remote MCP server; noheadersand nooauthblock are needed, because OpenCode detects that PostWire asks for a sign-in and registers itself.{ "$schema": "https://opencode.ai/config.json", "mcp": { "postwire": { "type": "remote", "url": "https://postwire.io/api/mcp", "enabled": true } } } - Sign in with your email
Run
opencode mcp auth postwire. OpenCode opens your browser on PostWire's sign-in; type your email and the 6-digit code PostWire sends you, and approve. That also creates a free PostWire account if you have none: no password and no card. OpenCode stores the token and refreshes it;opencode mcp listshows the server and its auth status. - Check that the tools are there
Start OpenCode and ask "what PostWire tools do you have?". It lists 26, among them
postwire_generate_posts,postwire_post_to_social,postwire_schedule_post,postwire_list_scheduled_postsandpostwire_get_post_status. If none show up,opencode mcp debug postwireshows the connection and the sign-in state. - Connect your social accounts
Ask "connect my LinkedIn and my Bluesky".
create_connect_linkreturns a one-hour link; open it and sign in to each network on its own page (Bluesky, Mastodon, Telegram and Discord take an app password, a token or a webhook there). OpenCode never sees those passwords: it holds a PostWire token, and PostWire holds the accounts. - Let PostWire write each network's post
"Read CHANGELOG.md and write this release's posts for LinkedIn, Bluesky and Mastodon."
generate_postsreturns one draft per network and publishes nothing: a first-person post for LinkedIn, a conversational one of up to 300 characters for Bluesky, a community-first toot with CamelCase hashtags for Mastodon. - Publish, or schedule it
After you approve, OpenCode calls
post_to_social, orschedule_postwith arun_attime (or"next_slot"for your next free queue slot):{ "name": "schedule_post", "arguments": { "platforms": ["linkedin", "bluesky"], "per_platform": { "linkedin": { "text": "We shipped CSV import this week. Here is what took us three tries to get right…" }, "bluesky": { "text": "csv import is live. it took us three tries, ask me which one hurt most" } }, "run_at": "2026-11-03T09:00:00-05:00" } } - Ask what is queued and what went out
"What's scheduled this week?" calls
list_scheduled_posts;cancel_scheduled_postremoves one before it goes out, andget_post_statusreturns each network's result with the link to the live post.
The config and commands are OpenCode's own, from its MCP servers documentation (read Oct 29, 2026); if your version differs, that page is the reference. Prefer to set it up by hand first? Open the dashboard, connect your accounts under Accounts and copy your key under API & MCP.
Social media posting tools for OpenCode, side by side
How each one connects to OpenCode and what it costs to start, read on its own OpenCode and pricing pages on Oct 29, 2026.
| Tool | Connects as | Sign-in | Free to start | Cheapest paid plan | Networks |
|---|---|---|---|---|---|
| PostWire | Remote MCP server in opencode.json | OAuth (opencode mcp auth) or API key | Free plan: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card | $9/mo — 3 businesses, every network in each post | 10, X on paid plans |
| Upload-Post | Remote MCP server in opencode.json | API key header | Free plan: 10 uploads a month, no card | $24/mo — 5 profiles | Not listed |
| Blotato | Remote MCP server | OAuth or API key header | No — creating an API key starts the paid plan | $29/mo | 9 |
Checked on Oct 29, 2026 (2026-10-29) on each vendor's own pricing or docs page, linked in the first column and below. Monthly billing in USD unless noted. "Not listed" means we could not find it on their page, not that it is missing.
Where PostWire is ahead
- No key to paste to start: OpenCode registers itself with PostWire's OAuth server, and
opencode mcp auth postwiresigns you in with your email and a 6-digit code, which creates the free account too. Upload-Post's OpenCode setup uses an API key header. - The MCP server is on the free plan, without a card and without a time limit: 10 posts a month to start. On Blotato, creating an API key starts its $29 plan.
- The post is written for each network, by the same server that publishes it:
generate_poststurns one idea into a LinkedIn post, a Bluesky post and a Mastodon toot in one call. - Mastodon, Telegram and Discord in the same call as TikTok, Instagram, YouTube, LinkedIn, Facebook Pages and Bluesky. Blotato's OpenCode page lists nine platforms.
- The cheapest paid plan here: $9 a month for 3 businesses. Upload-Post $24, Blotato $29.
- A person approves what an unattended agent queued: on paid plans, approval rules hold the post until you approve it from an emailed link.
- OpenCode docs — MCP servers (remote servers in opencode.json, OAuth with dynamic client registration, opencode mcp auth, "oauth": false with headers, tools globs, per-agent tools): opencode.ai/docs/mcp-servers/
- OpenCode docs — CLI (opencode run, opencode mcp add / list / auth / logout / debug): opencode.ai/docs/cli/
- OpenCode docs — config (global ~/.config/opencode/opencode.json; opencode.json in the project root): opencode.ai/docs/config/
- Upload-Post — OpenCode (mcp.upload-post.com/mcp with an "ApiKey" Authorization header; "OpenCode gains 50 tools"; "Start free — no card"): www.upload-post.com/opencode-social-media/
- Upload-Post plans (llms-full.txt: Free 10 uploads a month, 2 profiles, no credit card; Basic $24 a month, 5 profiles): www.upload-post.com/llms-full.txt
- Blotato — OpenCode ("post to 9 platforms"; mcp.blotato.com/mcp with OAuth or the blotato-api-key header; Starter $29/mo, creating an API key starts the paid plan): www.blotato.com/ai-agent/opencode
OAuth or an API key: which one for OpenCode
- OAuth (the steps above) suits your own machine, where a browser can open once. PostWire's server speaks OAuth 2.1 with PKCE, lets OpenCode register itself as a client, and accepts the local callback address OpenCode listens on.
- An API key suits a server or a container with no browser. Copy the key in the dashboard under API & MCP, set it as
POSTWIRE_API_KEY, and turn OpenCode's sign-in detection off for this server so it sends the header instead:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"postwire": {
"type": "remote",
"url": "https://postwire.io/api/mcp",
"oauth": false,
"headers": { "Authorization": "Bearer {env:POSTWIRE_API_KEY}" }
}
}
}
{env:…} is OpenCode's way to read an environment variable, so the key stays out of a file you might commit. Source: OpenCode, MCP servers, read Oct 29, 2026.
Give the PostWire tools to one agent only
OpenCode's docs note that MCP servers add to your context. To keep PostWire's tools out of your everyday coding sessions and give them to a single agent, turn them off globally with a glob and back on in that agent's config:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"postwire": { "type": "remote", "url": "https://postwire.io/api/mcp", "enabled": true }
},
"tools": { "postwire*": false },
"agent": {
"social": { "tools": { "postwire*": true } }
}
}
- A scheduled run without a chat:
opencode run "write this week's release posts for LinkedIn and Mastodon from CHANGELOG.md and schedule them"runs it non-interactively, for a cron job or CI. - Schedule, and the post no longer depends on OpenCode: a post queued with
schedule_postis published by PostWire at its time, with OpenCode closed. - A person can have the last word: on paid plans, a brand's approval rules hold what the agent queues until you approve it from an emailed link. An agent or an API key cannot approve it.
- The plan is the ceiling: no credits to run out of mid-run. The plan sets the posts a month (10 on Free, 1,000 on Starter), and
my_accounttells the agent what is left; the free plan allows 60 API requests a minute.
What it does not do
PostWire writes, publishes and schedules your own posts. It does not read your timeline, answer comments or send direct messages, and it connects to OpenCode as a remote MCP server, not as an OpenCode plugin. X is on paid plans; Threads, Reddit and Pinterest are not available.
Questions people ask
Can OpenCode post to social media?
Yes, once it has a publishing MCP server. Add https://postwire.io/api/mcp as a remote server under "mcp" in opencode.json, run opencode mcp auth postwire, and OpenCode can write, publish and schedule posts on TikTok, Instagram, YouTube, LinkedIn, Facebook Pages, Bluesky, Mastodon, Telegram, Discord, and X on paid plans.
Does OpenCode support remote MCP servers?
Yes. OpenCode's documentation describes remote servers in opencode.json with "type": "remote" and a url, OAuth that it detects and completes by itself with dynamic client registration, and headers for API keys (read Oct 29, 2026).
Do I need an API key?
No. opencode mcp auth postwire opens PostWire's sign-in, which asks for your email and a 6-digit code. On a machine without a browser, use an API key instead: set "oauth": false and send it as Authorization: Bearer {env:POSTWIRE_API_KEY}.
Does OpenCode get my social media passwords?
No. You connect each network on PostWire's own pages through a one-hour link the agent gives you. OpenCode holds only a PostWire token, and opencode mcp logout postwire removes it.
What are the PostWire tools called in OpenCode?
OpenCode prefixes MCP tools with the server's name, so with the server saved as postwire they are postwire_generate_posts, postwire_post_to_social, postwire_schedule_post and so on, 26 in all. A "postwire*" glob in "tools" turns them all on or off.
Do scheduled posts need OpenCode to be running?
No. A post queued with schedule_post is stored and published by PostWire at its time. OpenCode is only needed to write and queue it.
How much does it cost?
The free plan includes the MCP server: 1 business, 10 posts a month, 5 AI drafts a day, 2 networks per post, no card. Starter is $9 a month for 3 businesses and Pro $29 for 10, with every network in each post; paid plans have a 14-day refund.
Try it on one business, free.
The free plan is 1 business, 10 posts a month, 5 AI drafts a day (about 20 a month) and 2 networks per post — every network connects free, no card, no time limit. Paid plans start at $9 a month and have a 14-day refund; Pro can be tried free for 7 days and Agency for 14, with a card at checkout and nothing charged that day.