---
title: "OpenCode Configuration"
description: "Edit global OpenCode MCP servers, language servers, plugins, and raw JSON from the Cloud Link tray app with validated atomic saves and reloads."
canonical: "https://opencodecloud.link/docs/opencode-configuration/"
lastUpdated: "2026-10-19"
---
The tray app can edit the global OpenCode configuration for the machine it
manages. This is the same configuration OpenCode uses for sessions started
through Cloud Link.

## Where the file lives

Cloud Link resolves the OpenCode configuration in this order:

1. the path in `OPENCODE_CONFIG`;
2. the directory in `OPENCODE_CONFIG_DIR`;
3. `~/.config/opencode/opencode.json` on Linux and macOS-style setups.

The raw editor shows the resolved path above the text area. Use **Open folder**
to reveal it in your file manager.

## MCP servers

The **MCP** tab edits `mcp.servers`.

1. Choose **Add server**.
2. Fill in the server fields.
3. Save the list.
4. Check the status shown while the connector runs.
5. Start a new session if the active session does not discover the new tool
   set.

Remote MCP servers may require an OAuth flow or a credential managed by
OpenCode. Cloud Link edits configuration; it does not replace OpenCode's
provider authentication.

## Language servers

The **Language servers** tab edits the `lsp` list.

- **Enable language servers** controls the feature.
- Add custom servers when automatic detection is not enough.
- Clear the list to return to automatic detection.

Saving an empty list is different from disabling the feature. Read the hint in
the panel before saving.

## Plugins

The **Plugins** tab edits the `plugins` list. Plugins install when OpenCode
reloads the configuration, so a save may not take effect in an already running
session.

## Raw configuration

The **Raw config** tab shows the complete JSON file.

- **Reload** discards unsaved edits and rereads the file.
- **Open folder** opens the configuration directory.
- **Save config** validates and writes the file.

The editor rejects invalid JSON. Saves are atomic so a failed write does not
replace a working configuration.

## Safety notes

- Configuration is local to the machine and is never served through the
  tunnel.
- Do not paste provider keys, tokens, or private URLs into screenshots or issue
  reports.
- Keep one authoritative copy of the file. Editing it in two places at once can
  cause the later save to overwrite the earlier change.
- If OpenCode rejects a configuration after a save, use **Reload** and restore
  the last working version before restarting the connector.
- A configuration error can prevent OpenCode from starting. The connector
  reports the failure in its status and diagnostics.

## Configuration versus connector settings

Cloud Link's own settings (control plane, ports, executables, working directory,
start at login, and keep awake) are separate from OpenCode's configuration.
Changing an MCP server or plugin does not change the tunnel. Changing the
connector's ports or working directory can require a reconnect or re-pair.

See [Settings reference](/docs/settings/) for connector settings and
[Exposed services](/docs/exposed-services/) for publishing local applications.