home / skills / lambda-curry / devagent / linear-mcp-integration

linear-mcp-integration skill

/.cursor/skills/linear-mcp-integration

This skill automates Linear MCP operations by fetching, validating, creating, and updating Linear issues, comments, and statuses during PR reviews.

npx playbooks add skill lambda-curry/devagent --skill linear-mcp-integration

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
3.5 KB
---
name: Linear MCP Integration
description: >-
  Use Linear MCP server functions to interact with Linear issues, projects, teams,
  and comments. Use when: (1) Fetching issue requirements and acceptance criteria
  from Linear, (2) Validating PR changes against Linear issue requirements,
  (3) Creating or updating Linear issues and comments, (4) Checking issue status,
  labels, or relationships, (5) Listing issues by team, assignee, or project, or
  (6) Any Linear project management operation. Requires Linear MCP server
  configured and authenticated.
---

# Linear MCP Integration

Use Linear MCP server functions to interact with Linear's project management system.

## Prerequisites

- Linear MCP server configured and available
- Authentication: Linear API token configured in MCP server
- Access to Linear workspace

## Quick Start

**Get issue details:**

```typescript
mcp_Linear_get_issue({
  id: "LIN-123",
  includeRelations: true // get related/blocking issues
})
```

**List issues:**

```typescript
mcp_Linear_list_issues({
  team: "Engineering",
  state: "In Progress"
})
```

## Usage Patterns for PR Review

### Fetch Issue Requirements

**Step 1: Extract Issue ID from PR**

- Look for Linear issue references in PR title/body (e.g., `LIN-123`, `[LIN-123]`)
- Extract issue identifier

**Step 2: Get Issue Details**

```typescript
mcp_Linear_get_issue({
  id: "LIN-123", // extracted from PR
  includeRelations: true // to get blocking/related issues
})
```

**Step 3: Extract Requirements**

- Parse issue `description` for acceptance criteria
- Check `labels` for feature tags
- Review `comments` for additional context
- Check `relatedTo` and `blocks` for dependencies

### Validate PR Completeness

Check if PR addresses all requirements:

1. Get issue details with `mcp_Linear_get_issue`
2. Parse issue description for:
  - Acceptance criteria (checkboxes, numbered lists)
  - Feature requirements
  - Technical specifications
3. Compare PR changes against requirements
4. Identify gaps or missing implementations

### Update Issue Status

After PR review:

- Use `mcp_Linear_update_issue` to:
  - Update status (e.g., "In Review", "Ready for QA")
  - Add comments with review findings
  - Link related issues

### Create Review Comments

Post review findings to Linear:

```typescript
mcp_Linear_create_comment({
  issueId: "LIN-123",
  body: "## PR Review Summary\n\n✅ Requirements met: ...\n⚠️ Gaps identified: ..."
})
```

## Common Workflows

### PR Review with Issue Validation

1. Extract issue reference from PR title/body
2. Fetch issue using `mcp_Linear_get_issue`
3. Parse requirements from issue description
4. Review PR changes against requirements
5. Create comment on Linear issue with review summary
6. Update issue status if needed

### Issue Discovery

1. List issues for a team/project using `mcp_Linear_list_issues`
2. Filter by state, assignee, or labels
3. Get details for relevant issues
4. Cross-reference with PR changes

## Integration with GitHub

When reviewing PRs:

1. Extract Linear issue references from PR title/body
2. Use Linear MCP to fetch issue requirements
3. Validate PR changes against requirements
4. Post review findings back to Linear issue

## Reference Documentation

- **MCP Functions Reference**: See [mcp-functions.md](references/mcp-functions.md) for function summaries and examples. The MCP server provides authoritative function definitions with complete parameter types and schemas.
- **Linear API Documentation**: [developers.linear.app/docs](https://developers.linear.app/docs)

Overview

This skill integrates with a Linear MCP server to read and manipulate Linear issues, projects, teams, and comments. It helps fetch issue requirements, validate pull requests against issue acceptance criteria, create or update issues and comments, and inspect statuses, labels, and relationships. The skill requires a configured and authenticated Linear MCP server with access to the target workspace. It is implemented in TypeScript for programmatic workflows and automation.

How this skill works

The skill calls MCP functions exposed by the Linear MCP server such as mcp_Linear_get_issue, mcp_Linear_list_issues, mcp_Linear_create_comment, and mcp_Linear_update_issue. It inspects issue descriptions, labels, comments, and relationships (relatedTo/blocks) to extract acceptance criteria and dependencies. Typical flows include extracting an issue ID from a PR, fetching full issue details (including relations), parsing requirements, comparing PR changes to those requirements, and posting review summaries back to Linear.

When to use it

  • When you need to fetch acceptance criteria or technical requirements from a Linear issue before a code review.
  • When validating that a pull request implements an issue’s listed requirements and checkboxes.
  • When creating or updating issues, statuses, or comments programmatically from CI/CD or bots.
  • When listing or filtering issues by team, project, assignee, state, or labels for triage.
  • When checking issue dependencies (blocks/related) to determine sequencing or release impact.

Best practices

  • Ensure the Linear MCP server is configured with a valid Linear API token and workspace access before use.
  • Extract issue identifiers reliably from PR titles and bodies using a consistent pattern (e.g., LIN-123).
  • Parse acceptance criteria from structured patterns (checkboxes, numbered lists) to improve automated validation accuracy.
  • Include relation flags (includeRelations: true) when fetching issues if dependency context matters.
  • Post concise review comments summarizing requirements met and gaps, and update issue status to reflect review outcomes.

Example use cases

  • CI job extracts Linear issue ID from PR, fetches the issue, validates checklist items against code changes, and leaves a review comment.
  • Automated bot lists all 'In Progress' issues for the Engineering team and posts a daily report to Slack.
  • A release script checks for blocking relationships across a set of issues to ensure safe deployment sequencing.
  • A QA workflow updates issue status to 'Ready for QA' and appends a summary comment after automated tests pass.

FAQ

What authentication is required?

A Linear API token configured on the Linear MCP server and workspace access are required for authenticated MCP function calls.

Can this validate PR changes automatically?

Yes — by extracting the issue ID from the PR, fetching the issue details, parsing acceptance criteria, and comparing those to the PR diff you can automate pass/fail checks and post results.