Connect OpenCode
Before you start: install OpenCode 2.x. Use a project folder where OpenCode
can create opencode.json. AVA Asia must allow your email. See
Sign in. OpenCode registers its own OAuth client.
Do not set a client ID, secret, or scope.
-
Add the server from your project folder:
opencode mcp add solarsens --url https://ops.solarsens.co/mcpThis writes the following to
opencode.json:{
"mcp": {
"servers": {
"solarsens": {
"type": "remote",
"url": "https://ops.solarsens.co/mcp"
}
}
}
} -
Run
opencode mcp list. It showssolarsens needs authentication. -
Sign in:
opencode mcp auth solarsens -
Run
opencode mcp listagain. It showssolarsens connected.
You can also start sign-in from the /mcp command inside OpenCode.
First question
Say hello SolarSENS. Then list only the SolarSENS Plants this signed-in account is authorised to view. Return each Plant name and ID. Do not query any Plant outside that scope.
Setup errors
| What you see | What to do |
|---|---|
needs authentication | Run opencode mcp auth solarsens. |
failed or 401 after sign-in | Run opencode mcp logout solarsens, then sign in again. |
dynamic client registration is disabled | Remove the server entry. Add it again with the URL above. |
| Port or address-in-use error | opencode serve --service holds port 19876. Stop it, or see Connection help. |
| No Plants appear | Send an email to support@solarsens.co. |
For other problems, see Connection help.


