Registry / llm-agents / linear-mcp-server

linear-mcp-server

JSON →
library0.1.0jsnpmunverified

A Model Context Protocol (MCP) server for the Linear API, enabling LLMs to interact with Linear issues, teams, and users. Version 0.1.0 provides tools for creating, updating, searching issues, adding comments, and accessing resources via MCP. It requires a Linear API key and is installed as a client configuration for Claude Desktop. Key differentiators: direct MCP integration for AI agents, supports markdown descriptions, flexible issue search with filters, and resource URIs for context access.

npm install linear-mcp-server
INSTALL
IMPORT
SIG · LINEAR-MCP-SERVER
L
linear-mcp-server
llm-agentsjavascriptv0.1.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

server
import { Server } from '@modelcontextprotocol/sdk/server/index.js'
import { Server } from '@modelcontextprotocol/sdk'
Direct path to server module required; ESM-only since v0.1.0
LinearClient
import { LinearClient } from 'linear-client'
const LinearClient = require('linear-client')
Package is ESM-only in v0.1.0; no CJS support
CallToolResult
import { CallToolResult } from '@modelcontextprotocol/sdk/types.js'
import { CallToolResult } from '@modelcontextprotocol/sdk'
Type import from SDK; path required for tree-shaking

Show how to set up and run a Linear MCP server with Stdio transport, handling tool calls and resource reads.

import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { LinearClient } from 'linear-client'; import { CallToolRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema } from '@modelcontextprotocol/sdk/types.js'; const server = new Server({ name: 'linear-mcp-server', version: '0.1.0', }); const linearClient = new LinearClient(process.env.LINEAR_API_KEY ?? ''); server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { switch (name) { case 'linear_create_issue': { const issue = await linearClient.issue.create({ teamId: args.teamId, title: args.title, description: args.description, priority: args.priority ?? 0, }); return { content: [{ type: 'text', text: JSON.stringify(issue) }] }; } case 'linear_search_issues': { const issues = await linearClient.issues.search(args.query ?? '', { limit: args.limit ?? 10 }); return { content: [{ type: 'text', text: JSON.stringify(issues.nodes) }] }; } default: throw new Error(`Unknown tool: ${name}`); } } catch (error) { return { isError: true, content: [{ type: 'text', text: error.message }] }; } }); server.setRequestHandler(ListResourcesRequestSchema, async () => ({ resources: [ { uri: 'linear-issue:///{issueId}', name: 'Linear Issue' }, { uri: 'linear-team:///{teamId}/issues', name: 'Team Issues' }, ], })); server.setRequestHandler(ReadResourceRequestSchema, async (request) => { const uri = request.params.uri; const match = uri.match(/linear-(issue|team):\/\/(.+)/); if (!match) throw new Error(`Invalid resource URI: ${uri}`); const [, type, id] = match; if (type === 'issue') { const issue = await linearClient.issue(id); return { contents: [{ uri, mimeType: 'application/json', text: JSON.stringify(issue) }] }; } throw new Error('Resource not found'); }); const transport = new StdioServerTransport(); await server.connect(transport);
Debug
Known issues
breakingThe package is at v0.1.0; breaking changes can occur at any time without major version bump.
fix
Pin to exact version in package.json and monitor releases for breaking changes.
affects: >=0.1.0 <1.0.0
deprecatedImport paths may change as the MCP SDK evolves. Current paths are specific to version 0.1.0.
fix
Check SDK documentation for updated import paths.
affects: 0.1.0
gotchaThe LINEAR_API_KEY must be set in environment variables; using a placeholder will cause authentication failures.
fix
Ensure LINEAR_API_KEY is set in Claude Desktop config or process environment.
affects: >=0.1.0
gotchaTool names use snake_case (e.g., 'linear_create_issue') but the Linear SDK may use camelCase. Inconsistent naming can cause mismatches.
fix
Map MCP tool names to Linear SDK method names carefully.
affects: >=0.1.0
Errors
Common errors & fixes
Error: LINEAR_API_KEY is not set
The required environment variable LINEAR_API_KEY is missing when the server starts.
fix
Set the environment variable before running the server (e.g., export LINEAR_API_KEY=your_key or add to Claude config).
Error: Team not found
The teamId provided to linear_create_issue does not exist or is invalid.
fix
Verify the team ID from Linear's settings (https://linear.app/YOUR-TEAM/settings/api) and ensure it's a valid UUID.
Error: Cannot read properties of undefined (reading 'map')
The result of a Linear API call might be undefined when no data is returned.
fix
Add null/undefined checks before accessing properties like .nodes on search results.
Error: Unsupported transport type
The MCP SDK's StdioServerTransport requires Node.js 16+; older versions may not support it fully.
fix
Ensure Node.js 16+ is installed (use node --version to check).
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
@modelcontextprotocol/sdkrequiredCore MCP protocol implementation required for server functionality
linear-clientrequiredGraphQL client for Linear API interactions
Agent activity
27 hits · last 30 days
node
22
OpenAI (training)
1
Resources
linear-mcp-server — npm install linear-mcp-server · libregistry