一个实现了Model Context Protocol (MCP)服务器,通过标准化接口提供对Linear问题跟踪系统的访问。
LINEAR_API_KEY=your_api_key # 您的Linear API令牌
git clone [repository-url]
cd linear-mcp
bun install
bun run build
编辑相应的配置文件:
macOS:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_m_ mcp_settings.json%APPDATA%\Claude Desktop\claude_desktop_config.jsonLinux:
~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json在mcpServers对象下添加以下配置:
{
"mcpServers": {
"linear": {
"command": "node",
"args": ["/absolute/path/to/linear-mcp/build/index.js"],
"env": {
"LINEAR_API_KEY": "your_api_key"
}
}
}
}
在Cline的MCP设置中重启MCP服务器。重启Claude Desktop以加载新的MCP服务器。
运行开发服务器:
bun run dev
构建项目:
bun run build
对于所有工具的详细使用示例,请参见USAGE.md。
创建一个新的Linear问题或子问题。
输入模式:
{
"teamId": "string",
"title": "string",
"description": "string",
"parentId": "string",
"status": "string",
"priority": "number",
"assigneeId": "string | 'me'",
"labelIds": ["string"]
}
更新现有的Linear问题。
输入模式:
{
"issueId": "string",
"title": "string",
"description": "string",
"status": "string", // 预期状态名称(例如,“正在进行中”)。必须是该问题团队的有效状态。
"priority": "number", // 预期值从0(无)到4(低)。
"assigneeId": "string | 'me'",
"labelIds": ["string"],
"cycleId": "string"
}
获取特定Linear问题的详细信息,可选关系。
输入模式:
{
"issueId": "string",
"includeRelationships": "boolean"
}
使用查询字符串和高级过滤器搜索Linear问题。支持Linear的强大过滤能力。
输入模式:
{
"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": [{ /* 过滤器 */ }],
"or": [{ /* 过滤器 */ }],
"assignedTo": "string | 'me'",
"createdBy": "string | 'me'"
},
"projectId": "string",
"projectName": "string"
}
支持的比较符:
eq, neq, in, nin, contains, startsWith, endsWith(包括不区分大小写的变体)eq, neq, lt, lte, gt, gte, in, nineq, neq, lt, lte, gt, gte(支持ISO 8601持续时间)获取Linear团队列表,可选名称/键过滤。
输入模式:
{
"nameFilter": "string"
}
删除现有的Linear问题。
输入模式:
{
"issueId": "string"
}
在Linear问题上创建新评论。
输入模式:
{
"issueId": "string",
"body": "string"
}
获取Linear项目的列表,可选名称过滤和分页。
输入模式:
{
"nameFilter": "string",
"includeArchived": "boolean",
"first": "number",
"after": "string"
}
根据给定的项目ID获取项目更新,可选过滤参数。
输入模式:
{
"projectId": "string",
"includeArchived": "boolean",
"first": "number",
"after": "string",
"createdAfter": "string",
"createdBefore": "string",
"userId": "string | 'me'",
"health": "string"
}
为Linear项目创建新的更新。
输入模式:
{
"projectId": "string",
"body": "string",
"health": "onTrack | atRisk | offTrack",
"isDiffHidden": "boolean"
}
服务器实现了一个全面的错误处理策略:
本项目采用MIT许可证 - 详情请参阅LICENSE文件。 </中文翻译>