← All articles

OpenCode MCP: How to Post to Social Media From Your Terminal

OpenCode is an open source coding agent that lives in your terminal. It already reads your repo, writes code and runs commands. With one MCP server added, it can also announce what it shipped: post release notes to X, LinkedIn, Bluesky, Threads and the rest without you opening a single social media dashboard.

This guide shows how to add a remote MCP server to OpenCode, using 1Social as the example, and how to turn "we just merged v2.3" into posts on every network you use.

What an OpenCode MCP server actually does

MCP (Model Context Protocol) is the standard way to give an AI agent new tools. OpenCode supports two kinds of MCP servers:

  • Local servers run as a process on your machine, started by a command.
  • Remote servers live at a URL. OpenCode connects over HTTP and, for most hosted servers, signs you in with OAuth.

Every tool an MCP server exposes shows up in OpenCode next to its built-in tools. The OpenCode docs point out that MCP tools consume model context, so add only the servers you actually need. A social posting server is a good candidate because you use it at a clear moment: right after a release.

Why use 1Social as your social media MCP

1Social is one MCP server for twelve networks: Instagram, TikTok, LinkedIn, X, Bluesky, Threads, Facebook, YouTube Shorts, Pinterest, Telegram, Tumblr and Discord. You connect your accounts once in the browser, and any MCP client can then publish to them.

What the server gives your agent, according to the 1Social MCP page:

  • Publish to several networks at once, or schedule up to 30 days ahead
  • Pre-publish checks: character counts per network, whether an image is required, and the cost
  • Receipts that show what reached each network, what failed and what is unknown
  • Retry for a single failed network
  • Image or video attachments
  • Edit, unschedule or delete posts where the network allows it

Sign-in happens through OAuth in your browser. There is no API key to paste into a config file, and the agent never sees your social account passwords.

Step 1: Create an account and connect your networks

Sign up at 1social.dev/login. In most countries this starts a free trial. Then connect the networks you want to post to. You can connect all twelve or only the two or three you use; it takes a couple of minutes in the browser.

Do this before touching OpenCode. The agent can only post to networks that are already connected.

Step 2: Add the remote MCP server to OpenCode

The 1Social server URL is:

https://mcp.1social.dev/mcp

How you add it depends on your OpenCode version, because the config layout changed between documentation versions.

Current OpenCode docs: the CLI or mcp.servers

The current docs offer a command that writes the server into your project config:

opencode mcp add 1social --url https://mcp.1social.dev/mcp

Add --global to make it available in every project, not just the current one. If you prefer editing config by hand, the current layout puts servers under mcp.servers:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "1social": {
        "type": "remote",
        "url": "https://mcp.1social.dev/mcp"
      }
    }
  }
}

Older OpenCode versions: servers directly under mcp

The v1 docs define each server directly under mcp, with an enabled flag:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "1social": {
      "type": "remote",
      "url": "https://mcp.1social.dev/mcp",
      "enabled": true
    }
  }
}

Either way, leave out any headers block and do not set oauth to false. 1Social uses OAuth, and OpenCode handles OAuth for remote servers by default.

Step 3: Sign in with OAuth

OpenCode starts the OAuth flow when the server asks for authentication. You can also start it yourself:

opencode mcp auth 1social

A browser window opens, you sign in to 1Social and approve access, and OpenCode stores the tokens outside your project config. Check the result with:

opencode mcp list

If you run OpenCode over SSH or inside a container, the docs note that the sign-in page may not load on its own. Copy the URL from the browser's address bar and paste it into the sign-in prompt. To remove stored credentials later, run opencode mcp logout 1social.

Step 4: Post a release announcement from the terminal

Now ask OpenCode in plain language. A prompt that works well after a release:

Read the changes since the last git tag and write a short release announcement. Post it to X, LinkedIn, Bluesky and Threads with 1Social. Check each network's limits first and show me the text before you publish.

OpenCode reads the commits, drafts the post, runs the pre-publish check and adapts the text: 280 characters for X, 300 per post on Bluesky, 500 on Threads, a longer version for LinkedIn. Long text can be split into a thread on networks that support it. After publishing, you get a receipt per network.

A few prompts worth saving:

  • "Announce the v2.3 release on Discord and Telegram, link to the changelog."
  • "Schedule a LinkedIn post about the new API for Tuesday 10:00."
  • "The Bluesky post failed. Retry only Bluesky."
  • "Delete the X post we published an hour ago, it has a typo."

Limits you should know before you automate

1Social is honest about what each network allows, and your agent will run into the same rules:

  • Media-only networks. Instagram, TikTok, YouTube Shorts and Pinterest have no text-only posts. They need an image or video. YouTube Shorts needs exactly one vertical video, and Pinterest takes images only for now. A text release note will not go there without media attached.
  • Deleting is not always possible. Instagram, TikTok and YouTube do not allow deletion through 1Social. On Threads, deleting works only for accounts connected or reconnected from 27 November 2026.
  • Scheduling is a Pro feature. The Solo plan ($29 per month, 600 deliveries) publishes right away. Pro ($49 per month, 1,600 deliveries) adds scheduling up to 30 days ahead and email alerts when a post fails. See pricing for details.
  • X costs more. An X delivery counts as 3 units, or 15 when the post includes a link.
  • Some networks never confirm. A post can show as unconfirmed, and TikTok publishes but reports no metrics. Failed deliveries are retried automatically, and failures caused by 1Social or a network outage do not count against your quota.

A good habit: tell OpenCode to show you the final text and wait for your go-ahead before it publishes. The receipts make it easy to see exactly what happened afterwards.

Troubleshooting the OpenCode MCP connection

  • The tools do not appear. Run opencode mcp list. If the server shows as disconnected, check the URL and that the server is not disabled in your config.
  • Wrong config layout. If OpenCode ignores the server, you may be using the v1 layout on a newer version or the reverse. Use opencode mcp add, which writes the right format for your version, or match the docs for your version.
  • Auth keeps failing. Run opencode mcp logout 1social, then opencode mcp auth 1social again.
  • A network is missing. The agent can only post to networks connected in your 1Social account. Connect it in the browser and ask again.

Start posting from OpenCode

The setup takes a few minutes: connect your networks, add one remote MCP server, sign in once. After that, every release can end with a single sentence to OpenCode instead of a round of copy-paste across tabs. Create your 1Social account and try it on your next release.

Frequently asked questions

How do I add a remote MCP server to OpenCode?

In current OpenCode versions run opencode mcp add <name> --url <server URL>, or add the server under mcp.servers in your config with type remote and the URL. Older v1 configs list servers directly under mcp with type, url and enabled.

Does OpenCode support OAuth for MCP servers?

Yes. OAuth is on by default for remote servers. OpenCode starts the sign-in when the server asks for it, or you can run opencode mcp auth <name>. Tokens are stored outside your project config.

Which social networks can OpenCode post to with 1Social?

Twelve: Instagram, TikTok, LinkedIn, X, Bluesky, Threads, Facebook, YouTube Shorts, Pinterest, Telegram, Tumblr and Discord. Instagram, TikTok, YouTube Shorts and Pinterest need an image or video.

Can OpenCode schedule social media posts?

Yes, through 1Social, up to 30 days ahead. Scheduling is part of the Pro plan ($49 per month). The Solo plan ($29 per month) publishes immediately.

Do I need an API key to connect 1Social to OpenCode?

No. 1Social signs you in through OAuth in your browser. There is no API key to paste, and the agent never sees your social account passwords.