@universal-mcp-toolkit/server-linear 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/json",
3
+ "name": "linear",
4
+ "title": "Linear MCP Server",
5
+ "description": "Search, inspect, create, and triage Linear issues with team-aware resources and prompts.",
6
+ "version": "0.1.0",
7
+ "packageName": "@universal-mcp-toolkit/server-linear",
8
+ "homepage": "https://github.com/universal-mcp-toolkit/universal-mcp-toolkit#readme",
9
+ "repositoryUrl": "https://github.com/universal-mcp-toolkit/universal-mcp-toolkit",
10
+ "documentationUrl": "https://developers.linear.app/docs/graphql",
11
+ "transports": [
12
+ "stdio",
13
+ "sse"
14
+ ],
15
+ "authentication": {
16
+ "mode": "environment-variables",
17
+ "required": [
18
+ "LINEAR_API_KEY"
19
+ ],
20
+ "optional": [
21
+ "LINEAR_DEFAULT_TEAM_ID",
22
+ "LINEAR_DEFAULT_TEAM_KEY",
23
+ "LINEAR_WORKSPACE_NAME",
24
+ "LINEAR_API_URL"
25
+ ]
26
+ },
27
+ "capabilities": {
28
+ "tools": true,
29
+ "resources": true,
30
+ "prompts": true
31
+ },
32
+ "tools": [
33
+ "search_issues",
34
+ "get_issue",
35
+ "create_issue"
36
+ ],
37
+ "resources": [
38
+ {
39
+ "name": "team",
40
+ "uri": "linear://team/default",
41
+ "mimeType": "application/json",
42
+ "description": "JSON summary of accessible Linear teams and the configured default team."
43
+ }
44
+ ],
45
+ "prompts": [
46
+ {
47
+ "name": "sprint-triage",
48
+ "description": "Generate a sprint triage prompt grounded in the current Linear team context."
49
+ }
50
+ ],
51
+ "tags": [
52
+ "linear",
53
+ "issues",
54
+ "triage",
55
+ "graphql",
56
+ "project-management"
57
+ ]
58
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 universal-mcp-toolkit
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,319 @@
1
+ import * as _universal_mcp_toolkit_core from '@universal-mcp-toolkit/core';
2
+ import { ToolkitServer, ToolkitPromptHandler, ToolkitServerMetadata } from '@universal-mcp-toolkit/core';
3
+ import { z } from 'zod';
4
+
5
+ declare const TEAM_RESOURCE_URI = "linear://team/default";
6
+ declare const TOOL_NAMES: readonly ["search_issues", "get_issue", "create_issue"];
7
+ declare const RESOURCE_NAMES: readonly ["team"];
8
+ declare const PROMPT_NAMES: readonly ["sprint-triage"];
9
+ interface LinearEnvironment {
10
+ LINEAR_API_KEY: string;
11
+ LINEAR_DEFAULT_TEAM_ID?: string;
12
+ LINEAR_DEFAULT_TEAM_KEY?: string;
13
+ LINEAR_WORKSPACE_NAME?: string;
14
+ LINEAR_API_URL: string;
15
+ }
16
+ declare const teamSchema: z.ZodObject<{
17
+ id: z.ZodString;
18
+ key: z.ZodString;
19
+ name: z.ZodString;
20
+ }, z.core.$strip>;
21
+ type LinearTeam = z.infer<typeof teamSchema>;
22
+ declare const userSchema: z.ZodObject<{
23
+ id: z.ZodString;
24
+ name: z.ZodString;
25
+ }, z.core.$strip>;
26
+ type LinearUser = z.infer<typeof userSchema>;
27
+ declare const issueStateSchema: z.ZodObject<{
28
+ name: z.ZodNullable<z.ZodString>;
29
+ type: z.ZodNullable<z.ZodString>;
30
+ }, z.core.$strip>;
31
+ type LinearIssueState = z.infer<typeof issueStateSchema>;
32
+ declare const issueCycleSchema: z.ZodObject<{
33
+ id: z.ZodString;
34
+ number: z.ZodNullable<z.ZodNumber>;
35
+ name: z.ZodNullable<z.ZodString>;
36
+ startsAt: z.ZodNullable<z.ZodString>;
37
+ endsAt: z.ZodNullable<z.ZodString>;
38
+ }, z.core.$strip>;
39
+ type LinearIssueCycle = z.infer<typeof issueCycleSchema>;
40
+ declare const issueSummarySchema: z.ZodObject<{
41
+ id: z.ZodString;
42
+ identifier: z.ZodString;
43
+ title: z.ZodString;
44
+ url: z.ZodNullable<z.ZodString>;
45
+ priority: z.ZodNullable<z.ZodNumber>;
46
+ state: z.ZodObject<{
47
+ name: z.ZodNullable<z.ZodString>;
48
+ type: z.ZodNullable<z.ZodString>;
49
+ }, z.core.$strip>;
50
+ team: z.ZodNullable<z.ZodObject<{
51
+ id: z.ZodString;
52
+ key: z.ZodString;
53
+ name: z.ZodString;
54
+ }, z.core.$strip>>;
55
+ assignee: z.ZodNullable<z.ZodObject<{
56
+ id: z.ZodString;
57
+ name: z.ZodString;
58
+ }, z.core.$strip>>;
59
+ createdAt: z.ZodNullable<z.ZodString>;
60
+ updatedAt: z.ZodNullable<z.ZodString>;
61
+ }, z.core.$strip>;
62
+ type LinearIssueSummary = z.infer<typeof issueSummarySchema>;
63
+ declare const issueDetailSchema: z.ZodObject<{
64
+ description: z.ZodNullable<z.ZodString>;
65
+ branchName: z.ZodNullable<z.ZodString>;
66
+ cycle: z.ZodNullable<z.ZodObject<{
67
+ id: z.ZodString;
68
+ number: z.ZodNullable<z.ZodNumber>;
69
+ name: z.ZodNullable<z.ZodString>;
70
+ startsAt: z.ZodNullable<z.ZodString>;
71
+ endsAt: z.ZodNullable<z.ZodString>;
72
+ }, z.core.$strip>>;
73
+ id: z.ZodString;
74
+ identifier: z.ZodString;
75
+ title: z.ZodString;
76
+ url: z.ZodNullable<z.ZodString>;
77
+ priority: z.ZodNullable<z.ZodNumber>;
78
+ state: z.ZodObject<{
79
+ name: z.ZodNullable<z.ZodString>;
80
+ type: z.ZodNullable<z.ZodString>;
81
+ }, z.core.$strip>;
82
+ team: z.ZodNullable<z.ZodObject<{
83
+ id: z.ZodString;
84
+ key: z.ZodString;
85
+ name: z.ZodString;
86
+ }, z.core.$strip>>;
87
+ assignee: z.ZodNullable<z.ZodObject<{
88
+ id: z.ZodString;
89
+ name: z.ZodString;
90
+ }, z.core.$strip>>;
91
+ createdAt: z.ZodNullable<z.ZodString>;
92
+ updatedAt: z.ZodNullable<z.ZodString>;
93
+ }, z.core.$strip>;
94
+ type LinearIssueDetail = z.infer<typeof issueDetailSchema>;
95
+ declare const searchIssuesInputShape: {
96
+ query: z.ZodString;
97
+ limit: z.ZodDefault<z.ZodNumber>;
98
+ teamId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
99
+ teamKey: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
100
+ stateName: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
101
+ };
102
+ type SearchIssuesToolInput = z.infer<z.ZodObject<typeof searchIssuesInputShape>>;
103
+ declare const searchIssuesOutputShape: {
104
+ query: z.ZodString;
105
+ stateName: z.ZodNullable<z.ZodString>;
106
+ team: z.ZodNullable<z.ZodObject<{
107
+ id: z.ZodString;
108
+ key: z.ZodString;
109
+ name: z.ZodString;
110
+ }, z.core.$strip>>;
111
+ warning: z.ZodNullable<z.ZodString>;
112
+ total: z.ZodNumber;
113
+ issues: z.ZodArray<z.ZodObject<{
114
+ id: z.ZodString;
115
+ identifier: z.ZodString;
116
+ title: z.ZodString;
117
+ url: z.ZodNullable<z.ZodString>;
118
+ priority: z.ZodNullable<z.ZodNumber>;
119
+ state: z.ZodObject<{
120
+ name: z.ZodNullable<z.ZodString>;
121
+ type: z.ZodNullable<z.ZodString>;
122
+ }, z.core.$strip>;
123
+ team: z.ZodNullable<z.ZodObject<{
124
+ id: z.ZodString;
125
+ key: z.ZodString;
126
+ name: z.ZodString;
127
+ }, z.core.$strip>>;
128
+ assignee: z.ZodNullable<z.ZodObject<{
129
+ id: z.ZodString;
130
+ name: z.ZodString;
131
+ }, z.core.$strip>>;
132
+ createdAt: z.ZodNullable<z.ZodString>;
133
+ updatedAt: z.ZodNullable<z.ZodString>;
134
+ }, z.core.$strip>>;
135
+ };
136
+ type SearchIssuesToolOutput = z.infer<z.ZodObject<typeof searchIssuesOutputShape>>;
137
+ declare const getIssueInputShape: {
138
+ idOrIdentifier: z.ZodString;
139
+ };
140
+ type GetIssueToolInput = z.infer<z.ZodObject<typeof getIssueInputShape>>;
141
+ declare const getIssueOutputShape: {
142
+ issue: z.ZodObject<{
143
+ description: z.ZodNullable<z.ZodString>;
144
+ branchName: z.ZodNullable<z.ZodString>;
145
+ cycle: z.ZodNullable<z.ZodObject<{
146
+ id: z.ZodString;
147
+ number: z.ZodNullable<z.ZodNumber>;
148
+ name: z.ZodNullable<z.ZodString>;
149
+ startsAt: z.ZodNullable<z.ZodString>;
150
+ endsAt: z.ZodNullable<z.ZodString>;
151
+ }, z.core.$strip>>;
152
+ id: z.ZodString;
153
+ identifier: z.ZodString;
154
+ title: z.ZodString;
155
+ url: z.ZodNullable<z.ZodString>;
156
+ priority: z.ZodNullable<z.ZodNumber>;
157
+ state: z.ZodObject<{
158
+ name: z.ZodNullable<z.ZodString>;
159
+ type: z.ZodNullable<z.ZodString>;
160
+ }, z.core.$strip>;
161
+ team: z.ZodNullable<z.ZodObject<{
162
+ id: z.ZodString;
163
+ key: z.ZodString;
164
+ name: z.ZodString;
165
+ }, z.core.$strip>>;
166
+ assignee: z.ZodNullable<z.ZodObject<{
167
+ id: z.ZodString;
168
+ name: z.ZodString;
169
+ }, z.core.$strip>>;
170
+ createdAt: z.ZodNullable<z.ZodString>;
171
+ updatedAt: z.ZodNullable<z.ZodString>;
172
+ }, z.core.$strip>;
173
+ };
174
+ type GetIssueToolOutput = z.infer<z.ZodObject<typeof getIssueOutputShape>>;
175
+ declare const createIssueInputShape: {
176
+ title: z.ZodString;
177
+ description: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
178
+ teamId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
179
+ teamKey: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
180
+ priority: z.ZodOptional<z.ZodNumber>;
181
+ stateId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
182
+ assigneeId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
183
+ labelIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
184
+ dueDate: z.ZodOptional<z.ZodString>;
185
+ projectId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
186
+ cycleId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
187
+ };
188
+ type CreateIssueToolInput = z.infer<z.ZodObject<typeof createIssueInputShape>>;
189
+ declare const createIssueOutputShape: {
190
+ created: z.ZodBoolean;
191
+ issue: z.ZodObject<{
192
+ description: z.ZodNullable<z.ZodString>;
193
+ branchName: z.ZodNullable<z.ZodString>;
194
+ cycle: z.ZodNullable<z.ZodObject<{
195
+ id: z.ZodString;
196
+ number: z.ZodNullable<z.ZodNumber>;
197
+ name: z.ZodNullable<z.ZodString>;
198
+ startsAt: z.ZodNullable<z.ZodString>;
199
+ endsAt: z.ZodNullable<z.ZodString>;
200
+ }, z.core.$strip>>;
201
+ id: z.ZodString;
202
+ identifier: z.ZodString;
203
+ title: z.ZodString;
204
+ url: z.ZodNullable<z.ZodString>;
205
+ priority: z.ZodNullable<z.ZodNumber>;
206
+ state: z.ZodObject<{
207
+ name: z.ZodNullable<z.ZodString>;
208
+ type: z.ZodNullable<z.ZodString>;
209
+ }, z.core.$strip>;
210
+ team: z.ZodNullable<z.ZodObject<{
211
+ id: z.ZodString;
212
+ key: z.ZodString;
213
+ name: z.ZodString;
214
+ }, z.core.$strip>>;
215
+ assignee: z.ZodNullable<z.ZodObject<{
216
+ id: z.ZodString;
217
+ name: z.ZodString;
218
+ }, z.core.$strip>>;
219
+ createdAt: z.ZodNullable<z.ZodString>;
220
+ updatedAt: z.ZodNullable<z.ZodString>;
221
+ }, z.core.$strip>;
222
+ };
223
+ type CreateIssueToolOutput = z.infer<z.ZodObject<typeof createIssueOutputShape>>;
224
+ declare const sprintTriagePromptArgsShape: {
225
+ teamId: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
226
+ teamKey: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
227
+ focus: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
228
+ objective: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodString>>;
229
+ issueLimit: z.ZodDefault<z.ZodNumber>;
230
+ includeBacklog: z.ZodDefault<z.ZodBoolean>;
231
+ };
232
+ type SprintTriagePromptArgs = z.infer<z.ZodObject<typeof sprintTriagePromptArgsShape>>;
233
+ type SprintTriagePromptResult = Awaited<ReturnType<ToolkitPromptHandler<typeof sprintTriagePromptArgsShape>>>;
234
+ interface LinearTeamResourcePayload {
235
+ workspaceName: string | null;
236
+ configuredDefaultTeamId: string | null;
237
+ configuredDefaultTeamKey: string | null;
238
+ defaultTeam: LinearTeam | null;
239
+ accessibleTeams: LinearTeam[];
240
+ warning: string | null;
241
+ }
242
+ interface LinearIssueSearchRequest {
243
+ query: string;
244
+ limit: number;
245
+ teamId?: string;
246
+ stateName?: string;
247
+ issueNumber?: number;
248
+ }
249
+ interface LinearCreateIssueInput {
250
+ teamId: string;
251
+ title: string;
252
+ description?: string;
253
+ priority?: number;
254
+ stateId?: string;
255
+ assigneeId?: string;
256
+ labelIds?: string[];
257
+ dueDate?: string;
258
+ projectId?: string;
259
+ cycleId?: string;
260
+ }
261
+ interface LinearClient {
262
+ listTeams(): Promise<LinearTeam[]>;
263
+ searchIssues(input: LinearIssueSearchRequest): Promise<LinearIssueSummary[]>;
264
+ getIssueById(id: string): Promise<LinearIssueDetail>;
265
+ getIssueByIdentifier(teamId: string, issueNumber: number): Promise<LinearIssueDetail>;
266
+ createIssue(input: LinearCreateIssueInput): Promise<LinearIssueDetail>;
267
+ }
268
+ interface LinearApiClientOptions {
269
+ apiKey: string;
270
+ apiUrl?: string;
271
+ fetchFn?: typeof fetch;
272
+ }
273
+ declare class LinearApiClient implements LinearClient {
274
+ private readonly apiKey;
275
+ private readonly apiUrl;
276
+ private readonly fetchFn;
277
+ constructor(options: LinearApiClientOptions);
278
+ listTeams(): Promise<LinearTeam[]>;
279
+ searchIssues(input: LinearIssueSearchRequest): Promise<LinearIssueSummary[]>;
280
+ getIssueById(id: string): Promise<LinearIssueDetail>;
281
+ getIssueByIdentifier(teamId: string, issueNumber: number): Promise<LinearIssueDetail>;
282
+ createIssue(input: LinearCreateIssueInput): Promise<LinearIssueDetail>;
283
+ private request;
284
+ }
285
+ declare const metadata: ToolkitServerMetadata;
286
+ declare const serverCard: _universal_mcp_toolkit_core.ToolkitServerCard;
287
+ interface LinearServerOptions {
288
+ client: LinearClient;
289
+ defaultTeamId?: string | null;
290
+ defaultTeamKey?: string | null;
291
+ workspaceName?: string | null;
292
+ }
293
+ declare class LinearServer extends ToolkitServer {
294
+ private readonly client;
295
+ private readonly defaultTeamId;
296
+ private readonly defaultTeamKey;
297
+ private readonly workspaceName;
298
+ constructor(options: LinearServerOptions);
299
+ getTeamResourcePayload(): Promise<LinearTeamResourcePayload>;
300
+ createSprintTriagePrompt(args?: Partial<SprintTriagePromptArgs>): Promise<SprintTriagePromptResult>;
301
+ private registerSearchIssuesTool;
302
+ private registerGetIssueTool;
303
+ private registerCreateIssueTool;
304
+ private registerTeamResource;
305
+ private registerSprintTriagePrompt;
306
+ private getIssueByTeamKeyAndNumber;
307
+ private resolveTeamSelection;
308
+ private runOperation;
309
+ }
310
+ interface CreateLinearServerOptions {
311
+ client?: LinearClient;
312
+ environment?: LinearEnvironment;
313
+ fetchFn?: typeof fetch;
314
+ }
315
+ declare function loadLinearEnvironment(source?: NodeJS.ProcessEnv): LinearEnvironment;
316
+ declare function createServer(options?: CreateLinearServerOptions): Promise<LinearServer>;
317
+ declare function main(): Promise<void>;
318
+
319
+ export { type CreateIssueToolInput, type CreateIssueToolOutput, type CreateLinearServerOptions, type GetIssueToolInput, type GetIssueToolOutput, LinearApiClient, type LinearApiClientOptions, type LinearClient, type LinearCreateIssueInput, type LinearEnvironment, type LinearIssueCycle, type LinearIssueDetail, type LinearIssueSearchRequest, type LinearIssueState, type LinearIssueSummary, LinearServer, type LinearServerOptions, type LinearTeam, type LinearTeamResourcePayload, type LinearUser, PROMPT_NAMES, RESOURCE_NAMES, type SearchIssuesToolInput, type SearchIssuesToolOutput, type SprintTriagePromptArgs, TEAM_RESOURCE_URI, TOOL_NAMES, createIssueInputShape, createIssueOutputShape, createServer, getIssueInputShape, getIssueOutputShape, loadLinearEnvironment, main, metadata, searchIssuesInputShape, searchIssuesOutputShape, serverCard, sprintTriagePromptArgsShape };