Skip to main content

Linear Integration Guide for Agents

This guide explains how agents should interact with Linear using MCP tools to maintain extensive documentation and project status tracking.

Prerequisites

Ensure Linear MCP server is configured in your MCP settings:

Available Linear MCP Tools

1. mcp__linear__search_issues

Search for Linear issues by query string. Parameters:
  • query: Search query (e.g., “LINEAR-123” or keywords)
  • limit: Max number of results (default: 10)
Example:

2. mcp__linear__get_issue

Get detailed information about a specific issue. Parameters:
  • issue_id: The issue identifier (e.g., “LINEAR-123”)
Example:

3. mcp__linear__create_issue

Create a new Linear issue. Parameters:
  • title: Issue title
  • description: Detailed description (supports markdown)
  • team_id: Team identifier
  • priority: 0 (No priority), 1 (Urgent), 2 (High), 3 (Medium), 4 (Low)
  • state_id: State identifier (Backlog, Todo, In Progress, Done, etc.)
  • assignee_id: User ID to assign
Example:

4. mcp__linear__update_issue

Update an existing Linear issue. Parameters:
  • issue_id: Issue identifier
  • title: New title (optional)
  • description: New description (optional)
  • priority: New priority (optional)
  • state_id: New state (optional)
  • assignee_id: New assignee (optional)
Example:

5. mcp__linear__add_comment

Add a comment to an issue. Parameters:
  • issue_id: Issue identifier
  • body: Comment text (supports markdown)
Example:

6. mcp__linear__list_teams

List all teams in the Linear workspace. Example:

7. mcp__linear__get_team

Get team details including states and workflows. Parameters:
  • team_id: Team identifier
Example:

Agent Workflow with Linear

1. Start of Work - Read Ticket

When starting a new task, agents should:
  1. Search for the ticket:
  1. Get full ticket details:
  1. Read related documents mentioned in the ticket description

2. Update Status - Starting Work

When beginning implementation:

3. Document Implementation Plan

After plan approval, update the ticket with comprehensive details:

4. Progress Updates - After Each Phase

After completing each phase:

5. Technical Decisions

Document all technical decisions in the ticket:

6. Blockers

If encountering blockers:

7. Implementation Complete

When implementation is finished:

8. After Review/QA Feedback

When receiving feedback:

9. Merge to Main

After merge:

Documentation Standards

Ticket Description Structure

Every Linear ticket should have:
  1. Overview - Brief summary of the task
  2. Requirements - What needs to be built/fixed
  3. Implementation Plan - Phased approach with tasks
  4. Technical Stack - Technologies used
  5. Security Considerations - Security measures
  6. API/Database Details - Specific technical details
  7. Documentation Links - Links to related docs
  8. Acceptance Criteria - Clear success criteria

Comment Standards

Every comment should:
  1. Use clear headers with ## markdown
  2. Include status indicators (✅ ✓ ⏳ 🔄 ⚠️)
  3. Reference commits when discussing code changes
  4. Link to files when discussing implementation
  5. Provide context - explain the “why” not just “what”
  6. Be actionable - clear next steps

Update Frequency

Agents should update Linear:
  1. At start of work - Status change + initial comment
  2. After each phase - Progress update
  3. When making decisions - Document the decision
  4. When blocked - Immediate blocker notification
  5. At completion - Comprehensive summary
  6. After feedback - Document changes made
  7. After merge - Final status update

Best Practices

DO ✅

  • Be comprehensive - Include all relevant details
  • Use markdown - Format for readability
  • Link extensively - Connect to files, commits, docs
  • Update frequently - Keep stakeholders informed
  • Document decisions - Explain technical choices
  • Include examples - Show how to test/use
  • Reference blockers - Call out dependencies
  • Provide metrics - Performance, coverage, time

DON’T ❌

  • Be vague - Avoid “Fixed stuff” or “Updated code”
  • Skip updates - Don’t go silent for days
  • Hide blockers - Surface issues immediately
  • Forget links - Always link to related work
  • Omit context - Explain why, not just what
  • Ignore feedback - Acknowledge and address all feedback
  • Rush documentation - Take time to be thorough

Example: Complete Ticket Lifecycle

See LINEAR-123-EXAMPLE.md for a complete example of a ticket from creation through deployment with all updates and comments.

Troubleshooting

Linear MCP Not Working

  1. Check MCP server configuration
  2. Verify LINEAR_API_KEY is set
  3. Restart Claude Code
  4. Test with simple search query

Cannot Find Issue

  1. Verify issue ID format (LINEAR-XXX)
  2. Check you have access to the team
  3. Try searching by title/keywords instead

Cannot Update Issue

  1. Verify you have write permissions
  2. Check state_id is valid for your team
  3. Ensure assignee_id exists

Additional Resources