PlugWiki
Linear logo

Add the Linear MCP server to Claude Code

Add Linear to Claude Code with one command, then sign in through /mcp. Claude can then read and update your issues.

Add Linear to Claude Code with the command in the box above, then run /mcp in a session and sign in with your Linear account. After that, Claude Code can search, create and update your Linear issues and comments.

The main catch is headless runs. claude -p cannot open a browser, so sign in once in a normal session first or use a Linear API key. If you only want lookups, use the read-only address.

Good for

  • Developers who track work in Linear and want to stay in the terminal
  • Engineers who turn bugs and notes into Linear issues from their code
  • Team leads who want Claude to read issues but never change them
  • People running Claude Code in scripts or CI, using an API key

Add Linear to Claude Code

Claude Code

  1. 1

    Copy this prompt.

    Add the Linear MCP server to Claude Code. Run this command:
    
    claude mcp add --transport http linear-server https://mcp.linear.app/mcp
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Linear account.

Read-only mode: Add the server with https://mcp.linear.app/mcp/readonly as the address, or use a Linear API key that only has the Read permission.

Use the first method unless you already connected Linear on claude.ai. Then run /mcp in a Claude Code session, pick linear-server and finish the sign-in in your browser. Add --scope user to have it in every project, or --scope project to share it with your team through .mcp.json.

Over SSH or with no browser, run claude mcp login linear-server --no-browser and paste the address back. claude mcp logout linear-server clears the sign-in.

Use the API key method for claude -p and CI, because they cannot open a browser. Give the key only the Read permission if you want read-only access.

From the vendor's docs. Source.

Common errors and fixes

  • Linear shows as not connected right after /compact

    Cause: Claude Code reports the Linear connection as lost after the conversation is compacted.

    Fix: Disconnect Linear and connect it again; the tools then work in the same session. In the terminal, use Reconnect in /mcp.

    claude-code Source

  • A headless session says claude.ai Linear needs sign-in, but its tools work

    Cause: Headless sessions can mark already-authorized claude.ai connectors as needing sign-in.

    Fix: Ignore it if the tools respond. If they do not, sign in again from /mcp in an interactive session.

    claude-code Source

  • Linear asks you to sign in again after every restart

    Cause: Claude Code does not always save the Linear sign-in between runs.

    Fix: Sign in again from /mcp, or use a Linear API key with --header as in the install box so no sign-in is needed.

    claude-code Source

  • Your other Claude Code sessions lose Linear after you re-sign in

    Cause: All local sessions share one MCP sign-in, and re-authenticating clears it first.

    Fix: Sign in again in each open session after you finish signing in once.

    claude-code Source

  • claude -p shows no Linear tools and no error

    Cause: Headless runs cannot do browser sign-in, and a same-URL claude.ai connector can hide the plugin's Linear tools.

    Fix: Sign in with /mcp in an interactive session first, or use an API key. Block the claude.ai connector with a deniedMcpServers entry or start with ENABLE_CLAUDEAI_MCP_SERVERS=false.

    claude-code Source

  • The connection fails or needs several attempts

    Cause: Linear says remote connections can fail and sometimes need more than one try.

    Fix: Restart Claude Code, or disable and re-enable the Linear server in /mcp.

    claude-code Source

  • Warning about a large Linear tool result, or a result cut off

    Cause: Claude Code warns above 10,000 tokens and caps results at 25,000 by default.

    Fix: Ask for fewer issues or a narrower filter. To raise the cap, set MAX_MCP_OUTPUT_TOKENS before starting claude.

    claude-code Source

Permissions

Medium risk

Claude Code can create and edit Linear issues and comments as you. Use the read-only address if you only need lookups, and keep Linear write tools out of your allow rules.

What it can do

