Linear MCP in OpenCode per workspace

Workspace-scoped Linear MCP setup

To add Linear MCP to OpenCode for one repository, create a workspace opencode.jsonc, run opencode mcp auth linear-project, then confirm the server appears in opencode mcp list.

The MCP config lives in the repository, so it affects only that directory.

Repeat the same opencode.jsonc pattern in any repository that needs Linear tools.

1. Create a workspace config file

From your workspace root, create opencode.jsonc with a workspace-local MCP block:

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

We use "linear-project" instead of "linear" to avoid naming collisions with other tools or global configs, but you can choose any key and keep the same URL.

2. Authenticate the server

Open a terminal at that workspace and run:

opencode mcp auth linear-project

If the command is not available in your OpenCode version, open the OpenCode app settings and start auth from the MCP section.

3. Confirm it is active in that workspace

opencode mcp list

Run one read-only Linear query through the agent.

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

If the command returns fresh workspace data, your setup is working.

4. If opencode mcp auth is missing

Some OpenCode builds expose MCP auth in the app UI 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 complete auth there.

After that, run:

opencode mcp list

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

5. How to confirm it is workspace-only

The workspace file above is local to the repo path. Your other directories keep their own MCP state, so Linear MCP can be enabled per repository.

Run opencode mcp list inside this repository and in another directory without the same opencode.jsonc. The Linear entry should appear only in the configured workspace.

FAQ

How do I add linear mcp to opencode in one workspace?

Use a workspace opencode.jsonc file and define the remote MCP entry for Linear as shown above.

Can I keep Linear MCP scoped to one workspace in OpenCode?

Yes. Put the MCP entry in the local opencode.jsonc file for that repository, then confirm with opencode mcp list that the server only appears there.

What if opencode mcp auth is not available?

Use the OpenCode app settings instead. Start auth from the MCP section for the same Linear server entry, then re-run opencode mcp list to verify it is active.

Published date:

Let's connect

Find me on GitHub and LinkedIn