Linear Integration
STDIONode.js implementation of MCP server for Linear issue tracking functionality.
Node.js implementation of MCP server for Linear issue tracking functionality.
A Node.js implementation of an MCP server for Linear integration.
This MCP (Model Context Protocol) server provides a standardized interface for AI models to interact with Linear issue tracking functionality.
npm install
.env
file in the root directory with your Linear API keyLINEAR_API_KEY=your_linear_api_key_here
Start the server:
npm start
For development with file watching:
just dev
For development with debug logging:
just debug
Or set environment variables manually:
LOG_LEVEL=DEBUG NODE_ENV=development node src/index.js
Logs will be written to the logs/mcp-linear.log
file to avoid interfering with the STDIO transport.
The server runs in stdio mode, which means you can connect to it with the MCP Inspector.
npm start
Visit the web-based inspector at: https://inspector.modelcontextprotocol.ai
Select "stdio" as the transport type
Enter the following command:
node /path/to/mcp-linear/src/index.js
Add the following to your Claude Desktop configuration file (typically at
~/.config/Claude Desktop/claude_desktop_config.json
):
{ "mcp": { "servers": [ { "name": "Linear", "command": "node /path/to/mcp-linear/src/index.js", "env": { "LINEAR_API_KEY": "your_linear_api_key_here" } } ] } }
For Cursor, add the following to your settings:
{ "ai.mcp.servers": [ { "name": "Linear", "command": "node /path/to/mcp-linear/src/index.js", "env": { "LINEAR_API_KEY": "your_linear_api_key_here" } } ] }
To verify your setup:
/
├── src/ # Source code
│ ├── effects/ # Effects implementation
│ │ ├── linear/ # Linear API effects
│ │ │ └── types/ # Linear type definitions
│ │ └── logging/ # Logging effects for safe logging with STDIO
│ ├── tools/ # MCP tools implementation
│ │ ├── types/ # Tool type definitions
│ │ └── utils/ # Tool utility functions
│ ├── utils/ # Utility modules
│ │ └── config/ # Configuration utilities
│ └── index.js # Main entry point
├── docs/ # Documentation
│ └── llm_context/ # Documentation for LLMs
├── logs/ # Log files (created at runtime)
└── package.json # Project configuration
The MCP server exposes the following tools:
list_issues
- List Linear issues (also called tickets) with various filtering options (assignee, status, etc.)get_issue
- Get detailed information about a specific Linear issue by IDlist_members
- List Linear team members with optional filtering by namelist_projects
- List Linear projects with optional filtering by team, name, and archive statusget_project
- Get detailed information about a specific Linear project including issues, members and morelist_teams
- List Linear teams with details about their members, projects, and issuesadd_comment
- Add a comment to a specific Linear issuecreate_issue
- Create a new issue in Linear with customizable title, description, priority, and assigneeFor backward compatibility, the following tool aliases are also available:
list_tickets
- Alias for list_issues
get_ticket
- Alias for get_issue
If you're having issues with the Linear MCP server:
Check your Linear API key: Make sure you've set a valid Linear API key in your .env file or environment variables. Linear API keys should start with "linapi".
Enable debug logging:
a. When starting the MCP server:
just debug # or LOG_LEVEL=DEBUG NODE_ENV=development node src/index.js
b. In your client configuration (Claude Desktop, Cursor, etc.):
"env": { "LINEAR_API_KEY": "your_linear_api_key_here", "LOG_LEVEL": "DEBUG" }
c. When calling tools directly, add the debug parameter:
{ "debug": true }
Check log files: Examine logs in the logs/mcp-linear.log
file for detailed error information.
Verify Linear API access: Make sure your Linear API key has appropriate permissions and that you can access the Linear API directly.
The application follows an effects-based architecture:
Effects: Side-effecting operations are isolated in the effects
directory:
linear
: Provides access to Linear API using the official Linear SDKlogging
: Safe logging that doesn't interfere with STDIO transportTools: MCP tool implementations that use effects for side-effects:
Utils: Utility modules for configuration and common functionality
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.