Set up DoDomain in OpenCode
The fast way: pick OpenCode in the box below and follow its three steps. The rest of this page is the same setup by hand.
Connect the MCP server
1. Add the server to opencode.json in the project root (or ~/.config/opencode/opencode.json for every project). If the file exists, merge the dodomain entry into its mcp object.
File:
opencode.json{ "$schema": "https://opencode.ai/config.json", "mcp": { "dodomain": { "type": "remote", "url": "https://app.dodomain.io/api/mcp", "enabled": true } } }2. Sign in to DoDomain (opens the browser for the OAuth consent)
opencode mcp auth dodomain
Sign in. opencode mcp auth dodomain opens the DoDomain sign-in and consent page in the browser. OpenCode also starts this flow by itself the first time the server answers 401. No API key is involved: the MCP server uses OAuth and refuses secret keys by design.
What you get
- The DoDomain MCP server at
https://app.dodomain.io/api/mcp, with OAuth sign-in and 68 tools that cover every dashboard action. - The SDK for your stack: @dodomain/node, dodomain-sdk, @dodomain/connect, @dodomain/react, with the secret key read from
DODOMAIN_SECRET_KEY. - A verified setup: the agent calls
list_appsand the REST API before it reports back.
Install the SDK
Server code uses a secret key from DODOMAIN_SECRET_KEY. Create an app at https://app.dodomain.io/dashboard and copy the secret key from its API keys card. It is shown once.
@dodomain/node (Node.js 20+ server)
Create connect sessions, manage connections, verify signed webhooks.
npm install @dodomain/nodedodomain-sdk (Python 3.10+ server)
The same server surface as @dodomain/node, sync and async.
pip install dodomain-sdk@dodomain/connect (Browser)
Opens the hosted connect flow as a sheet inside your own UI, driven by a session token your server minted.
npm install @dodomain/connect@dodomain/react (React)
The widget as a useDoDomainConnect hook.
npm install @dodomain/react
Verify
After signing in, ask the agent to call the list_apps tool: it lists the apps on your team. To check a secret key, run:
curl -s https://app.dodomain.io/api/v1/apps -H "Authorization: Bearer $DODOMAIN_SECRET_KEY"Success is HTTP 200 with a JSON body of the form {"apps": [...]}: a secret key sees exactly its own app, with its id, name and publishable key.
Start on the free plan
No card, no sales call: create an app, mint a session, and watch the first domain verify.
OpenCode's own MCP documentation: https://opencode.ai/docs/mcp-servers/. Other agents: all agent guides.