Skip to main content

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.

  1. Add the server from your project folder:

    opencode mcp add solarsens --url https://ops.solarsens.co/mcp

    This writes the following to opencode.json:

    {
    "mcp": {
    "servers": {
    "solarsens": {
    "type": "remote",
    "url": "https://ops.solarsens.co/mcp"
    }
    }
    }
    }

    Terminal or editor showing the opencode.json file after running opencode mcp add

  2. Run opencode mcp list. It shows solarsens needs authentication.

  3. Sign in:

    opencode mcp auth solarsens

    Sign-in and read consent screen reached through opencode mcp auth solarsens

  4. Run opencode mcp list again. It shows solarsens connected.

    Terminal output of opencode mcp list showing solarsens as 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 seeWhat to do
needs authenticationRun opencode mcp auth solarsens.
failed or 401 after sign-inRun opencode mcp logout solarsens, then sign in again.
dynamic client registration is disabledRemove the server entry. Add it again with the URL above.
Port or address-in-use erroropencode serve --service holds port 19876. Stop it, or see Connection help.
No Plants appearSend an email to support@solarsens.co.

For other problems, see Connection help.