Skip to content

AGENTS.md

85 lines · 2.4 KB · Markdown
Raw

@kody/linear-mcp — agent notes

Human setup and intent live in README.md. This file is for agents: imports, smoke execute snippets, and edge cases. Never paste tokens. Do not disable live webhooks or jobs. After a fork, connect the caller's Linear workspace — do not reuse the live @kody/linear-mcp connection.

Auth / MCP

ItemValue
MCP server namelinear (not linear-mcp)
MCP URLhttps://mcp.linear.app/mcp
Runtimekody.mcp["linear"]
OAuth/API fallback@kody/linear — https://kody.codes/@kody/linear

Add + authorize:

import { kody } from 'kody:runtime'

export default async function main() {
	return await kody.mcpServerAdd({
		name: 'linear',
		url: 'https://mcp.linear.app/mcp',
	})
	// Open returned authUrl, then re-run smoke-test
}

Import paths

ExportImport
overview / setup statuskody:@kody/linear-mcp
smoke-testkody:@kody/linear-mcp/smoke-test
list-issueskody:@kody/linear-mcp/list-issues

Prefer static kody:@kody/linear-mcp/... imports from execute. Do not lead with packages.invoke. Prefer @kody/linear once BYO OAuth or an API key is ready — this package is the faster first-win MCP path.

Smoke test (read-only)

import smokeTest from 'kody:@kody/linear-mcp/smoke-test'

export default async function main() {
	return await smokeTest()
	// not connected => { ok: true, live: false, setup: { mcp, oauthApiFallback } }
	// connected => { ok: true, live: true, via: 'mcp', tool }
}

Overview (no Linear call beyond local MCP status):

import linearMcp from 'kody:@kody/linear-mcp'

export default async function main() {
	return await linearMcp()
}

Common snippets

import listIssues from 'kody:@kody/linear-mcp/list-issues'

export default async function main() {
	return await listIssues({ limit: 10 })
	// optional: { query: 'checkout timeout', limit: 20 }
}

Edge cases / fork notes

  • MCP server name is always linear; package id is linear-mcp.
  • list-issues throws the setup message when MCP is not connected.
  • Tool-name probing tries several Linear MCP tool ids (list_issues, listIssues, …) — do not hard-code a single vendor tool name in callers.
  • Do not treat the platform @kody/linear-mcp connection as the caller's workspace after a fork.
  • For GraphQL OAuth / personal API key helpers, mutations with dryRun / confirm, use @kody/linear instead.