Skip to main content
Glama

MCP 线性应用

模型上下文协议 (MCP),用于与 Linear 集成,作为 AI 工具。此工具允许您的 AI 通过模型上下文协议与 Linear 进行交互。

特征

  • 完全线性积分

    • 搜索问题

    • 创建新问题

    • 更新问题

    • 添加评论

    • 更新评论

    • 获取用户个人资料

    • 获取团队信息

Related MCP server: Linear MCP Server

先决条件

  • Node.js 18 或更高版本

  • 线性 API 密钥

如何获取线性 API 密钥

要使用此应用程序,您需要一个 Linear API 密钥。获取密钥的步骤如下:

  1. 登录或创建 Linear 帐户

    • 访问Linear并登录您现有的帐户或注册以创建新帐户

  2. 访问工作区设置

    • 在主页上,点击左上角的用户名

    • 选择“工作区设置”选项

  3. 开放 API 设置

    • 在左侧的“设置”栏中,向下滚动直到找到“API”

    • 点击“API”选项

  4. 创建新的 API 密钥

    • 输入 API 密钥的标签(例如“MCP Linear App”)

    • 点击“创建新的 API 密钥”按钮

  5. 安全存储 API 密钥

    • API 密钥仅显示一次

    • 将其复制并保存在安全的位置,因为 Linear 不会再次显示它

重要提示:Linear 的 API 密钥请求速率限制为每小时 1,500 个。请确保您的应用程序遵循此限制,以避免出现 429 请求过多错误。

有关获取和使用 Linear API 密钥的更多详细信息,您可以访问Merge.dev 上的本指南

如何使用该工具

1.初始设置

  1. 克隆此存储库:

git clone git@github.com:zalab-inc/mcp-linear-app.git cd mcp-linear-app
  1. 安装依赖项:

npm install
  1. 在根目录中创建一个.env文件:

LINEAR_API_KEY=your_linear_api_key_here
  1. 构建项目:

npm run build
  1. dist文件夹现在可以用于各种 AI 平台的配置了。

2. 游标配置

  1. 找到您的 Cursor MCP 配置文件:

    • Windows: C:\Users\<username>\.cursor\mcp.json

    • macOS: ~/.cursor/mcp.json

    • Linux: ~/.cursor/mcp.json

  2. 编辑文件以添加 Linear MCP 服务器配置:

    { "mcpServers": { "linear": { "command": "<path-to-node>", "args": [ "<path-to-project>/dist/index.js" ], "env": { "LINEAR_API_KEY": "your_linear_api_key_here" } } } }
  3. 替换占位符:

    • <path-to-node> :Node.js 可执行文件的路径

    • <path-to-project> :MCP Linear App 项目目录的绝对路径

    • your_linear_api_key_here :您的线性 API 密钥

示例配置:

{ "mcpServers": { "linear": { "command": "C:\\nvm4w\\nodejs\\node.exe", "args": [ "H:\\mcp\\linear\\dist\\index.js" ], "env": { "LINEAR_API_KEY": "lin_api_xxxxxxxxxxxxxxxxxxxxx" } } } }
  1. 保存文件并重新启动 Cursor 以使更改生效。

3.克劳德配置

要将 MCP Linear Tools 与 Claude 配合使用,您需要将配置添加到 Claude 的设置文件中。请按照以下步骤操作:

  1. 打开 Claude AI 桌面应用程序设置

  2. 导航至“开发者”部分

  3. 查找“工具”配置部分

  4. 为 Linear MCP 添加配置如下:

{ "tools": { "linear": { "command": "<path-to-node>", "args": [ "<path-to-project>/dist/index.js" ], "env": { "LINEAR_API_KEY": "your_linear_api_key_here" } } } }
  1. 替换占位符:

    • <path-to-node> :Node.js 可执行文件的路径

    • <path-to-project> :MCP Linear App 项目目录的绝对路径

    • your_linear_api_key_here :您的线性 API 密钥

示例配置:

{ "tools": { "linear": { "command": "/usr/local/bin/node", "args": [ "/Users/username/projects/mcp-linear-app/dist/index.js" ], "env": { "LINEAR_API_KEY": "lin_api_xxxxxxxxxxxxxxxxxxxxx" } } } }

4. 其他平台配置

其他支持MCP的AI平台基本原理相同:

  1. 查找外部工具或 MCP 的配置区域

  2. 使用此存储库中的dist/index.js文件将其配置为运行 Node.js

  3. 在环境配置中包含您的 LINEAR_API_KEY

可用工具

配置完成后,您的 AI 将可以访问以下线性工具:

  • search_issues - 按关键字、状态或优先级搜索问题

  • create_issue创建新问题

  • get_issue - 获取问题详情

  • update_issue - 更新现有问题

  • create_comment - 为问题添加评论

  • get_comment - 获取问题的评论

  • update_comment - 更新或删除评论

  • get_profile - 获取当前 Linear 用户配置文件

  • get_team_id - 获取团队及其 ID 列表

支持与帮助

如果您在使用此工具时遇到问题,请:

  1. 检查您的 Linear API 密钥是否有效并且具有足够的权限

  2. 确保 Node.js 已正确安装

  3. 检查您的 AI 平台中的 MCP 配置

  4. 检查日志文件中可能出现的任何错误消息

在人工智能环境中使用线性工具

在 AI 环境中配置好线性工具后,即可通过提示 AI 来开始使用它们。以下是一些示例:

使用光标中的线性工具

在 Cursor 中,你可以简单地要求 Claude 执行与 Linear 相关的任务:

Search for high priority issues in our Linear project.
Create a new issue in Linear with the title "Improve login page performance" and add it to the backlog.
Get the details of the issue LIN-123 from Linear.
Add a comment to issue LIN-456 saying "This is fixed in the latest release. Please verify."
Update the priority of issue LIN-789 to urgent.

示例工作流程:创建和管理问题

以下是一个示例工作流程,展示了如何使用这些工具:

  1. 查找您的团队 ID

    What's my Linear team ID?

    Claude 将使用get_team_id工具来获取您的团队信息。

  2. 创建新问题

    Create a new Linear issue titled "Implement password reset feature" for the Engineering team with a high priority. The description should be "Users need a way to reset their passwords when they forget them."

    Claude 将使用带有必要参数的create_issue工具。

  3. 正在搜索问题

    Find all high priority issues assigned to me that are currently in progress.

    Claude 将使用带有适当过滤器的search_issues工具。

  4. 更新问题

    Update issue LIN-456 to add the description "This issue has been verified and tested on all browsers."

    Claude 将使用update_issue工具来修改该问题。

  5. 添加评论

    Add a comment to issue LIN-789 asking "Is this still a priority for this sprint?"

    Claude 将使用create_comment工具来添加评论。

  6. 正在检索评论

    Show me all the comments on issue LIN-321

    Claude 将使用get_comment工具来获取评论。

这些示例展示了一旦工具配置正确,您就可以多么自然地通过 AI 助手与 Linear 进行交互。

最近更新

该项目最近得到了增强,改进了文档和线性工具功能。改进内容包括:

  • 更新了 README,其中包含更清晰的安装和配置说明

  • 增强文档,包含各种 AI 平台的示例

  • 改进的线性工具具有更好的错误处理和响应格式

  • 增加了对管理评论的支持(创建、获取、更新、删除)

  • 通过按状态和优先级进行过滤,改进了搜索功能

执照

该项目已获得 MIT 许可。

https://kelasinovatif.com/

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zalab-inc/mcp-linear-app'

If you have feedback or need assistance with the MCP directory API, please join our Discord server