Using sfeed with OpenCode

OpenCode can use sfeed through terminal commands or MCP. MCP is the better fit when you want OpenCode to inspect status, pick a Page, and post or schedule content through named tools.

If you want OpenCode to work through setup step by step in the terminal, use the agent setup prompt.

1. Install and authenticate

curl -fsSL https://sfeed.dev/install.sh | sh
sfeed auth facebook

This is enough for OpenCode to use the plain CLI when it has shell access.

2. Optional: add MCP tools

opencode mcp add

Choose a local MCP server, name it sfeed, and use this command:

sfeed mcp

You can also edit opencode.json directly.

Config form

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "sfeed": {
      "type": "local",
      "command": ["sfeed", "mcp"],
      "enabled": true
    }
  }
}

First prompt to try

Use sfeed to check my status. If MCP tools are available, use sfeed_status. Otherwise run sfeed status. If more than one Page is connected, list the Pages and ask which one to use.

CLI-only prompts

Run sfeed status and summarize my connected Pages.

Run sfeed pages and tell me which ones have Instagram connected.

Run a dry run for "Daily update is ready" before publishing.

MCP prompts

Use the sfeed MCP tools to list my connected Pages.

Use sfeed_post to schedule a Facebook post for tomorrow morning with the text "Daily update is ready". Ask me to confirm before scheduling.

Use sfeed_schedule_list to show pending posts.

Demo script you can record

1. Start OpenCode with sfeed in MCP config
2. Ask it to inspect sfeed status
3. Ask it to schedule a post
4. Confirm the draft
5. Ask it to call sfeed_schedule_list
6. Show the queued job

FAQ

Can OpenCode use sfeed without MCP?

Yes. OpenCode can run sfeed CLI commands directly after install and auth.

When should I add MCP?

Add MCP when you want OpenCode to use named tools for posting and scheduling. OpenCode loads MCP tools alongside its built-in tools.

Where should the config live?

Use a project opencode.json when sfeed is part of one project workflow. Use the global OpenCode config when you want sfeed available across projects.

Open the Cookbook

Back to Docs