packetnomad linear mcp

packetnomad linear mcp avatar

by packetnomad

A Model Context Protocol server for Linear.

What is packetnomad linear mcp

Linear MCP Server

A Model Context Protocol (MCP) server implementation that provides access to Linear's issue tracking system through a standardized interface.

Features

  • Create new issues and subissues with label support
  • Retrieve the list of linear projects
  • Retrieve the project updates
  • Create a new project update with health status
  • Update existing issues with full field modification
  • Delete issue with validation
  • Self-assign issues using 'me' keyword
  • Advanced search with Linear's powerful filtering capabilities
  • Filter issues by cycle (current, next, previous, or specific cycle by UUID or number)
  • Add comments to issues with markdown support
  • Query Linear issues by ID or key with optional relationships
  • Search issues using custom queries with enhanced metadata
  • Type-safe operations using Linear's official SDK
  • Comprehensive error handling
  • Rate limit handling
  • Clean data transformation
  • Parent/child relationship tracking with team inheritance
  • Label management and synchronization

Prerequisites

  • Bun runtime (v1.0.0 or higher)
  • Linear account with API access

Environment Variables

LINEAR_API_KEY=your_api_key  # Your Linear API token

Installation & Setup

1. Clone the repository:

git clone [repository-url]
cd linear-mcp

2. Install dependencies and build:

bun install
bun run build

3. Configure the MCP server:

Edit the appropriate configuration file:

macOS:

  • Cline: ~/Library/Application Support/claude-code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows:

  • Cline: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
  • Claude Desktop: %APPDATA%\Claude Desktop\claude_desktop_config.json

Linux:

  • Cline: ~/.config/claude-code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • Claude Desktop: sadly doesn't exist yet

Add the following configuration under the mcpServers object:

{
  "mcpServers": {
    "linear": {
      "command": "node",
      "args": ["/absolute/path/to/linear-mcp/build/index.js"],
      "env": {
        "LINEAR_API_KEY": "your_api_key"
      }
    }
  }
}

4. Restart the MCP server.

Within Cline's MCP settings, restart the MCP server. Restart Claude Desktop to load the new MCP server.

Development

Run development server:

bun run dev

Build project:

bun run build

Available MCP Tools

For detailed usage examples of all tools, see USAGE.md.

create_issue

Create a new Linear issue or subissue.

Input Schema:

{
  "teamId": "string",     
  "title": "string",      
  "description": "string",
  "parentId": "string",   
  "status": "string",
  "priority": "number",   
  "assigneeId": "string | 'me'",
  "labelIds": ["string"]  
}

update_issue

Update an existing Linear issue.

Input Schema:

{
  "issueId": "string",    
  "title": "string",      
  "description": "string",
  "status": "string",     
  "priority": "number",   
  "assigneeId": "string | 'me'",
  "labelIds": ["string"],
  "cycleId": "string"
}

get_issue

Get detailed information about a specific Linear issue with optional relationships.

Input Schema:

{
  "issueId": "string",
  "includeRelationships": "boolean"  
}

search_issues

Search for Linear issues using a query string and advanced filters. Supports Linear's powerful filtering capabilities.

Input Schema:

{
  "query": "string",
  "includeRelationships": "boolean",
  "filter": {
    "title": { "contains": "string", "eq": "string", ... },
    "description": { "contains": "string", "eq": "string", ... },
    "priority": { "gte": "number", "lt": "number", ... },
    "estimate": { "eq": "number", "in": ["number"], ... },
    "dueDate": { "lt": "string", "gt": "string", ... },
    "createdAt": { "gt": "P2W", "lt": "2024-01-01", ... },
    "updatedAt": { "gt": "P1M", ... },
    "completedAt": { "null": true, ... },
    "assignee": { "id": { "eq": "string" }, "name": { "contains": "string" } },
    "creator": { "id": { "eq": "string" }, "name": { "contains": "string" } },
    "team": { "id": { "eq": "string" }, "key": { "eq": "string" } },
    "state": { "type": { "eq": "started" }, "name": { "eq": "string" } },
    "labels": { "name": { "in": ["string"] }, "every": { "name": { "eq": "string" } } },
    "project": { "id": { "eq": "string" }, "name": { "contains": "string" } },
    "and": [{ /* filters */ }],
    "or": [{ /* filters */ }],
    "assignedTo": "string | 'me'",
    "createdBy": "string | 'me'"
  },
  "projectId": "string",
  "projectName": "string"
}

Supported Comparators:

  • String fields: eq, neq, in, nin, contains, startsWith, endsWith (plus case-insensitive variants)
  • Number fields: eq, neq, lt, lte, gt, gte, in, nin
  • Date fields: eq, neq, lt, lte, gt, gte (supports ISO 8601 durations)

