Docs/Candor Deploy
Deploy from OpenCode: connect the Candor MCP
Connect OpenCode to Candor Deploy so you can say 'deploy this to Candor' from the terminal — one config block and a sign-in, no token to copy.
Candor Deploy runs an MCP server at
https://api.candorhost.app/mcp. OpenCode connects to remote MCP servers from
its config file, so once it’s connected you can tell it to deploy an app and
it does — detects the stack, provisions any databases, and hands back the live
URL.
Connecting is a sign-in: OpenCode sends you to Candor, you sign in the way you do for the portal, pick the project the agent may deploy to, and approve.
Add the server
Add a mcp entry to your OpenCode config — opencode.json at the repo root
for one project, or ~/.config/opencode/opencode.json for everywhere:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"candor": {
"type": "remote",
"url": "https://api.candorhost.app/mcp"
}
}
}
OpenCode detects that the server wants OAuth and starts the sign-in the first time it connects. To trigger it yourself, or to sign in again later:
opencode mcp auth candor
opencode mcp list shows the server and whether it’s authenticated;
opencode mcp logout candor forgets the credential. Then: deploy this repo to Candor.
Using a token instead
For CI or a machine with no browser, an API token works in place of the sign-in. In the portal, open Account → API tokens → Create token (or a project’s own tokens page for a token confined to that project), copy it, and reference it from the environment so it never lands in the file — and turn OAuth off for this server so OpenCode doesn’t try to sign in as well:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"candor": {
"type": "remote",
"url": "https://api.candorhost.app/mcp",
"oauth": false,
"headers": {
"Authorization": "Bearer {env:CANDOR_TOKEN}"
}
}
}
}
Set CANDOR_TOKEN in the shell that launches OpenCode.
What you can ask
- Deploy a repo — “deploy github.com/me/myapp to Candor.” Push your latest commit first; Candor builds from your git remote.
- Create a service in a project, set or list its environment variables, then redeploy so they apply.
- Check a deploy — the phase, and the build logs if it failed.
- List what you’ve deployed — projects, services and their URLs — and who you are: the account and plan limits the connection acts under.
What the connection can do, and revoking it
Approving gives OpenCode developer access to one project — the one you picked. It can deploy, configure and read logs there; it can’t touch other projects, members, or billing. Behind the scenes it holds a project API token, listed with that project’s tokens in the portal; revoke it there and the connection stops working immediately.
Something here wrong, unclear, or missing? Tell us — docs get fixed like bugs.