This server provides Linear integration capabilities through the Model Context Protocol (MCP). It allows AI models to interact with Linear for issue tracking and project management.
The server provides the following tools through the MCP interface:
Creates a new Linear issue with the following parameters:
title
(required): Issue titleteamId
(required): Team ID to create issue indescription
(optional): Issue description (markdown supported)priority
(optional): Priority level (0-4)status
(optional): Initial status name
Search Linear issues with flexible filtering:
query
(optional): Text to search in title/descriptionteamId
(optional): Filter by teamstatus
(optional): Filter by statusassigneeId
(optional): Filter by assigneepriority
(optional): Priority level (0-4)limit
(optional, default: 10): Max results to return
Get all issues in the current sprint/iteration:
teamId
(required): Team ID to get sprint issues for
Search and retrieve Linear teams:
query
(optional): Text to search in team names
Filter current sprint issues by status and automatically filters to the current user:
teamId
(required): Team ID to get sprint issues forstatus
(required): Status to filter by (e.g. "Pending Prod Release")
- Get your Linear API key from Linear's settings > API section
- Create a
.env
file in the project root:
LINEAR_API_KEY=your_api_key_here
- Install dependencies:
npm install
- Start the server:
# Development mode with auto-reload
npm run dev
# Production mode
npm start
# Build TypeScript
npm run build
# Run linter
npm run lint
# Run tests
npm run test
# Inspect MCP server
npm run inspect
- Built with TypeScript and the Model Context Protocol SDK
- Uses Linear SDK for API interactions
- Includes error handling, rate limiting, and connection management
- Supports automatic reconnection with configurable retry attempts
- Implements heartbeat monitoring for connection health
- Provides detailed logging in debug mode
The server includes comprehensive error handling:
- API timeout protection
- Automatic reconnection attempts on connection loss
- Detailed error logging with timestamps
- Graceful shutdown handling
- Heartbeat monitoring for connection health
@linear/sdk
: Linear API client@modelcontextprotocol/sdk
: MCP server implementationzod
: Runtime type checking and validationdotenv
: Environment variable management- TypeScript and related development tools
For the complete list of dependencies, see package.json
.