To download or retrieve issues from Linear using Cursor (the AI code editor) via the Model Context Protocol (MCP) integration, here's a step-by-step guide based on how Cursor is designed to work with external systems like Linear:
1. Set Up the Linear Integration in Cursor
In your Cursor dashboard, navigate to Integrations and click Connect next to Linear.
Authenticate and authorize your Linear workspace and select the appropriate team.(Cursor)
Once connected, you can delegate issues to Cursor by:
Assigning the issue to Cursor in the assignee field.
Mentioning @Cursor in a comment on the issue.(Cursor)
When done, Cursor’s Background Agent springs into action:
The agent analyzes the issue, uses its context, and may even generate pull requests. Updates flow back into Linear and Cursor.(Cursor)
2. Use MCP to Fetch Issues Programmatically
Cursor’s Model Context Protocol (MCP) allows Cursor to communicate with external services—like Linear—via custom tools. Here's how it works:
MCP tools are defined either locally (via mcp.json) or as remote servers and expose functionalities (like "fetch issues") to Cursor.
Example Workflow
Define an MCP Tool to fetch issues from Linear:
This could be a small HTTP server or script that queries the Linear API and returns issue data (e.g., JSON).
Support cursor-based pagination or filters as needed.
Configure mcp.json:
{
"mcpServers": {
"linear-fetcher": {
"command": "node",
"args": ["linear-issues-mcp.js"],
"env": {
"LINEAR_API_KEY": "...your key..."
}
}
}
}
This registers a tool named linear-fetcher within Cursor.
Invoke the MCP Tool in Cursor:
Within a Cursor chat or workspace, you can ask: Fetch all open issues from Linear using linear-fetcher
Cursor will call the MCP tool, which returns the data.
Summary
| Purpose | How it Works with Cursor & Linear | | ------------------------------- | -------------------------------------------------------------------------------------- | | Automatic agent-driven work | Assign or mention @Cursor in Linear → Cursor handles the rest (triage, PRs, updates) | | Manual fetching via MCP | Build an MCP tool to query Linear API → Configure in mcp.json → Use inside Cursor |
Would you like help crafting an MCP tool (e.g., sample code in JavaScript or Python) that fetches issues from Linear? Or help designing the mcp.json setup and how to call it? I can guide you through building one.