Linear Integration¶
Learn how to connect Linear with Claude Code for seamless project management, task tracking, and automated workflows.
Duration: 20 minutes Level: Intermediate Plugin: project-management
What You'll Learn¶
- How to set up the Linear MCP server
- Creating project plans directly in Linear
- Implementing Linear tasks with
/implement-task --linear - Synchronizing task status between code and Linear
- Best practices for Linear-based workflows
Prerequisites¶
- project-management plugin installed
- A Linear account with a workspace
- A Linear API key (create one here)
- Familiarity with
/create-prdand/create-plan(see PRD-Based Workflow)
Step 1: Set Up the Linear MCP Server¶
The Linear integration uses the Model Context Protocol (MCP) to connect Claude Code with your Linear workspace.
Generate an API Key¶
- Go to Linear Settings > API
- Click Create Key
- Give it a descriptive name (e.g., "Claude Code")
- Copy the generated key
Keep Your API Key Secret
Never commit your API key to version control. Store it securely using environment variables.
Configure Claude Code¶
Add the Linear MCP server to your Claude Code settings. Create or edit .mcp.json in your project root:
| JSON | |
|---|---|
Global Configuration
For access across all projects, add the configuration to ~/.claude/settings.json instead.
Verify the Connection¶
Restart Claude Code and check if Linear tools are available. You can test by asking:
| Text Only | |
|---|---|
Claude should list your Linear teams and workspaces.
Step 2: Create a Plan in Linear¶
Once the MCP server is configured, you can create project plans directly in Linear.
Generate a PRD First¶
| Bash | |
|---|---|
Create the Plan with Linear¶
| Bash | |
|---|---|
Or with a specific PRD:
| Bash | |
|---|---|
What Gets Created in Linear¶
Claude creates a complete project structure in Linear:
Linear Structure¶
| Claude Concept | Linear Entity | Description |
|---|---|---|
| Feature/EPIC | Project | Top-level container |
| Task | Issue | Individual work item |
| Dependency | Blocking Relation | Task ordering |
| Priority | Issue Priority | Urgent, High, Normal, Low |
| Story Points | Issue Estimate | Effort estimation |
Step 3: Implement Linear Tasks¶
Select a Task¶
| Bash | |
|---|---|
Implementation Workflow¶
When implementing a Linear task, Claude follows this workflow:
graph TD
A["Fetch Issue from Linear"] --> B["Create Worktree & Branch"]
B --> C["Create Draft PR"]
C --> D["Update Linear: In Progress"]
D --> E["Implement Code"]
E --> F["Write Tests"]
F --> G["Finalize PR"]
G --> H["Update Linear: In Review"] Example output:
Branch Naming from Linear¶
Branch names are derived from the Linear issue:
| Issue Type/Label | Branch Name |
|---|---|
| Feature | feature/AUTH-101-oauth2-provider-setup |
| Bug | bugfix/AUTH-102-login-crash |
| Documentation | docs/AUTH-103-api-reference |
| Refactoring | refactor/AUTH-104-auth-module |
Status Synchronization¶
Claude automatically updates Linear issue status:
| Stage | Linear Status |
|---|---|
| Task selected | Backlog → In Progress |
| PR created | Stays In Progress |
| PR ready for review | In Progress → In Review |
| PR merged | In Review → Done |
Step 4: Track Progress¶
In Linear¶
Use Linear's built-in features to track progress:
- Board View - See all tasks across columns (Backlog, In Progress, In Review, Done)
- Cycle View - Track sprint progress
- Project View - Overview of your EPIC with progress percentage
In Claude Code¶
Ask Claude about your project status:
| Text Only | |
|---|---|
Claude will query Linear and provide a summary:
| Text Only | |
|---|---|
Complete Workflow Example¶
Here's the full Linear-integrated workflow from idea to implementation:
Advanced Features¶
Filtering Tasks¶
When using interactive selection, Claude shows available tasks:
| Bash | |
|---|---|
| Text Only | |
|---|---|
Labels and Categories¶
Claude adds appropriate labels to Linear issues based on task content:
feature- New functionalitybug- Bug fixesdocumentation- Docs changestesting- Test-related tasksinfrastructure- DevOps/CI/CD tasks
Linking PRs to Issues¶
When Claude creates a PR for a Linear task, it includes the issue reference in the PR description. Linear automatically links the PR to the issue.
Best Practices¶
✅ Do¶
- Keep Linear as source of truth - All task management happens in Linear
- Use consistent naming - Let Claude generate branch names from issue IDs
- Update status promptly - Claude does this automatically, but verify after merges
- Review before planning - Refine your PRD before running
/create-plan --linear - Use cycles/sprints - Organize tasks into manageable iterations
- Add context to issues - Include technical notes and acceptance criteria
❌ Don't¶
- Create duplicate issues - Claude checks for duplicates, but verify manually
- Skip the PRD - Always start with requirements before creating Linear issues
- Ignore dependencies - Respect task ordering to avoid blocked work
- Bypass the workflow - Use
/implement-task --linearinstead of manual branch creation - Forget cleanup - Remove worktrees after PRs are merged
Troubleshooting¶
Linear MCP Server Not Found¶
Problem: Claude doesn't recognize Linear tools.
Solution:
- Check
.mcp.jsonconfiguration is correct - Verify the API key is valid
- Restart Claude Code after configuration changes
- Test with:
npx -y @modelcontextprotocol/server-linear(should start without errors)
API Key Invalid¶
Problem: Authentication errors when accessing Linear.
Solution:
- Generate a new API key at Linear Settings > API
- Update
.mcp.jsonwith the new key - Ensure the key has the required permissions (read + write)
- Restart Claude Code
Issues Not Created¶
Problem: /create-plan --linear fails to create issues.
Solution:
- Verify you have write access to the Linear team
- Check that the team name/ID is correct
- Ensure your PRD is well-structured (goals, requirements, metrics)
- Try with
--interactiveflag for guided creation
Status Not Updating¶
Problem: Linear issue status doesn't change after implementation.
Solution:
- Verify MCP server is still connected
- Check Linear permissions (need write access)
- Manually update status in Linear if automation fails
- Review the Linear workflow states match expected values
What's Next?¶
Now that you have Linear integrated, explore:
- Plugin Catalog - Discover all available plugins
- Plugin Development - Build your own plugins
- Architecture - Understand the system design
Related Resources¶
- Project Management Plugin - Full plugin documentation
- PRD-Based Workflow - Requirements-driven development
- Your First Commit - Git commit workflow
- Create Your First PR - Pull request workflow