get_teams

Get a list of Linear teams with optional name/key filtering.

Input Schema:

{
  "nameFilter": "string"  
}

delete_issue

Delete an existing Linear issue.

Input Schema:

{
  "issueId": "string"
}

create_comment

Create a new comment on a Linear issue.

Input Schema:

{
  "issueId": "string",
  "body": "string"
}

get_projects

Get a list of Linear projects with optional name filtering and pagination.

Input Schema:

{
  "nameFilter": "string",
  "includeArchived": "boolean",
  "first": "number",
  "after": "string"
}

get_project_updates

Get project updates for a given project ID with optional filtering parameters.

Input Schema:

{
  "projectId": "string",
  "includeArchived": "boolean",
  "first": "number",
  "after": "string",
  "createdAfter": "string",
  "createdBefore": "string",
  "userId": "string | 'me'",
  "health": "string"
}

create_project_update

Create a new update for a Linear project.

Input Schema:

{
  "projectId": "string",
  "body": "string",
  "health": "onTrack | atRisk | offTrack",
  "isDiffHidden": "boolean"
}

Technical Details

  • Built with TypeScript in strict mode
  • Uses Linear's official SDK (@linear/sdk)
  • Uses MCP SDK (@modelcontextprotocol/sdk 1.4.0)
  • Authentication via API tokens
  • Comprehensive error handling
  • Rate limiting considerations
  • Bun runtime for improved performance
  • ESM modules throughout
  • Vite build system
  • Type-safe operations
  • Data cleaning features:
    • Issue mention extraction (ABC-123 format)
    • User mention extraction (@username format)
    • Markdown content cleaning
    • Content optimization for AI context
  • Self-assignment support:
    • Automatic current user resolution
    • 'me' keyword support in create/update operations
    • Efficient user ID caching
  • Advanced search capabilities:
    • Comprehensive filtering with Linear's API
    • Support for all field comparators
    • Relationship filtering
    • Logical operators (and, or)
    • Relative date filtering
    • Filter by assignee/creator (including self)
    • Support for specific user IDs
    • Project filtering by ID or name
    • Efficient query optimization
  • Project management features:
    • Project listing with filtering and pagination
    • Project update creation with health status tracking
    • Project update retrieval with filtering options

Error Handling

The server implements a comprehensive error handling strategy:

  • Network error detection and appropriate messaging
  • HTTP status code handling
  • Detailed error messages with status codes
  • Error details logging to console
  • Input validation for all parameters
  • Label validation and synchronization
  • Safe error propagation through MCP protocol
  • Rate limit detection and handling
  • Authentication error handling
  • Invalid query handling
  • Team inheritance validation for subissues
  • User resolution validation
  • Search filter validation

LICENCE

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

Leave a Comment

Frequently Asked Questions

What is MCP?

MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.

What are MCP Servers?

MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.

How do MCP Servers work?

MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.

Are MCP Servers secure?

Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.

Related MCP Servers

chrisdoc hevy mcp avatar

chrisdoc hevy mcp

mcp
sylphlab pdf reader mcp avatar

sylphlab pdf reader mcp

An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts. Uses pdf-parse.

pdf-parsetypescriptnodejs
aashari mcp server atlassian bitbucket avatar

aashari mcp server atlassian bitbucket

Node.js/TypeScript MCP server for Atlassian Bitbucket. Enables AI systems (LLMs) to interact with workspaces, repositories, and pull requests via tools (list, get, comment, search). Connects AI directly to version control workflows through the standard MCP interface.

atlassianrepositorymcp
aashari mcp server atlassian confluence avatar

aashari mcp server atlassian confluence

Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP interface.

atlassianmcpconfluence
prisma prisma avatar

prisma prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

cockroachdbgomcp
Zzzccs123 mcp sentry avatar

Zzzccs123 mcp sentry

mcp sentry for typescript sdk

mcptypescript
zhuzhoulin dify mcp server avatar

zhuzhoulin dify mcp server

mcp
zhongmingyuan mcp my mac avatar

zhongmingyuan mcp my mac

mcp
zhixiaoqiang desktop image manager mcp avatar

zhixiaoqiang desktop image manager mcp

MCP 服务器,用于管理桌面图片、查看详情、压缩、移动等(完全让Trae实现)

mcp
zhixiaoqiang antd components mcp avatar

zhixiaoqiang antd components mcp

An MCP service for Ant Design components query | 一个减少 Ant Design 组件代码生成幻觉的 MCP 服务,包含系统提示词、组件文档、API 文档、代码示例和更新日志查询

designantdapi

Submit Your MCP Server

Share your MCP server with the community

Submit Now