linear-mcp

linear-mcp

Enables AI agents to manage Linear issues, projects, teams, and more via the Model Context Protocol.

Category
访问服务器

README

Linear MCP Server

Note: This is a custom implementation. For the official Cline Linear MCP server, see cline/linear-mcp.

A Model Context Protocol (MCP) server that provides tools for interacting with Linear's API, enabling AI agents to manage issues, projects, teams, and more programmatically.

Installation

Prerequisites

  • Node.js (v16 or higher)
  • A Linear account with API access
  • Linear API key with appropriate permissions (get from Linear's Developer Settings)

Usage

Quick Start

You need to provide your Linear API key to the server.

Option 1: Command Line Argument

LINEAR_API_KEY=your-api-key npx @gmclend/linear-mcp

Option 2: Environment Variable

export LINEAR_API_KEY=your-api-key
# Then run the server
npx @gmclend/linear-mcp

Client Configuration

Configure your MCP client (e.g., in its settings file) to connect to this server:

{
  "mcpServers": {
    "linear-mcp": {
      "command": "npx",
      "args": ["-y", "@gmclend/linear-mcp"],
      "env": {
        "LINEAR_API_KEY": "your-api-key-here",
        // Optional: Enable read-only mode (see below)
        "LINEAR_MCP_READ_ONLY": "false" 
      }
    }
  }
}

Read-Only Mode

Run the server in read-only mode to prevent accidental modifications and limit the available tools (useful in restricted environments). Set the LINEAR_MCP_READ_ONLY environment variable:

LINEAR_MCP_READ_ONLY=true LINEAR_API_KEY=your-api-key npx @gmclend/linear-mcp

Features

This server provides comprehensive tools for managing various Linear entities:

  • Issue Management: Create, list (with filters), update, and search issues.
  • Comment Management: Create, view, update, and delete comments on issues.
  • Label Management: List, create, and update team labels.
  • Team Management: List teams and view team details.
  • Project Management: List projects (with filters) and view project details.
  • Cycle Management: List, create, and update team cycles.
  • Document Management: List, create, and update project documents.
  • User Management: List users, get user details, and get info about the authenticated user.
  • Roadmap/Initiative Management: List roadmaps/initiatives and get details.

Available Tools

All tools are defined in src/tools/definitions.ts.

Read-Only Tools

(Available in both standard and read-only modes)

  • list_issues: List issues with optional filters (team, assignee, status, priority, etc.).
  • search_issues: Search issues using query text.
  • get_issue: Get detailed information about a specific issue.
  • get_comment: Get a specific comment.
  • list_labels: List all labels in a team.
  • get_label: Get label details.
  • list_teams: List all teams in the workspace.
  • get_team: Get team details.
  • list_projects: List all projects with optional filters (see Project Filters section).
  • get_project: Get project details.
  • list_cycles: List all cycles in a team.
  • get_cycle: Get cycle details.
  • list_documents: List all documents, optionally filtered by team.
  • get_document: Get document details.
  • list_users: List all users in the workspace.
  • get_user: Get detailed information about a specific user.
  • me: Get information about the authenticated user.
  • list_roadmaps: List all roadmaps.
  • get_roadmap: Get roadmap details.
  • get_initiative: Get detailed information about a specific initiative.

Write Tools

(Only available when LINEAR_MCP_READ_ONLY is not true)

  • create_issue: Create a new issue.
  • update_issue: Update an existing issue (title, description, status, assignee, priority, labels).
  • create_comment: Create a comment on an issue.
  • update_comment: Update an existing comment.
  • delete_comment: Delete a comment.
  • create_label: Create a new label.
  • update_label: Update an existing label.
  • create_cycle: Create a new cycle.
  • update_cycle: Update an existing cycle.
  • create_document: Create a new document associated with a project.
  • update_document: Update an existing document.

Filters and Pagination

Many list_* tools support filtering and pagination.

Project Filters (list_projects)

The list_projects command accepts the following filter parameters:

Filter Description Example
first Max results (default: 50) {"first": 10}
after Cursor for forward pagination {"after": "cursor_string"}
teamId Filter by team ID {"teamId": "team-uuid"}
id Filter by specific project ID(s) {"id": ["proj-uuid"]}
name Filter by project name (contains) {"name": "Refactor"}
state Filter by project state {"state": "started"}
health Filter by project health {"health": "onTrack"}
priority Filter by priority (0-4) {"priority": 3}
createdAfter Filter by creation date (ISO 8601) {"createdAfter": "2023-01-01"}
createdBefore Filter by creation date (ISO 8601) {"createdBefore": "2024-01-01"}
updatedAfter Filter by update date (ISO 8601) {"updatedAfter": "2023-06-01"}
updatedBefore Filter by update date (ISO 8601) {"updatedBefore": "2024-01-01"}
orderBy Sort results by field {"orderBy": "createdAt"}

Example Response (list_projects):

{
  "projects": [
    {
      "id": "project-id",
      "name": "Project Name",
      // ... other fields
      "teams": [ { "id": "team-id", "name": "Team Name", "key": "TEAM" } ]
    }
  ],
  "pagination": {
    "hasNextPage": true,
    "endCursor": "cursor-for-next-page"
  }
}

Initiative Pagination (list_initiatives)

The list_initiatives tool supports pagination:

  • first: Number of items from the beginning (default: 50).
  • last: Number of items from the end.
  • after: Cursor for forward pagination.
  • before: Cursor for backward pagination.

Example Response (list_initiatives):

{
  "initiatives": [ /* ... initiative data ... */ ],
  "pagination": {
    "hasNextPage": true,
    "hasPreviousPage": false,
    "startCursor": "cursor-for-first-item",
    "endCursor": "cursor-for-last-item"
  }
}

Development

Setup

  1. Clone the repository: git clone [repository-url] && cd linear-mcp
  2. Install dependencies: npm install
  3. Build the project: npm run build

Running with Inspector

For local development and debugging with a web UI:

npm run inspector

Open http://localhost:6274 in your browser.

Auto-Rebuild

For development with auto-rebuild on file changes:

npm run watch

Technical Details

  • Built with TypeScript, Linear SDK (@linear/sdk), and MCP SDK (@modelcontextprotocol/sdk).
  • Communicates via stdio using the Model Context Protocol.
  • Includes basic error handling for API keys, parameters, and Linear API issues.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选