Provides comprehensive access to Linear's API, allowing for the management of issues, projects, teams, cycles, and labels, as well as searching and filtering tasks within a workspace.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Linear.app Serverlist all high priority issues assigned to me"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Linear.app Server
A Model Context Protocol (MCP) server that enables OpenCode and other MCP clients to interact with Linear.app's API for issue tracking, project management, and workflow automation.
Features
Issue Management: Create, update, list, search, and get detailed issue information
Project & Team Operations: List projects and teams, access workflow states
Cycle Management: Create and manage sprints/cycles
Label Management: Create and organize labels
User Operations: List users and assign issues
Advanced Filtering: Filter issues by status, assignee, project, labels, and more
Type-Safe: Built with TypeScript and Zod validation for robust error handling
Production-Ready: Comprehensive error handling, logging, and rate limit awareness
Installation
Prerequisites
Bun 1.0.0 or higher (or Node.js 18.0.0+)
A Linear.app account and API key
Setup
Clone this repository:
git clone <repository-url>
cd mcp-linearappInstall dependencies:
bun installCreate a
.envfile with your Linear API key:
cp .env.example .envEdit
.envand add your Linear API key:
LINEAR_API_KEY=lin_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxHow to get your Linear API key:
Go to https://linear.app/settings/api
Click "Create new API key"
Give it a name and copy the key
Paste it into your
.envfileBuild the project:
bun run buildUsage
With OpenCode
Add this server to your OpenCode configuration:
macOS: ~/Library/Application Support/OpenCode/opencode_config.json
Windows: %APPDATA%/OpenCode/opencode_config.json
Linux: ~/.config/OpenCode/opencode_config.json
{
"mcpServers": {
"linear": {
"command": "node",
"args": ["/absolute/path/to/mcp-linearapp/dist/index.js"],
"env": {
"LINEAR_API_KEY": "lin_api_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}After adding the configuration, restart OpenCode.
With Other MCP Clients
The server uses stdio transport and can be integrated with any MCP-compatible client:
bun run dist/index.js
# or with Node.js:
node dist/index.jsAvailable Tools
Issue Management
linear_list_issues
List Linear issues with optional filters.
Parameters:
teamId(optional): Filter by team IDprojectId(optional): Filter by project IDassigneeId(optional): Filter by assignee user IDstatus(optional): Filter by status (backlog, unstarted, started, completed, canceled, triage, in_progress, done)priority(optional): Filter by priority (0=None, 1=Urgent, 2=High, 3=Medium, 4=Low)label(optional): Filter by label namelimit(optional): Maximum number of issues (1-100, default: 25)includeArchived(optional): Include archived issues (default: false)
Example:
List all high priority issues assigned to melinear_create_issue
Create a new Linear issue.
Parameters:
title(required): Issue titleteamId(required): Team ID where the issue will be createddescription(optional): Issue description in markdownprojectId(optional): Project ID to assign the issue toassigneeId(optional): User ID to assign the issue topriority(optional): Priority (0-4)labelIds(optional): Array of label IDsstateId(optional): Workflow state IDestimate(optional): Estimate in pointsdueDate(optional): Due date (YYYY-MM-DD)parentId(optional): Parent issue ID for sub-issues
Example:
Create an issue titled "Fix login bug" in the Engineering team with high prioritylinear_update_issue
Update an existing Linear issue.
Parameters:
issueId(required): Issue ID or identifier (e.g., "ENG-123")title,description,assigneeId,priority,stateId,labelIds,estimate,dueDate,projectId(all optional)
Example:
Update issue ENG-123 to change priority to urgent and assign to Johnlinear_get_issue
Get detailed information about a specific issue.
Parameters:
issueId(required): Issue ID or identifier (e.g., "ENG-123")
Example:
Get details for issue ENG-123linear_search_issues
Search issues by text query.
Parameters:
query(required): Search query textteamId(optional): Limit search to specific teamlimit(optional): Maximum results (1-100, default: 25)includeArchived(optional): Include archived issues
Example:
Search for issues about authenticationlinear_assign_issue
Assign an issue to a user.
Parameters:
issueId(required): Issue ID or identifierassigneeId(required): User ID to assign to
Example:
Assign issue ENG-123 to user abc-123linear_add_comment
Add a comment to an issue.
Parameters:
issueId(required): Issue ID or identifierbody(required): Comment body in markdown
Example:
Add a comment to ENG-123 saying "This is fixed in the latest build"Team & Workflow
linear_list_teams
List all teams in your workspace.
Parameters:
includeArchived(optional): Include archived teams (default: false)
Example:
List all teamslinear_list_workflow_states
List workflow states for a team.
Parameters:
teamId(required): Team ID
Example:
List workflow states for team abc-123Projects
linear_list_projects
List all projects.
Parameters:
teamId(optional): Filter by team IDincludeArchived(optional): Include archived projects (default: false)
Example:
List all projects for the Engineering teamCycles (Sprints)
linear_create_cycle
Create a new cycle/sprint.
Parameters:
teamId(required): Team IDname(required): Cycle namedescription(optional): Cycle descriptionstartsAt(required): Start date (YYYY-MM-DD)endsAt(required): End date (YYYY-MM-DD)
Example:
Create a 2-week sprint starting today for the Engineering teamlinear_list_cycles
List cycles for a team.
Parameters:
teamId(required): Team IDincludeArchived(optional): Include archived cycles
Example:
List all active cycles for team abc-123Labels
linear_create_label
Create a new label.
Parameters:
name(required): Label nameteamId(required): Team IDcolor(optional): Color in hex format (e.g., "#FF0000")description(optional): Label description
Example:
Create a label called "bug" with red color for the Engineering teamlinear_list_labels
List all labels.
Parameters:
teamId(optional): Filter by team ID
Example:
List all labelsUsers
linear_list_users
List all users in your workspace.
Parameters:
includeDisabled(optional): Include disabled users (default: false)
Example:
List all active usersWorkflow Examples
Creating an Issue with Full Context
First, list teams to get the team ID:
List all teamsOptionally, list users to assign the issue:
List all usersCreate the issue:
Create an issue titled "Implement OAuth authentication" in team abc-123, assign to user xyz-456, with high priority and description "Need to add OAuth 2.0 support for Google and GitHub"Managing a Sprint
Create a new cycle:
Create a 2-week sprint called "Q1 Sprint 3" for team abc-123 starting 2024-02-01List issues to find what to include:
List backlog issues for team abc-123Update issues to add them to the sprint and assign:
Update issue ENG-45 to add to cycle cycle-123 and assign to user xyz-456Tracking Progress
Search for issues in a specific area:
Search for issues about "authentication"Get detailed information:
Get details for issue ENG-123Add progress updates:
Add comment to ENG-123: "Authentication flow is complete, working on tests"Development
Scripts
bun run build- Build the TypeScript projectbun run dev- Watch mode for developmentbun start- Start the MCP serverbun run lint- Run ESLintbun run format- Format code with Prettierbun run typecheck- Type check without emitting files
Project Structure
mcp-linearapp/
├── src/
│ ├── index.ts # Main MCP server entry point
│ ├── linear-client.ts # Linear API client wrapper
│ ├── tools/ # MCP tool implementations
│ │ ├── issues.ts # Issue-related tools
│ │ ├── projects.ts # Project tools
│ │ ├── cycles.ts # Cycle/sprint tools
│ │ ├── teams.ts # Team tools
│ │ ├── labels.ts # Label tools
│ │ └── users.ts # User tools
│ └── schemas/ # Zod validation schemas
│ └── index.ts
├── dist/ # Compiled JavaScript (generated)
├── package.json
├── tsconfig.json
└── README.mdArchitecture
The server is built with:
MCP SDK: Handles the Model Context Protocol communication
Linear SDK: Official Linear API client
Zod: Runtime type validation and schema enforcement
TypeScript: Type safety throughout the codebase
Key design decisions:
Type Safety: All inputs are validated with Zod schemas before reaching the Linear API
Error Handling: Comprehensive error handling with meaningful error messages
Modular Design: Tools are organized by domain (issues, projects, cycles, etc.)
Client Wrapper: LinearAPIClient provides a clean abstraction over the Linear SDK with consistent error handling and data formatting
Error Handling
The server provides clear error messages for common issues:
Missing API Key: "LINEAR_API_KEY environment variable is required"
Invalid Parameters: Zod validation errors with specific field information
API Errors: Linear API errors are caught and formatted with context
Not Found: Clear messages when issues, teams, or other resources don't exist
Rate Limiting
Linear's API has rate limits. The server doesn't implement client-side rate limiting, but:
Uses the official Linear SDK which handles some retry logic
Provides clear error messages when rate limits are hit
Consider implementing delays between bulk operations
Troubleshooting
Server won't start
Verify LINEAR_API_KEY is set in your environment
Check that Bun version is 1.0.0 or higher (or Node.js 18.0.0+)
Ensure
bun run buildcompleted successfully
"Invalid API key" error
Verify your API key is correct
Check that the key hasn't been revoked in Linear settings
Ensure there are no extra spaces in the .env file
"Team not found" or similar errors
Use
linear_list_teamsto get valid team IDsUse
linear_list_usersto get valid user IDsUse
linear_list_projectsto get valid project IDsIssue identifiers are case-sensitive (e.g., "ENG-123" not "eng-123")
Changes not appearing in OpenCode
Restart OpenCode after modifying the configuration
Check OpenCode logs for connection errors
Verify the absolute path in the configuration is correct
Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Make your changes with proper TypeScript types
Add/update tests if applicable
Run
bun run lintandbun run typecheckSubmit a pull request
License
MIT
Acknowledgments
Built with the Model Context Protocol SDK
Uses the Linear SDK for API access
Inspired by the Linear community and MCP ecosystem
Support
Linear API Documentation: https://developers.linear.app/
MCP Documentation: https://modelcontextprotocol.io/
Report issues: GitHub Issues