# Invalid redirect URI (Linear MCP OAuth via mcp.linear.app)

**TL;DR:** Skip the broken OAuth dance: use a Linear personal API key as a Bearer token in the Authorization header instead. The redirect URI mismatch comes from the OAuth client registration, which you cannot fix client-side. Personal API keys work with the remote endpoint and avoid the callback entirely.

## The error

```
Invalid redirect URI
```

## Fix it

1. Create a personal API key in Linear settings.
   Expected: You have the lin_api key.
2. Configure the MCP client to send your auth header the key to mcp.linear.app.
   Expected: The header carries the key.
3. Connect.
   Expected: The server authenticates without any redirect.

## When this applies

Linear MCP OAuth via mcp.linear.app fails with Invalid redirect URI during the browser flow.

## When this does NOT apply

If you already use an API key and get 401, the key is wrong. Local community servers use LINEAR_API_KEY env instead.

## Tool compatibility

mcp.linear.app remote server, OAuth flow

## Also seen as

- Linear MCP OAuth redirect error
- mcp.linear.app invalid redirect
- Linear MCP skip OAuth API key

## Why it happens

The OAuth app registration lists specific redirect URIs; MCP clients that open random local ports do not match, so Linear rejects the flow. A personal API key authenticates directly with no redirect involved.

## Edge cases

- Some clients need --callback-port to pin the OAuth port; try that before giving up on OAuth.
- API keys inherit your permissions; scope them by using a dedicated user.
- Revoke the key if it leaks; Linear shows key usage.