# Linear — how to use (mcp.ai)

Linear via linguagem natural: crie, busque e atualize issues, projetos e comentários. Plataforma fornece a aplicação OAuth, você só clica em Conectar e autoriza seu workspace Linear. Vários workspaces podem ser conectados no mesmo MCP.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_linear?ms=1781044140000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `linear_create_linear_attachment`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/linear`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/linear/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/linear/create/linear/attachment` — Creates a new attachment and associates it with a specific, existing linear issue.
  - body: { url: string, title: string, issue_id: string, subtitle: string }
- `POST https://api.mcp.ai/api/linear/create/linear/comment` — Creates a new comment on a specified linear issue.
  - body: { body: string, issue_id: string }
- `POST https://api.mcp.ai/api/linear/create/linear/issue` — Creates a new issue in a specified linear project and team, requiring a title and description, and allowing for optional properties like assignee, state, priority, cycle, and due date.
  - body: { title: string, team_id: string, cycle_id?: string, due_date?: string, estimate?: integer, priority?: integer, state_id?: string, label_ids?: string[], parent_id?: string, project_id?: string, assignee_id?: string, description?: string }
- `POST https://api.mcp.ai/api/linear/create/linear/issue/details` — Fetches a linear team's default issue estimate and state, useful for pre-filling new issue forms.
  - body: { team_id: string }
- `POST https://api.mcp.ai/api/linear/create/linear/label` — Creates a new label in linear for a specified team, used to categorize and organize issues.
  - body: { name: string, color: string, team_id: string, description?: string }
- `POST https://api.mcp.ai/api/linear/delete/linear/issue` — Archives an existing linear issue by its id, which is linear's standard way of deleting issues; the operation is idempotent.
  - body: { issue_id: string }
- `POST https://api.mcp.ai/api/linear/get/all/linear/teams` — Retrieves all teams from the linear workspace without requiring any parameters.
- `POST https://api.mcp.ai/api/linear/get/attachments` — Downloads a specific attachment from a linear issue; the `file name` must include the correct file extension.
  - body: { issue_id: string, file_name: string, attachment_id: string }
- `POST https://api.mcp.ai/api/linear/get/current/user` — Gets the currently authenticated user's id, name, email, and other profile information. use this to identify 'me' in other linear operations that require user id filtering.
- `POST https://api.mcp.ai/api/linear/get/cycles/by/team/id` — Retrieves all cycles for a specified linear team id; cycles are time-boxed work periods (like sprints) and the team id must correspond to an existing team.
  - body: { team_id: string }
- `POST https://api.mcp.ai/api/linear/get/linear/issue` — Retrieves an existing linear issue's comprehensive details, including title, description, attachments, and comments.
  - body: { issue_id: string }
- `POST https://api.mcp.ai/api/linear/list/linear/cycles` — Retrieves all cycles (time-boxed iterations for work) from the linear account; no filters are applied.
- `POST https://api.mcp.ai/api/linear/list/linear/issues` — Lists non-archived linear issues; if project id is not specified, issues from all accessible projects are returned. can also filter by assignee id to get issues assigned to a specific user.
  - body: { after?: string, first?: integer, project_id?: string, assignee_id?: string }
- `POST https://api.mcp.ai/api/linear/list/linear/labels` — Retrieves all labels associated with a given team id in linear; the team id must refer to an existing team.
  - body: { team_id: string }
- `POST https://api.mcp.ai/api/linear/list/linear/projects` — Retrieves all projects from the linear account.
- `POST https://api.mcp.ai/api/linear/list/linear/states` — Retrieves all workflow states for a specified team in linear, representing the stages an issue progresses through in that team's workflow.
  - body: { team_id: string }
- `POST https://api.mcp.ai/api/linear/list/linear/teams` — Retrieves all teams, including their members, and filters each team's associated projects by the provided 'project id'.
  - body: { project_id: string }
- `POST https://api.mcp.ai/api/linear/list/linear/users` — Lists all users in the linear workspace with their ids, names, emails, and active status.
  - body: { after?: string, first?: integer }
- `POST https://api.mcp.ai/api/linear/remove/issue/label` — Removes a specified label from an existing linear issue using their ids; successful even if the label isn't on the issue.
  - body: { issue_id: string, label_id: string }
- `POST https://api.mcp.ai/api/linear/run/query/or/mutation` — Wildcard action that executes any graphql query or mutation against the linear api. use this as a fallback when no specific action exists for your use case, or when you need to perform complex operati
  - body: { variables: object, query_or_mutation: string }
- `POST https://api.mcp.ai/api/linear/update/issue` — Updates an existing linear issue using its `issue id`; requires at least one other attribute for modification, and all provided entity ids (for state, assignee, labels, etc.) must be valid.
  - body: { title?: string, team_id?: string, due_date?: string, estimate?: integer, issue_id: string, priority?: integer, state_id?: string, label_ids?: string[], parent_id?: string, project_id?: string, assignee_id?: string, description?: string }

## Example prompts
- "Crie uma issue 'Corrigir login no Safari' no time de Engenharia"
- "Liste minhas issues abertas com prioridade alta"
- "Comente 'Em revisão' na issue ENG-142"

## More
- Page: https://mcp.ai/linear
- Agent spec (llms.txt): https://mcp.ai/linear/llms.txt
- Postman collection: https://mcp.ai/linear/postman.json
