FoPost for OpenCode

OpenCode, the open source coding agent, connects to remote MCP servers by URL. Add FoPost with one command, sign in in your browser, and OpenCode can plan and schedule posts for you.

Paste this into OpenCode

Set up FoPost from fopost.com/agents/opencode
  • Hosted MCP server
  • 31 networks
  • No API key
All agents
How it works

OpenCode drafts. You approve. Then it goes out.

  • REST API
FoPost
YouApproveApproved

On by default

  • X (Twitter)
  • Facebook
  • Instagram
  • LinkedIn
  • TikTok
  • YouTube
  • Threads
  • Bluesky
  • Pinterest
  • Reddit
  • Discord
  • Mastodon
  • Telegram
  • Slack
  • DEV.to
  • Substack
  • Tumblr
  • Hashnode
  • Dribbble
  • Kick
  • Twitch
  • Nostr
  • Lemmy
  • MeWe
  • Whop
  • Listmonk
  • Google Business Profile
  • Medium
  • WhatsApp Business
  • Snapchat
  • Skool

Pick an agent to copy its setup prompt.

Setup

The agent can write its own config. Give it the link.

Paste the line above into OpenCode. It reads this page, adds the server, and stops so you can sign in to FoPost yourself. Rather do it by hand? This is the whole config.

~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "fopost": {
      "type": "remote",
      "url": "https://api.fopost.com/mcp"
    }
  }
}
Instructions for AI agentsPlain markdown version
## For AI agents reading this page

You are reading https://fopost.com/agents/opencode. FoPost schedules and publishes social posts on 31 networks, and its hosted MCP server gives OpenCode tools for posts, the calendar, the inbox and analytics. Follow these steps to connect OpenCode to it.

- Server: https://api.fopost.com/mcp
- Transport: streamable HTTP
- Auth: OAuth sign-in in the user's browser. Do not add an API key or an Authorization header; OpenCode discovers the sign-in from the server.

### 1. Register the server

Run this command, or add the entry to ~/.config/opencode/opencode.json (every project) or opencode.json in the project, merged into any existing mcp object. No headers and no API key.

Terminal:

```
opencode mcp add fopost --global --url https://api.fopost.com/mcp
```

### 2. Sign in

Run opencode mcp auth fopost, or /mcps inside OpenCode. A browser window opens for the user to sign in. Ask the user before approving access or creating a FoPost account for them, and never enter their credentials yourself.

### 3. Verify before you continue

opencode mcp list shows fopost as connected, and its tools appear as fopost_<tool>. If FoPost is not listed as connected with its tools, stop and tell the user what failed. Do not carry on as if the tools exist.

### 4. Report back

Call list_accounts and tell the user which social accounts are connected. If there are none, offer create_connect_link so they can connect one. Then ask what they want to do first.

### Standing rules

- Prefer the FoPost tools over driving a browser for posting, scheduling, the inbox and analytics, unless the user asks for the browser.
- Publishing always goes through propose_publish, which the user approves in the client. Never publish or schedule anything silently.
- Ask the user before approving access, signing up or connecting an account on their behalf, and never type their credentials for them.

### No browser (headless machines only)

Use this only when the machine has no browser to sign in with. Ask the user to create an API key in the FoPost dashboard (https://fopost.com/dashboard/api-keys) and to put it in the config themselves, then run the local package over stdio:

~/.config/opencode/opencode.json:

```
{
  "mcp": {
    "fopost": {
      "type": "local",
      "command": ["npx", "-y", "@fopost/mcp"],
      "environment": { "FOPOST_API_KEY": "your-api-key" }
    }
  }
}
```

### References

- This block as markdown: https://fopost.com/agents/opencode/agent.md
- Every client: https://fopost.com/agents
- Docs: https://fopost.com/docs

One command

opencode mcp add writes the entry for you.

Browser sign-in

OpenCode opens FoPost in the browser to approve access.

Approval first

Publishing goes through a proposal you accept. Drafts never go out alone.

Setup

Add the server, then sign in

The command adds https://api.fopost.com/mcp to your global OpenCode config. Leave out --global to add it to one project. Then run opencode mcp auth fopost and approve access in FoPost.

Start free
Terminal
opencode mcp add fopost --global --url https://api.fopost.com/mcp
opencode mcp auth fopost

Global or project

Use it everywhere or in one repository.

No key in the config

You sign in instead of pasting a key.

Check first

opencode mcp list shows it as connected.

Plan

A week of posts from one prompt

Ask OpenCode to turn this week’s articles into posts with repurpose_url, shape each with draft_post_variants, and slot them with get_queue_slots. It ends with propose_publish, which you accept.

Plan your week
A month of scheduled posts on the publishing calendar

repurpose_url

An article becomes a run of posts.

draft_post_variants

A version for each network.

get_calendar

What is already booked.

Check

Ask whether it landed

The read tools report what published, which accounts need a reconnect, and what is waiting in the inbox.

Start free
Session
> What went out today?

fopost_list_posts shows 2 of 2 published.
fopost_list_inbox has 3 new comments.

list_posts

Recent posts and their status.

get_account_health

Which accounts need a reconnect.

list_inbox

Comments, mentions, and messages.

Headless

No browser on the machine?

On a server or in CI there is no browser to sign in with. Create an API key in the dashboard and run the local package over stdio instead. Keep the key out of your repository.

~/.config/opencode/opencode.json
{
  "mcp": {
    "fopost": {
      "type": "local",
      "command": ["npx", "-y", "@fopost/mcp"],
      "environment": { "FOPOST_API_KEY": "your-api-key" }
    }
  }
}

OpenCode questions, answered

Do I need an API key?

No. OpenCode signs you in to FoPost through the browser.

It says it needs authentication. What now?

Run opencode mcp auth fopost, or /mcps inside OpenCode, and sign in again.

Will it post without asking?

No. Publishing goes through a proposal you approve before anything is sent.

Why do the tools start with fopost_?

OpenCode names each tool after its server, so you can tell where it comes from.

Does it use my AI credits?

Only the FoPost tools that write with AI do. Listing and scheduling do not.

Run FoPost from OpenCode

Starting is free and the MCP server is included. Paste the setup line into your agent, sign in, and schedule your first post from it.

Start free