Configure the official Linear MCP server per workspace in opencode

I wrote this because Perplexity, ChatGPT, and Gemini all gave me wrong or incomplete answers when I asked how to configure the official Linear MCP server per workspace. Most answers drifted toward community servers, API keys, or a made-up workspace flag. The useful answer is simpler: keep Linear’s official remote MCP server, give each connection a different MCP name in your client, and authenticate each one separately.

Linear’s official MCP endpoint is:

https://mcp.linear.app/mcp

Linear documents this as its hosted remote MCP server. It uses OAuth for clients that support remote MCP, and it also documents setup paths for Claude, Claude Code, Codex, Cursor, VS Code, Windsurf, Zed, v0, and other MCP clients.

opencode config

In opencode, define multiple remote MCP servers under mcp. The key name is yours. Use names that identify the workspace or account you want the agent to use.

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

Then authenticate each named server individually:

opencode mcp auth linear-project-a
opencode mcp auth linear-project-b
opencode mcp list

During each OAuth flow, log into the Linear account and workspace you want that MCP entry to represent. If both workspaces live under the same Linear account, use Linear’s workspace switcher or account selection during the browser login flow. If your client stores MCP OAuth credentials only by URL instead of by server name, use separate client profiles or config files instead of forcing one config to carry both workspaces.

Why not a community Linear MCP server

I prefer the official server for this. It is hosted by Linear, uses Linear’s documented OAuth flow, and exposes the tool surface Linear expects clients to use. That matters because agents waste fewer tokens when the tools are predictable, and they make fewer mistakes when the tool names, permissions, and object shapes match the official integration, official skill, or client connector.

Community servers can still be useful if you need custom behavior, an API-key-only bridge, or a narrow internal tool. For normal issue, project, comment, document, and team workflows, I would start with the official Linear MCP server. It keeps the integration boring, and boring is good for agent work.

Other clients

The same idea applies outside opencode, but the config syntax changes.

For Codex, Linear documents:

codex mcp add linear --url https://mcp.linear.app/mcp
codex mcp login linear

For Claude Code, Linear documents:

claude mcp add --transport http linear-server https://mcp.linear.app/mcp

If you need multiple Linear workspaces in Codex, Claude, Cursor, VS Code, or another MCP client, look for the same two primitives: a unique local server name and a separate authentication flow for that name. If the client does not isolate credentials by name, separate profiles are the safer answer.

The important part is not opencode specifically. The important part is avoiding fake workspace parameters and avoiding unofficial servers unless you actually need their extra behavior.

References: Linear MCP server, Linear workspaces, opencode MCP servers.

Published date:

Connect

Let's talk about systems, infrastructure, automation, and product-minded technical work.