# 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=1796396520000`
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_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://new.mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/linear/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/linear/create/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. This action modifies shared workspace data and is not reversible — confirm the target issue and comment content before executing.
  - body: { body: string, issueId: string }
- `POST https://api.mcp.ai/api/linear/create/linear/issue` — Creates a new issue in a specified Linear project and team, requiring team_id and title, and allowing optional properties like description, assignee, state, priority, cycle, and due date. All UUID par
  - 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/label` — Creates a new label in Linear for a specified team, used to categorize and organize issues. Label names must be unique within each team. If a label with the same name already exists, the existing labe
  - 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. Archiving is permanent with no built-in undo — confirm the issue identifier
  - body: { issue_id: string }
- `POST https://api.mcp.ai/api/linear/get/all/linear/teams` — DEPRECATED: Use ListLinearTeams instead (returns paginated payloads with members and projects); this tool returns simpler id/name-level data for all teams visible to the connected workspace with no se
  - body: { after?: string, first?: integer }
- `POST https://api.mcp.ai/api/linear/get/attachment` — 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 — this is the account behind the API token, which may be a bot or service account rather than a human user. Use t
- `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). Results are team-scoped to the given team_id. To identify the active cycle, check that the curre
  - body: { after?: string, first?: integer, team_id: string }
- `POST https://api.mcp.ai/api/linear/get/linear/issue` — Retrieves an existing Linear issue's comprehensive details, including id, identifier, title, description, timestamps, state, team, creator, attachments, comments (with user info and timestamps, use is
  - body: { issue_id: string }
- `POST https://api.mcp.ai/api/linear/list/linear/cycles` — Retrieves all cycles (time-boxed sprint iterations) org-wide from the Linear account; no filters applied. In large multi-team workspaces this produces heavy responses — filter client-side by team ID a
  - body: { after?: string, first?: integer }
- `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 filter by assignee_id. Only project_id and assignee_id server-side filters are s
  - body: { after?: string, first?: integer, project_id?: string, assignee_id?: string, original_cursor?: string, include_transitions?: boolean, cursor_was_corrupted?: boolean }
- `POST https://api.mcp.ai/api/linear/list/linear/labels` — Retrieves labels from Linear. If team_id is provided, returns labels for that specific team; if omitted, returns all labels across the workspace. Label names are not unique across teams — always use r
  - body: { after?: string, first?: integer, team_id?: string }
- `POST https://api.mcp.ai/api/linear/list/linear/projects` — Retrieves all projects from the Linear account. Returns a flat array (not a GraphQL connection) with fields id and name; use LINEAR_RUN_QUERY_OR_MUTATION for progress, state, issues, or team linkage. 
  - body: { after?: string, first?: integer }
- `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. Returned state IDs are team-scoped — never reuse a stateId ac
  - body: { after?: string, first?: integer, team_id: string }
- `POST https://api.mcp.ai/api/linear/list/linear/teams` — Retrieves all teams with their members and projects. Use stable team IDs or keys (not display names) for subsequent operations — names are non-unique. Results reflect only teams visible to the authent
  - body: { after?: string, first?: integer, project_id?: string }
- `POST https://api.mcp.ai/api/linear/list/linear/users` — Lists all workspace users (not team-scoped) with their IDs, names, emails, and active status. Display names are non-unique — use email to disambiguate before extracting an ID. Only assign users with `
  - 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. Operation is irreversible — obtain explicit user approval before executing. Us
  - body: { issue_id: string, label_id: string }
- `POST https://api.mcp.ai/api/linear/run/query/or/mutation` — Execute any GraphQL query or mutation against Linear's API. USE WHEN: No dedicated action exists, need complex filtering, custom fields, or schema discovery. *** INTROSPECTION FIRST - NEVER GUESS FIEL
  - 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 UUIDs — onl
  - body: { title?: string, teamId?: string, cycleId?: string, dueDate?: string, issueId: string, stateId?: string, estimate?: integer, labelIds?: string[], parentId?: string, priority?: integer, projectId?: string, assigneeId?: 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://new.mcp.ai/linear
- Agent spec (llms.txt): https://new.mcp.ai/linear/llms.txt
- Postman collection: https://new.mcp.ai/linear/postman.json
