Connect OpenCode
These steps connect OpenCode to your Promoly account. Last tested on October 2, 2026 with OpenCode 1.18.33.
Connected agents are in an invite-only beta. See Connect an AI coding agent for what an agent can and can't do.
Add the Promoly server
Add this to your OpenCode config, either ~/.config/opencode/opencode.json for every project or opencode.json in one project:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"promoly": {
"type": "remote",
"url": "https://api.promo.ly/mcp",
"oauth": { "clientId": "promoly-opencode" }
}
}
}If the file already has an mcp section, add the promoly entry inside it. Don't set a custom redirectUri or callbackPort. Promoly expects OpenCode's standard callback on port 19876.
Sign in
opencode mcp auth promolyYour browser opens Promoly. Sign in, choose the account, decide whether to allow drafts, and click Allow access. OpenCode shows Done when it's connected.
Check the connection
Start OpenCode and paste:
Use the promoly tools to show which Promoly account you're connected to, then list my five most recent campaigns.Sign out or remove it
opencode mcp logout promolyThen delete the promoly entry from your config if you want to remove the server. Signing out on your computer doesn't end the connection on Promoly's side. To do that, disconnect it under Profile → Manage connected apps in the dashboard.
If something goes wrong
- Port 19876 is busy. Another app is using it. Close that app and run
opencode mcp auth promolyagain. - OpenCode reports an authentication error after a disconnect or after 30 days. Run
opencode mcp auth promolyagain. - You want to check what OpenCode sees.
opencode mcp listshows whether promoly is connected, andopencode mcp debug promolyshows the sign-in details.
Updated on: 02/10/2026
Thank you!