Linear MCP Server
线性 MCP 服务器
用于线性积分的 MCP 服务器的 Node.js 实现。
关于
该 MCP(模型上下文协议)服务器为 AI 模型与线性问题跟踪功能交互提供了标准化接口。
主要特点
使用官方 MCP SDK 实现 Linear 的标准 MCP 协议
支持搜索问题、阅读详情、更新和评论
Related MCP server: Linear MCP Server
入门
先决条件
Node.js (v18 或更高版本)
线性 API 密钥
安装
克隆存储库
安装依赖项
npm install使用您的 Linear API 密钥在根目录中创建一个
.env文件
LINEAR_API_KEY=your_linear_api_key_here运行服务器
启动服务器:
npm start对于使用文件监视进行开发:
just dev对于使用调试日志进行开发:
just debug或者手动设置环境变量:
LOG_LEVEL=DEBUG NODE_ENV=development node src/index.js日志将被写入logs/mcp-linear.log文件以避免干扰 STDIO 传输。
与 MCP Inspector 一起使用
服务器以 stdio 模式运行,这意味着您可以使用 MCP Inspector 连接到它。
在一个终端中启动服务器:
npm start访问基于 Web 的检查器: https://inspector.modelcontextprotocol.ai
选择“stdio”作为传输类型
输入以下命令:
node /path/to/mcp-linear/src/index.js单击“连接”以连接到您正在运行的服务器
与 Claude Desktop 一起使用
将以下内容添加到您的 Claude Desktop 配置文件中(通常位于~/.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"
}
}
]
}
}与游标一起使用
对于光标,将以下内容添加到您的设置中:
{
"ai.mcp.servers": [
{
"name": "Linear",
"command": "node /path/to/mcp-linear/src/index.js",
"env": {
"LINEAR_API_KEY": "your_linear_api_key_here"
}
}
]
}测试您的集成
要验证您的设置:
在 Claude Desktop 或 Cursor 设置中配置 MCP 服务器
重启你的应用程序
询问:“搜索包含‘bug’的线性问题”
助手应该检测并使用 Linear MCP 服务器来检索结果
项目结构
/
├── 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可用工具
MCP 服务器公开以下工具:
list_issues- 列出线性问题(也称为票证)以及各种过滤选项(受让人、状态等)get_issue- 通过 ID 获取有关特定线性问题的详细信息list_members- 列出线性团队成员,并可选择按姓名进行过滤list_projects- 列出线性项目,并可选择按团队、名称和存档状态进行筛选get_project- 获取有关特定 Linear 项目的详细信息,包括问题、成员等list_teams- 列出线性团队及其成员、项目和问题的详细信息add_comment- 为特定的 Linear 问题添加评论create_issue- 使用可自定义的标题、描述、优先级和受让人在 Linear 中创建新问题
为了向后兼容,还提供以下工具别名:
list_tickets-list_issues的别名get_ticket-get_issue的别名
故障排除
如果您遇到 Linear MCP 服务器问题:
检查你的 Linear API 密钥:确保你在 .env 文件或环境变量中设置了有效的 Linear API 密钥。Linear API 密钥应以“lin api ”开头。
启用调试日志记录:
a. 启动 MCP 服务器时:
just debug # or LOG_LEVEL=DEBUG NODE_ENV=development node src/index.jsb. 在您的客户端配置中(Claude Desktop、Cursor 等):
"env": { "LINEAR_API_KEY": "your_linear_api_key_here", "LOG_LEVEL": "DEBUG" }c.直接调用工具时,添加debug参数:
{ "debug": true }检查日志文件:检查
logs/mcp-linear.log文件中的日志以获取详细的错误信息。验证线性 API 访问权限:确保您的线性 API 密钥具有适当的权限,并且您可以直接访问线性 API。
建筑学
该应用程序遵循基于效果的架构:
效果:副作用操作被隔离在
effects目录中:linear:使用官方 Linear SDK 提供对 Linear API 的访问logging:安全日志记录,不会干扰 STDIO 传输
工具:使用效果作为副作用的 MCP 工具实现:
每个工具都遵循使用 Zod 进行输入验证的一致模式
工具通过服务器通过 MCP 协议公开
每个工具都可以通过线性效果访问 Linear 客户端
Utils :用于配置和常用功能的实用程序模块
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
Available Tools
8 toolsadd_commentB
Add a comment to a specific Linear ticket. This tool is useful for providing feedback, status updates, or additional information on existing tickets.
Inputs: comment (required), ticketId (required), debug.
create_issueB
Create a new issue in Linear. This tool is useful for adding new tasks, bugs, or feature requests to your Linear workspace.
Inputs: teamId (required), title (required), assigneeId, debug, +4 more.
get_issueC
Get detailed information about a specific Linear issue (also called a ticket), including comments if requested.
Inputs: issueId (required), debug, includeComments.
get_projectB
Get detailed information about a Linear project including team, lead, issues, and members. Use this to see comprehensive details of a specific project.
Inputs: projectId (required), debug, includeComments, includeIssues, +2 more.
list_issuesC
List Linear issues (also called tickets) with filtering by assignee, status, and project. Use this to browse and find issues in your Linear workspace.
Inputs: assignedToMe, assignee, debug, limit, +4 more.
list_membersC
List Linear team members with optional filtering by name. This tool is useful for finding member details including usernames, display names, and emails.
Inputs: debug, limit, nameFilter, teamId.
list_projectsB
List Linear projects with optional filtering by team, name, and archive status. Shows project details including status, lead, progress, and dates.
Inputs: debug, fuzzyMatch, includeArchived, includeThroughIssues, +5 more.
list_teamsA
List Linear teams with details about their members, projects, and issues. Use this to get a high-level view of all teams in your Linear workspace.
Inputs: debug, includeMembers, includeProjects, limit, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose targeting specific resources and actions in Linear, such as adding comments, creating issues, getting issues/projects, and listing issues/members/projects/teams. There is no overlap or ambiguity between tools, making it easy for an agent to select the correct one based on the task.
All tool names follow a consistent verb_noun pattern (e.g., add_comment, create_issue, get_issue, list_issues), with verbs like 'add', 'create', 'get', and 'list' applied uniformly to appropriate nouns. There are no deviations or mixed conventions, ensuring predictable and readable naming throughout.
With 8 tools, this server is well-scoped for managing Linear issues, projects, teams, and members. Each tool earns its place by covering essential operations like CRUD for issues and listing for resources, without being too sparse or bloated, making it efficient for typical workflows.
The tool set provides strong coverage for core Linear operations, including creating and retrieving issues, adding comments, and listing issues, members, projects, and teams. However, minor gaps exist, such as missing update or delete operations for issues and projects, which agents might need to work around for full lifecycle management.
Related MCP Connectors
Search, read and create Linear issues, projects, teams and cycles.
Find and manage issues, projects, and documents in your Linear workspace.
Issues, projects, cycles, and roadmaps via the official Linear hosted MCP server.
Unofficial Linear MCP — wraps the Linear GraphQL API (OAuth)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI models to interact with Linear for issue tracking and project management through capabilities like creating/searching issues, managing sprints, and retrieving workflow states.-
- AlicenseAqualityDmaintenanceA Model Context Protocol server that integrates with Linear, enabling AI assistants to create, update, search, and comment on issues for project management and issue tracking.56Apache 2.0
- FlicenseNot gradedqualityDmaintenanceAllows LLMs to integrate with Linear's issue tracking system, enabling them to create, update, search, and comment on issues through the Linear API.-
- AlicenseNot gradedqualityDmaintenanceProvides access to Linear's issue tracking system through a standardized Model Context Protocol interface, allowing users to create, update, search, and manage issues, projects, and comments via natural language.1MIT