Watch out for

  • Default address can change your workspace

    The default address is read-write, so Claude Code can create and edit Linear issues and comments as you. Use the read-only address, or keep Linear write tools out of your allow rules. linear.app

  • API key in --header is saved in your config

    The key is written to ~/.claude.json (local or user scope) or .mcp.json (project scope). For a shared .mcp.json, use a ${VAR} reference instead of the key. code.claude.com

  • One sign-in is shared by all your sessions

    Claude Code shares MCP sign-ins across local sessions, and re-authenticating in one can log the others out. Sign in again in each open session afterwards. github.com

  • Duplicate Linear entries expose two tool sets

    If you add Linear yourself and also have the claude.ai connector or plugin, check /mcp for duplicates. Claude Code hides a same-URL connector, but different URLs show both. code.claude.com

Security advisories

No published security advisories as of Nov 2, 2026.

Technical details
Turning on read-onlyAdd https://mcp.linear.app/mcp/readonly instead of /mcp, request only the read scope at sign-in, or use a Linear API key with only the Read permission. In Claude Code you can also deny single write tools with permission rules in the form mcp__linear-server__<tool>, using the tool names /mcp lists.
Talks tomcp.linear.app
Sign-in and keysClaude Code stores the browser sign-in itself. An API key passed with --header is saved in ~/.claude.json or .mcp.json.

Works in

Linear documents Claude Code setup, and five sign-in and reconnect issues are still open.

Tap an app to see how to set it up and any known problems.

Questions

How do I sign in to Linear from Claude Code?

Run /mcp in a session, pick linear-server and finish the sign-in in your browser. From the shell, claude mcp login linear-server does the same, and over SSH you add --no-browser and paste the address back.

I already connected Linear on claude.ai. Do I need to add it again?

No, if you log in to Claude Code with your claude.ai subscription. Linear then shows in /mcp as claude.ai Linear. It does not load with an API key, Bedrock or a setup-token. If you also add Linear yourself with the same URL, your entry wins.

Is there a Linear plugin for Claude Code?

Yes. Anthropic's official marketplace has a Linear plugin made by Linear that connects to the same address. It is one of the install options in the box above.

Does Linear work in claude -p or CI?

Yes, with a Linear API key. Headless runs cannot open a browser, so use the API key method from the install box or sign in once in an interactive session first.

How do I make Linear read-only in Claude Code?

Add the read-only address from the install box, or use a Linear API key with only the Read permission. You can also deny single write tools with permission rules in the form mcp__linear-server__<tool>, using the tool names /mcp shows.

Why does Linear show as not connected after /compact?

It is a known bug. Disconnect Linear and connect it again, and the tools work in the same session. In the terminal, use Reconnect in /mcp.

Linear's docs say to delete ~/.mcp-auth. Does that apply here?

Only if you run Linear through the mcp-remote bridge. Claude Code keeps its own sign-in, so use Clear authentication in /mcp or claude mcp logout linear-server, then sign in again.

Why do Linear results get cut off or saved to a file?

Claude Code warns when a tool result passes 10,000 tokens and caps it at 25,000 by default. Set MAX_MCP_OUTPUT_TOKENS, for example 50000, before starting claude. Text over 50,000 characters is saved to a file either way.

Why does Claude Code keep asking me to sign in to Linear?

Two open bugs cause it: sign-ins are sometimes not saved after a restart, and headless sessions can list claude.ai connectors such as Linear as needing sign-in while their tools still work. Sign in again from /mcp, and restart Claude Code if the connection fails.

Information

updated Nov 1, 2026

WebsiteMCP server docsOfficial MCP RegistryLaunch announcement

More on this

Sources

Docs, issue trackers and discussions this page is built from.

Show all 10
  1. MCP server · linear.app
  2. Connect Claude Code to tools via MCP · code.claude.com
  3. Linear plugin (claude-plugins-official) · github.com
  4. Discover and install plugins · code.claude.com
  5. MCP connector (Linear) reported as "not connected" after /compact · github.com
  6. Claude Code issue 89604: new sessions say Linear needs sign-in · github.com
  7. Claude Code issue 84274: Linear sign-in not saved after restart · github.com
  8. MCP re-authenticate still clears stored tokens before sign-in completes · github.com
  9. Headless -p suppresses plugin MCP servers in favor of same-URL claude.ai connectors · github.com
  10. Claude integration · linear.app

Updated Nov 1, 2026.