---
title: How to connect Linear MCP to Codex
description: Run codex mcp add linear --url https://mcp.linear.app/mcp, then sign in with codex mcp login. Read-only setup, approvals, API keys, team sharing and fixes.
canonical: https://mcp1.com/blog/linear-mcp-codex
last-updated: 2026-11-29
---

# How to connect Linear MCP to Codex

Run codex mcp add linear --url https://mcp.linear.app/mcp, then sign in with codex mcp login. Read-only setup, approvals, API keys, team sharing and fixes.

![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite

 \~/.codex/config.toml

[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"

codex mcp login linearSigned in

 \~/.codex/config.toml

[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"

codex mcp login linearSigned in

To connect Linear to Codex, run `codex mcp add linear --url https://mcp.linear.app/mcp` and sign in to Linear in the browser window Codex opens. Linear hosts the server and supports OAuth with dynamic client registration, so there is no app to create and no key to paste. Codex can then find, create and update issues, projects and comments with your own Linear permissions.

## How do I add the Linear MCP server to Codex?

The steps are the same for the Codex CLI, the IDE extension and the desktop app, which share one config file.

1. 1Add the server:  
Terminal  
```  
codex mcp add linear --url https://mcp.linear.app/mcp  
```
2. 2Sign in. Codex prompts for it after the add; if you skipped it, or the session expired, run it yourself:  
Terminal  
```  
codex mcp login linear  
```
3. 3Approve access for your Linear workspace in the browser. You can limit the connection to some of your teams on the same screen.
4. 4Start `codex` and run `/mcp`. `linear` should be listed with its tools.

`codex mcp add` writes this to `~/.codex/config.toml`. The OAuth token isn’t in the file, so the block is safe to copy between machines:

\~/.codex/config.toml

```
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
```

Then make a call that changes nothing:

Prompt

```
Use the Linear tools to list the issues assigned to me in the current
cycle that are still in Todo. Don't change anything.
```

Linear's page mentions a \[features\] flag

Linear’s Codex instructions add `experimental_use_rmcp_client = true` under `[features]` for people using MCP in Codex for the first time. OpenAI’s current MCP docs don’t list that flag. If `codex mcp login` doesn’t open a browser, update Codex before you add flags.

## What can Codex do in Linear?

Linear’s tools find, create and update issues, projects, comments, initiatives, milestones, project updates and labels. Linear doesn’t publish a fixed list and adds tools over time, so run `/mcp` to see the current set. Every call acts as you: Codex sees what your Linear account sees, and edits show up under your name.

The useful pattern in Codex is pairing an issue with the code it’s about:

- “Read issue ENG-412 and the files it mentions, then propose a fix.” Codex reads the issue through Linear and the code from your checkout.
- “Summarize what changed on this branch and post it as a comment on ENG-412.” One read of git, one write to Linear.
- “File a bug in the Platform team for the failing test in this run, with the stack trace.” One write, with arguments you can check before it runs.

## How do I make Linear MCP read-only in Codex?

Point Codex at Linear’s read-only endpoint. It only ever exposes read tools, so the agent has nothing to write with:

\~/.codex/config.toml

```
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp/readonly"
```

Or keep the main URL and ask for the read scope only. Linear issues a token that can’t reach its write APIs:

\~/.codex/config.toml

```
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
scopes = ["read"]
```

OptionWhat enforces it

`/mcp/readonly`

Linear’s server lists read tools only.

`scopes = ["read"]`

Linear’s token can’t write, whatever tools the client sees.

Read-only on the consent screen

Same as the read scope, chosen at sign-in.

API key with Read permission

Linear refuses writes made with that key.

`enabled_tools`

Codex’s own allowlist. Config anyone can edit, so a convenience, not a control.

After changing scopes, run `codex mcp login linear` again so Codex gets a new token. More on why the credential matters most in [how to make an MCP server read-only](https://mcp1.com/blog/read-only-mcp-server).

## How do I make Codex ask before Linear writes?

Set an approval mode on the server. The modes are `auto`, `prompt`, `writes` and `approve`; `writes` asks before any tool that isn’t marked read-only:

\~/.codex/config.toml

```
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
default_tools_approval_mode = "writes"
```

To set one tool apart, add a `[mcp_servers.linear.tools.<tool>]` table with its own `approval_mode`, or list it in `disabled_tools`. Take the names from `/mcp`, since Linear can rename tools. The approval shows the arguments, so read the team and title before you accept a new issue. See [how to stop agents from running destructive MCP tools](https://mcp1.com/blog/stop-destructive-mcp-tools) for the rest.

## How do I use a Linear API key in Codex?

Send it as a bearer token. Linear accepts API keys in the `Authorization` header, and Codex reads the key from an environment variable you name, so the file never holds it:

\~/.codex/config.toml

```
[mcp_servers.linear]
url = "https://mcp.linear.app/mcp"
bearer_token_env_var = "LINEAR_API_KEY"
```

Use this where nobody can click through a browser, like `codex exec` in CI. Create the key under your Linear account’s security settings with only the permissions the job needs; Read alone is enough for triage reports. A key belongs to the person who made it, so name it after the job and rotate it when they leave. More in [MCP servers in CI and headless agents](https://mcp1.com/blog/mcp-in-ci-and-headless-agents).

## How do I share Linear MCP with my team in Codex?

Commit the `[mcp_servers.linear]` block to `.codex/config.toml` at the repository root. Codex loads project config only in projects you’ve marked as trusted. The block holds only the URL, so each teammate runs `codex mcp login linear` and signs in as themselves, with their own Linear permissions. Nobody shares a token.

## What if Linear MCP doesn’t connect in Codex?

Terminal

```
codex mcp list
codex mcp login linear --no-browser
```

- No browser opens, on a remote machine or in a container. Use `--no-browser`, open the link elsewhere and paste the full redirect URL back into the terminal.
- A 401 with `invalid_token`. The session expired; Linear’s OAuth connections start with a 25-day refresh window. Run `codex mcp login linear` again.
- Tools missing after a scope change. The old token is still in use. Log in again.
- A guide tells you to use `https://mcp.linear.app/sse` or `mcp-remote`. Both are for clients without Streamable HTTP. Codex has it, so use the `/mcp` URL.
- The server times out on start. Raise `startup_timeout_sec` above its default of 10.

## Linear for the whole team, next to everything else

The setup above is per person and per client: each developer signs in to Linear in Codex, again in Cursor, again in Claude Code, and read-only mode lives in a file anyone can change. MCP1 is a gateway that does it once. An admin installs [Linear](https://mcp1.com/servers/linear) in the workspace, grants it to a group with full or read-only access, and every person connects one URL with their own MCP1 sign-in:

Terminal

```
codex mcp add mcp1 --url https://mcp1.com/mcp/<workspace>/<gateway>
codex mcp login mcp1
```

Linear’s tools appear as `linear__<tool>` next to GitHub, Sentry and the rest, rules by name can make writes ask first or hold them to admins, and every call is in the audit log. The same server in other clients: [Claude Code](https://mcp1.com/blog/linear-mcp-claude-code) and [Cursor](https://mcp1.com/blog/linear-mcp-cursor). The [docs](https://mcp1.com/docs) cover gateways and groups, and you can [start free](https://mcp1.com/signup).

## Common questions

### Does Linear MCP work with codex exec?

Yes. codex exec loads the same config. Where nobody can sign in through a browser, set bearer\_token\_env\_var to a variable holding a Linear API key.

### Can I use Linear MCP in Codex on a remote machine?

Yes. Run codex mcp login linear --no-browser, open the link on any machine, and paste the full redirect URL back into the terminal.

### Do I need mcp-remote for Linear in Codex?

No. Codex speaks Streamable HTTP and OAuth itself, so a url entry pointing at https://mcp.linear.app/mcp is enough. mcp-remote is for clients that only run local servers.

### How do I disconnect Linear from Codex?

Remove the server with codex mcp remove linear, or set enabled = false in its config block. To revoke the grant itself, revoke Codex’s access in your Linear account settings.

Give your team one URL

Create a workspace, install your servers and share a gateway with a group. Free for individuals.

[Start with MCP1](https://mcp1.com/signup)[Read the docs](https://mcp1.com/docs)

## More from the blog

[ \~/.codex/config.toml[mcp_servers.notion] url = "https://mcp.notion.com/mcp"codex mcp login notionSigned inHow to connect Notion MCP to CodexRun codex mcp add notion --url https://mcp.notion.com/mcp, then codex mcp login notion. Approvals, a token for CI, team config and fixes.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/notion-mcp-codex)[ Where PHI goes in one tool callMCP serverBAA, endpoint in scopeModel providerBAA, product namedGatewayBAA, audit logLogsEncrypted, retention setMCP and HIPAA: what to check before agents touch PHIEvery party that handles PHI in an MCP tool call needs a BAA, and model providers’ BAAs don’t cover MCP servers. What to check, limit and log.![](https://avatars.githubusercontent.com/u/1297371?s=96&v=4)Eldad FuxFounder and CEO, Appwrite](https://mcp1.com/blog/mcp-hipaa)

---

This is the markdown copy of https://mcp1.com/blog/linear-mcp-codex. Site index for agents: https://mcp1.com/llms.txt
