Set up Linear MCP in one OpenCode workspace

Set up Linear MCP for one workspace

For one repository, the whole setup is a local opencode.jsonc, one auth command, and a quick check with opencode mcp list.

The config stays in the repository, so it affects only that directory and leaves your global OpenCode profile alone.

If another repository needs Linear tools, add the same opencode.jsonc pattern there.

1. Create a workspace config file

Create opencode.jsonc at the workspace root with this MCP block:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "linear-project": {
      "type": "remote",
      "url": "https://mcp.linear.app/mcp",
      "enabled": true
    }
  }
}

I use "linear-project" instead of "linear" to avoid collisions with other tools or global configs. You can choose another key, but keep the URL the same and use that key in the auth command.

2. Authenticate the server

From that workspace, run:

opencode mcp auth linear-project

If your OpenCode version does not include this command, open the app settings and authenticate from the MCP section instead.

3. Confirm it is active in that workspace

opencode mcp list

Then give the agent one read-only Linear query:

Show me the first five open issues assigned to me in Linear.

If the query returns fresh workspace data, the setup works.

4. If opencode mcp auth is missing

Some OpenCode builds put MCP auth in the app instead of the CLI. If opencode mcp auth linear-project is unavailable, open OpenCode settings, find the MCP section, select the same Linear server entry, and authenticate there.

After that, run:

opencode mcp list

If linear-project appears in the workspace output, the setup is valid.

5. How to confirm it is workspace-only

The file is local to the repository path. Other directories keep their own MCP state, so you can enable Linear one repository at a time.

Run opencode mcp list in this repository, then run it again in a directory without the same opencode.jsonc. The Linear entry should appear only in the configured workspace.

Frequently asked questions

How do I add Linear MCP to OpenCode?
Create a workspace `opencode.jsonc` with Linear's remote MCP entry, then run `opencode mcp auth linear-project` to authenticate.
Is there an OpenCode Linear integration?
Yes. Linear provides a remote MCP server. Add `https://mcp.linear.app/mcp` to the workspace `opencode.jsonc`, authenticate, then check it with `opencode mcp list`.
What is Linear MCP for OpenCode used for?
It lets the OpenCode agent read and act on Linear issues in that workspace. You can list issues, check assignees, and use similar MCP tools without enabling Linear in every project.
Can I keep Linear MCP scoped to one workspace in OpenCode?
Yes. Put the MCP configuration in the workspace `opencode.jsonc`. That workspace gets the tools, while your global profile stays unchanged.
What if `opencode mcp auth` is not available?
Open the OpenCode app settings, find the MCP section, and authenticate the same Linear server entry there.

Published date:

Let's connect

Find me on GitHub, Discord and X