Quickstart: opencode
Add Probably to opencode as a remote MCP server, signed in with OAuth or an API key in its headers.
opencode connects to Probably's remote MCP server at https://studio.probably.co/api/mcp. Sign in with OAuth when you work at your machine, or send an API key in its headers where nobody can open a browser.
Connect with OAuth
Add Probably to opencode.json in your project, or to ~/.config/opencode/opencode.json for every project:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"probably": {
"type": "remote",
"url": "https://studio.probably.co/api/mcp",
"enabled": true
}
}
}opencode finds Probably's sign-in by itself and registers with it, so the file needs no client ID. Sign in:
opencode mcp auth probablyYour browser opens Probably's sign-in and a consent page, where you choose the organization, optionally one Space, and whether opencode may start paid work after you confirm it in the chat. opencode mcp list shows whether you're signed in, and opencode mcp logout probably signs out. You can revoke the connection at any time in Settings → Connections.
Or connect with an API key
Create a key in Settings → Connections (see Authentication) and keep it in an environment variable:
export PROBABLY_API_KEY="prb_..."Add Probably with the key in its headers. opencode reads the key from the environment where the header says {env:PROBABLY_API_KEY}, so the file holds no secret, and "oauth": false tells it not to start a sign-in:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"probably": {
"type": "remote",
"url": "https://studio.probably.co/api/mcp",
"headers": {
"Authorization": "Bearer {env:PROBABLY_API_KEY}"
},
"oauth": false,
"enabled": true
}
}
}To check the key outside opencode, set the API's address and your key, then ask the server which tools it offers:
export PROBABLY_API_URL="https://studio.probably.co"
export PROBABLY_API_KEY="prb_..."#!/usr/bin/env bash
# Ask the MCP server which tools your API key is offered, as an MCP client
# set up with an Authorization header does.
set -euo pipefail
curl --silent --show-error --fail-with-body \
--request POST "$PROBABLY_API_URL/api/mcp" \
--header "Authorization: Bearer $PROBABLY_API_KEY" \
--header "Content-Type: application/json" \
--header "Accept: application/json, text/event-stream" \
--data '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Make your first video
Ask opencode to list your Probably Spaces, then to prepare a video from a brief. It shows you the preview from prepare_video; once you agree, it calls confirm_spend, and wait_for_video tells it when the video changes. Every tool is in the MCP tool reference.