Skip to the content.

Quick reference (TL;DR for agents)

Why OpenCode + Skool?

Skool has no official API. OpenCode is the fast-growing open-source terminal agent — provider-agnostic, runs anywhere you have a shell, and has clean MCP support baked into a single config file. If you live in the terminal and OpenCode is your agent, you want to manage your community without spawning a browser.

The Skool All-in-One API actor wraps the entire Skool admin surface in one HTTP endpoint. Declared as one MCP server in opencode.json, every Skool action becomes a tool OpenCode can call from the prompt.

Why OpenCode is a good fit specifically:

  1. One config file, version-controllable. OpenCode’s opencode.json (with a $schema for autocomplete) lives in your project or ~/.config/opencode/. The Skool server is just a few lines you can commit and share with collaborators.
  2. Provider-agnostic agent loop. OpenCode works with any model you point it at; the Skool tools behave identically whether you run Claude, GPT, or a local model behind it.
  3. Tool-level enable/disable with globs. OpenCode’s tools block lets you disable Skool tools globally and re-enable them per agent — useful if you want a dedicated “community manager” agent that has Skool tools and your coding agent that doesn’t.

This is the MCP-native path for OpenCode. For the general MCP pattern shared across clients, see Skool MCP. Prefer a drop-in Skill in another terminal agent? See Skool + Claude Code.

Setup — add the MCP server (5 minutes)

1. Get your Apify API token

Sign up at apify.com — the free tier covers most communities. Token from console.apify.com/account/integrations.

2. Declare the Skool server in opencode.json

OpenCode reads MCP servers from the mcp key in opencode.json (project root) or your global ~/.config/opencode/opencode.json. Unlike most clients, OpenCode uses "type": "local", a command array, and an environment object (not env):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "skool": {
      "type": "local",
      "command": ["npx", "-y", "@apify/actors-mcp-server", "--actors=cristiantala/skool-all-in-one-api"],
      "environment": {
        "APIFY_TOKEN": "apify_api_..."
      },
      "enabled": true,
      "timeout": 90000
    }
  }
}

The timeout field is important here — see the gotchas below.

3. Verify

Start OpenCode in that directory. The Skool actions register as tools, prefixed with the server name (skool_*). Reference them in a prompt like use the skool tools to list pending members. To confirm the server connected, run opencode mcp list.

Example session — post the weekly digest from the terminal

It’s Monday and you want to drop a community update without leaving your shell. You run OpenCode and type:

Use the skool tools: count active members and new posts from the last 7 days, then publish a short “weekly pulse” post to the community feed summarizing the activity.

OpenCode plans and executes:

1. skool_members_list                       → current member count
2. skool_posts_filter { since: "<7d ago>" } → new posts this week
3. (OpenCode drafts a short plain-text summary, shows it to you)
4. skool_posts_create { title, content }    → publishes once you confirm

Because posts:create is non-idempotent, OpenCode posts exactly once — there’s no retry loop that risks a double post. The whole thing is one prompt and costs a few cents in Apify events. Pair it with OpenCode’s scheduling or a cron wrapper and you have an unattended weekly digest. Related task: Mirror a newsletter to your community.

How it works

OpenCode (your terminal)           Apify                          Skool
────────────────────────           ─────                          ─────
reads opencode.json (mcp key)
  → spawns @apify/actors-mcp-server (local/stdio)
        │  agent picks tool + params
        ▼
[MCP tool call ──────POST JSON───→ run-sync-get-dataset-items ──→ api.skool.com]
{ action, cookies, groupSlug, ... }                              (login + WAF token +
        │                                  │                       buildId handled by actor)
        ◄──────── { success: true, data } ◄────────────────────────┘
        │
   reports back in the terminal

Every Skool operation is one MCP tool call → one HTTP POST. The actor handles Playwright login, WAF rotation, and buildId changes — OpenCode just sees a clean toolset.

What you can ask OpenCode to do — full action surface

The MCP server exposes the entire Skool admin surface as tools. You ask in plain English; OpenCode maps it to one of these actions. Full params for each: Actions reference.

Posts & comments

Action What it does
posts:list / posts:filter List or filter posts (by date, label, unanswered)
posts:get Fetch a single post
posts:create Publish a post (plain text + optional label/video)
posts:update / posts:delete Edit or delete a post/comment
posts:createComment Comment on a post or reply to a comment
posts:pin / posts:unpin Pin or unpin a post
posts:vote Upvote / clear vote
posts:getComments / posts:getCommentsFull Read a post’s comment tree (fast / full-scroll, no cap)

Members

Action What it does
members:list List active members
members:pending List the approval queue
members:approve / members:reject Approve or reject one applicant
members:batchApprove Approve N applicants in one run
members:ban Ban a member (destructive — confirm first)

Events

Action What it does
events:list / events:upcoming List calendar events (all / future only)

Classroom (courses)

Action What it does
classroom:listCourses / classroom:getTree List courses / read a course’s full tree
classroom:createCourse / createFolder / createPage Build course structure
classroom:setBody Set a lesson’s content (markdown → auto-converted to TipTap)
classroom:updateCourse Edit course settings — cover, tier, privacy (read-then-write)
classroom:updateResources Attach / detach downloadable files on a lesson
classroom:deleteUnit Delete a course / folder / page (destructive — confirms first)

Files & groups

Action What it does
files:uploadImage / files:uploadFile Upload a cover image / a private attachment
groups:get Read group metadata (incl. post categories)
groups:setAutoDM Set the welcome DM new members receive

System

Action What it does
system:health / system:debug Healthcheck / SSR diagnostics
auth:login Get fresh cookies (~3.5 day TTL)

OpenCode-specific gotchas

Hand this to your agent

Don’t want to edit opencode.json by hand? Paste this into OpenCode and it knows the setup for Skool:

To operate a Skool community from OpenCode, add the Apify-hosted "Skool All-in-One API"
actor (cristiantala/skool-all-in-one-api) as an MCP server. Skool has no official API;
this actor is it.

Add to opencode.json under the "mcp" key (note: command is an ARRAY, env block is
"environment", and raise timeout because auth:login takes ~10s):
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "skool": {
      "type": "local",
      "command": ["npx", "-y", "@apify/actors-mcp-server", "--actors=cristiantala/skool-all-in-one-api"],
      "environment": { "APIFY_TOKEN": "apify_api_..." },
      "enabled": true,
      "timeout": 90000
    }
  }
}

Verify with `opencode mcp list`. Auth: call action "auth:login" with {email,password,groupSlug}
ONCE, reuse the returned `cookies` (~3.5 day TTL); re-run on errorCode "WAF_EXPIRED".
Approve/reject use params.memberId (from members:pending), NOT id.
Comment reply: parentId = comment id, rootId = post id; top-level = both postId.
Full action list + params: https://skool-api.cristiantala.com/for/ai-agents/

For the full agent primer (function-calling specs, idempotency table, error-recovery patterns), see Skool for AI agents.

See also


Plug Skool into OpenCode today

→ Use the Skool All-in-One API actor on Apify

No Skool community yet? Launch one in 10 minutes — 14-day free trial.