@mcp-devtools/linear

March 9, 2025 ยท View on GitHub

npm version License: MIT Status Badge

Talk to Linear - Model Context Protocol (MCP) Server for Linear integration with AI assistants.

โœจ Highlights

  • ๐Ÿ” Issue Management - Create, read, update, and delete Linear issues
  • ๐Ÿ”„ Workflow Integration - Access workflow states, teams, and projects
  • ๐Ÿ‘ฅ User Management - List users and assign issues
  • ๐Ÿ”Ž Powerful Search - Find issues using Linear's GraphQL API
  • โšก Fast Setup - Simple environment configuration

๐Ÿš€ Quick Start

Installation

To use the Linear MCP server with Cursor IDE:

  1. Open Cursor Settings โ†’ MCP
  2. Click "Add New MCP Server"
  3. Fill in the following details:
    • Name: Linear
    • Type: command
    • Command:
      env LINEAR_API_KEY=[YOUR_API_KEY] npx -y @mcp-devtools/linear
      

Required Environment Variables:

  • LINEAR_API_KEY: Your Linear API key (Create one in Linear at Settings โ†’ Security & access โ†’ Personal API keys)

Using Linear Tools

Once configured, you can interact with Linear through your AI assistant in Cursor:

# Search for issues
search_issues "bug in authentication"

# Get detailed information about a specific issue
get_issue ENG-123

# Create a new issue
create_issue teamId="TEAM_ID" title="Fix login bug" description="Users can't login properly"

# List teams
list_teams

# List workflow states for a team
list_workflow_states teamId="TEAM_ID"

๐Ÿ“‹ Tool Reference

ToolDescriptionParametersAliases
search_issuesSearch for issues using a query stringquery (string), maxResults (number, optional)execute_graphql
get_issueGet detailed information about an issueissueId (string)read_issue, get_task, read_task
create_issueCreate a new issueteamId (string), title (string), description (string, optional), priority (number, optional), assigneeId (string, optional), stateId (string, optional)create_task
update_issueUpdate an existing issueissueId (string), title (string, optional), description (string, optional), priority (number, optional), assigneeId (string, optional), stateId (string, optional)edit_issue, update_task, edit_task
delete_issueDelete an issueissueId (string)delete_task
list_teamsList all teams--
list_workflow_statesList workflow states for a teamteamId (string)-
list_usersList all users--
list_projectsList projectsmaxResults (number, optional)-

๐Ÿ› ๏ธ Examples

Searching for Issues

# Basic search by keyword
search_issues "authentication bug"

# Search with limited results
search_issues "priority is high" maxResults=5

# Advanced search using Linear's query syntax
search_issues "assignee:@me status:Todo"

Managing Issues

# Create an issue
create_issue teamId="TEAM_ID" title="Update documentation" description="The API documentation needs to be updated with the new endpoints"

# Update an issue
update_issue issueId="ENG-123" title="Updated title" priority=2

# Delete an issue
delete_issue issueId="ENG-123"

Team and User Management

# Get a list of all teams
list_teams

# Get workflow states for a team
list_workflow_states teamId="TEAM_ID"

# List all users
list_users

โš™๏ธ Configuration

Environment Variables

VariableDescriptionRequiredDefault
LINEAR_API_KEYYour Linear API keyYes-

Using with Linear GraphQL API

The Linear MCP server uses Linear's GraphQL API. For advanced queries, you can use the execute_graphql alias, which works the same as search_issues.

๐Ÿ†˜ Troubleshooting

Common Issues

  1. Authentication Error

    • Ensure your Linear API key is valid and has the necessary permissions
    • Check that you've correctly set the LINEAR_API_KEY environment variable
  2. Issues Not Found

    • Verify that issue identifiers are in the correct format (e.g., "ENG-123")
    • Make sure your search queries follow Linear's search syntax
  3. Permission Issues

    • Ensure your API key has permission to perform the requested actions
    • Some operations may require admin-level permissions

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.